4.3 KiB
4.3 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 02-wire-editor-availability | Wire active-session editor availability | done | 2 |
|
plan.md | ../../specs/ui/embedded-vscode-executor-availability.md |
Task 02: Wire Active-Session Editor Availability
Acceptance
- The desktop task topbar filters
internal_vscodewith the active session's backend capability; missing capability data fails closed without hiding unrelated editors. - Saved-default fallback and active-session changes use the filtered editor set without mutating the stored preference or leaking the previous session's value.
- The obsolete boot
runtime.hostOSfield, parser/accessor, tests, and Playwright helper are removed with no remaining consumer.
Verification
Use TDD: update the availability and prop-flow tests to describe the capability contract, observe
the failures, wire the active-session value, and remove host metadata only after the new path is
green. From apps/ run:
pnpm --filter @kandev/web test -- src/boot-payload.test.ts components/task/editors-menu-availability.test.ts components/task/task-top-bar.test.tsx
pnpm --filter @kandev/web typecheck
pnpm --filter @kandev/web lint
From apps/backend/ run the affected boot package tests:
go test ./internal/backendapp ./internal/webapp
Finally search from the repository root:
rg -n "readBackendHostOS|hostOS|rewriteBackendHostOS" apps
The search must return no obsolete editor-availability or boot-contract references.
Files likely touched
apps/web/hooks/domains/session/use-session-resumption.tsapps/web/components/task/task-page-inner.tsxapps/web/components/task/task-top-bar.tsxapps/web/components/task/task-top-bar.test.tsxapps/web/components/task/editors-menu.tsxapps/web/components/task/editors-menu-availability.tsapps/web/components/task/editors-menu-availability.test.tsapps/web/src/boot-payload.tsapps/web/src/boot-payload.test.tsapps/backend/internal/webapp/payload.goapps/backend/internal/backendapp/helpers.goapps/backend/internal/backendapp/helpers_test.goapps/web/e2e/helpers/boot-payload.ts(remove)
Dependencies
- Task 01 provides the session capability and enforcement contract.
Parallelism
Sequential. The frontend contract and metadata removal must land together before E2E coverage.
Inputs
- Spec sections: What, API surface, Failure modes, and scenarios 1–6 and 8.
- Plan sections: Consume active-session capability, Filter and fallback, Retire host-wide boot metadata, and Mobile design contract.
- Existing active-session source:
resumption.sessionStatusinapps/web/components/task/task-page-inner.tsx.
Risks
- Reset capability to false when
effectiveSessionIdchanges instead of retaining asynchronous status from the previous session. - Pass one capability value to both halves of the split editor control.
- Keep custom, hosted, Remote SSH, and installed built-in editors governed by their current rules.
Output contract
Report the prop/data flow, removed host metadata, files changed, red and green results, and the
repository-wide search result. Update this task to done and its plan checkbox/status.
Completion record
- The current session's
capabilities.embedded_vscodeflows from session resumption throughTaskPageInner,TaskTopBar,TopBarRight,TopbarToolsGroup, andEditorsMenu. Missing data is false, while the hook's ID-keyed state prevents a previous session's status leaking into the next session. - Availability filtering now accepts the capability boolean and retains existing enabled/installed checks. The filtered set continues to drive saved-default fallback without persisting a change.
- Removed boot
runtime.hostOSfrom Go serialization and TypeScript parsing, plus the old E2E HTML-rewrite helper. - Red: the updated availability test still used the old host-OS argument and failed before the
filtering implementation changed. Green: focused Vitest tests passed (15 tests),
pnpm run typecheckandpnpm run lintpassed, andgo test ./internal/backendapp ./internal/webapppassed. rg -n "readBackendHostOS|rewriteBackendHostOS|hostOS" apps/web apps/backend/internal/webapp apps/backend/internal/backendapp -g '*.ts' -g '*.tsx' -g '*.go'returned no matches.