3.7 KiB
3.7 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 04-hide-disabled-setting | 'Hide disabled integrations from left panel navigation' setting | done | 3 |
|
plan.md | ../../specs/integrations/requirements/enable-disable-toggle.md |
Task 04: "Hide disabled integrations from left panel navigation" setting
- Acceptance:
useHideDisabledIntegrationsInNav()exists, defaults tohideDisabled: false, persists viasetHideDisabled, broadcasts its own sync event, and degrades tofalse(never throws) whenlocalStorageis unavailable./settings/integrationsrenders a new row below the integration cards with the exact label "Hide disabled integrations from left panel navigation", default off, using the shared draft/save-bar convention.- New locale keys are added and the pseudo-locale is regenerated via the project's i18n tooling.
- Verification:
cd apps && pnpm --filter @kandev/web test -- hooks/domains/integrations/use-hide-disabled-integrations-in-nav app/settings/integrations/pagethencd apps/web && pnpm run i18n:check && pnpm run i18n:ratchet - Files likely touched:
apps/web/hooks/domains/integrations/use-hide-disabled-integrations-in-nav.ts(new)apps/web/hooks/domains/integrations/use-hide-disabled-integrations-in-nav.test.ts(new)apps/web/app/settings/integrations/page.tsxapps/web/app/settings/integrations/page.test.tsxapps/web/src/locales/en/settings.json,apps/web/src/locales/pseudo/settings.json
- Dependencies:
03-index-page-sliders. - Parallelism: sequential.
- Inputs: spec "What"/"Data model"/"Failure modes", plan Task 04
section,
use-integration-enabled.ts's hook shape,archive-confirmation-settings.tsx's row-UI pattern. - Output contract: summary, files changed, exact test/i18n commands run and their output, blockers/risks, task/plan status update.
Results
- Added
useHideDisabledIntegrationsInNav(): a standalone (non-per-integration)useSyncExternalStorehook backed bykandev:integrations:hideDisabledInNav:v1, broadcastingkandev:integrations:hide-disabled-in-nav-changed, defaulting tofalseon missing key, unreadable literal, or a throwinglocalStorage. - Added
HideDisabledIntegrationsSettingto the index page: a plain<Switch>+<Label>row (mirroringarchive-confirmation-settings.tsx's layout) wired throughuseDraftedIntegrationEnabledfor the shared draft/save-bar behavior, rendered below the cards grid. - Added locale keys
settings:hideDisabledIntegrationsFromNavandsettings:hideDisabledIntegrationsFromNavDescription; regenerated the pseudo-locale viapnpm run i18n:pseudo(not hand-edited). - Extended
page.test.tsxwith a test asserting the new switch rendersaria-checked="false"by default and flips its own (drafted) state immediately on click while leavinglocalStorageuntouched until Save — and updated the slider-count assertion from 7 to 8. - Commands:
cd apps && pnpm --filter @kandev/web test -- use-hide-disabled-integrations-in-nav→Test Files 1 passed (1),Tests 9 passed (9).cd apps/web && pnpm run typecheck→ clean.cd apps && pnpm --filter @kandev/web test -- app/settings/integrations/page→Test Files 1 passed (1),Tests 4 passed (4).cd apps/web && pnpm run i18n:pseudo→ regenerated pseudo locale.cd apps/web && pnpm run i18n:check→✓ i18n keys OK(908 pre-existing zh-cn advisory issues, unrelated to this change; no new orphans).cd apps/web && pnpm run i18n:ratchet→✓ i18n new-code ratchet — 0 added + 7 modified file(s) clean,✓ guard allowlist intact.
- Files changed: the five files/pairs listed under "Files likely touched".
- Blockers/risks: none.