2.1 KiB
2.1 KiB
id, title, status, wave, depends_on, plan, spec, system_design
| id | title | status | wave | depends_on | plan | spec | system_design |
|---|---|---|---|---|---|---|---|
| 01-stabilize-file-tree-rows | Stabilize file-tree row inputs | done | 1 | plan.md | ../../specs/ui/requirements/file-tree-chat-context.md | ../../specs/ui/system-design/task-surface-render-isolation.md |
Task 01: Stabilize file-tree row inputs
Acceptance
onToggleExpandandonDropkeep their identities during unrelated file-browser renders.useFileBrowserTreekeeps stable aggregate identities when its fields do not change.TreeNodeItemskips renders when all visible and interactive inputs remain equal.- Selection, expansion, active-file, drag, edit, and context-action changes still update the affected row.
- Existing file-tree behavior remains unchanged.
This task preserves AC-UI-FILE-TREE-CHAT-CONTEXT-001.1, .2, and .7.
TDD sequence
- Add a render-count test that fails after an unrelated owner update.
- Add identity tests for the tree aggregate and the two traced callbacks.
- Stabilize callback dependencies and the hook result.
- Add the memoized row boundary with complete semantic inputs.
- Run the focused file-tree regression tests.
Verification
cd apps
rtk pnpm --filter @kandev/web test components/task/file-browser-render-identity.test.tsx components/task/file-browser-actions.test.ts components/task/file-browser-toggle-expand.test.ts components/task/file-browser-restore-expanded.test.tsx
rtk pnpm --filter @kandev/web typecheck
Files likely touched
apps/web/components/task/file-browser.tsxapps/web/components/task/file-browser-hooks.tsapps/web/components/task/file-browser-parts.tsxapps/web/components/task/file-browser-render-identity.test.tsx- Existing focused file-browser tests
Dependencies
None.
Inputs
REQ-UI-FILE-TREE-CHAT-CONTEXT-001- Task Surface Render Isolation system design
- Trace evidence for
onToggleExpand,onDrop, and complete row render waves
Output contract
Report the stable dependency strategy, the row equality inputs, changed files, focused test results, and risks. Do not add time-based unit assertions.