You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the UX and CRUD for user-created tree containers. Depends on #9 (the trees store and tree-aware doc-list.ts must exist first). No doc import yet — user trees in this phase are empty labeled folders. The focus is proving out the interaction model (inline-input rows, two-click-confirm) before content primitives land in #11.
Interaction model
From the #8 planning discussion (D5): inline-input rows, matching the lightweight pattern already used by the stats-reset cell at doc-list.ts:273-291. No modals, no popovers.
Creating a tree
A new <+> new tree row renders at the root level of the doc-list panel, below the existing about tree.
Click → the row becomes an inline <input> with a placeholder ("tree name").
Enter commits: generates id: 'u:<uuid>', calls putTree({ id, label, kind: 'user', created }), refreshes the panel.
Escape, blur, or outside-click cancels and restores the <+> new tree row.
Two-click-confirm on the user tree's label row (matching the reset-cell pattern):
First click arms a "rename?" affordance on the row with a 3s timeout.
Second click (within the timeout) swaps the label for an inline input pre-filled with the current name.
Enter commits, Escape/blur cancels.
System trees (kind: 'system') do not expose rename — no click handler, no armed state. about stays about.
Deleting a tree
Separate two-click-confirm on a small control in the tree row (e.g. a × that appears on hover, or a dedicated cell — match whatever feels consistent with the existing stats-reset affordance).
Confirmed delete cascades: deleteTree(id) plus deleteDocumentData() for each doc in the tree. (Trees in this phase are empty, so the cascade is a no-op, but the code path needs to be in place for Doc trees phase 2: create/rename/delete empty user trees #11.)
Add the UX and CRUD for user-created tree containers. Depends on #9 (the
treesstore and tree-awaredoc-list.tsmust exist first). No doc import yet — user trees in this phase are empty labeled folders. The focus is proving out the interaction model (inline-input rows, two-click-confirm) before content primitives land in #11.Interaction model
From the #8 planning discussion (D5): inline-input rows, matching the lightweight pattern already used by the stats-reset cell at
doc-list.ts:273-291. No modals, no popovers.Creating a tree
<+> new treerow renders at the root level of the doc-list panel, below the existingabouttree.<input>with a placeholder ("tree name").id: 'u:<uuid>', callsputTree({ id, label, kind: 'user', created }), refreshes the panel.<+> new treerow.<+> addrow yet — that lands in Doc trees phase 2: create/rename/delete empty user trees #11).Renaming a tree
kind: 'system') do not expose rename — no click handler, no armed state.aboutstaysabout.Deleting a tree
×that appears on hover, or a dedicated cell — match whatever feels consistent with the existing stats-reset affordance).deleteTree(id)plusdeleteDocumentData()for each doc in the tree. (Trees in this phase are empty, so the cascade is a no-op, but the code path needs to be in place for Doc trees phase 2: create/rename/delete empty user trees #11.)aboutdoes not expose delete.Data model
Already set up in #9 — this issue just uses:
putTree,listTrees,deleteTreefromstore.tsStoredDocument.treeIdfor the cascade scopeNo new schema.
Acceptance
<+> new treerow renders at the root of the doc-list panel.aboutvisually only insofar as they have no children yet.deleteTree+deleteDocumentData.aboutexposes neither rename nor delete — no affordances, no armed states.Touchpoints
frontend/src/doc-list.ts— new inline-input row component,<+> new treerow, rename/delete affordances on user-tree rowsfrontend/src/styles.css— styling for the new rows and the armed statesfrontend/src/store.ts— no changes expected (CRUD landed in Docs overhaul #9)Out of scope
<+> addchild rows inside a user tree (lands in Doc trees phase 2: create/rename/delete empty user trees #11)Parent: #8