Collapsible lanes — frontmatter-backed slim strips outside the width division

A lane folds to a fixed slim vertical strip carrying its glyph, its card-count
badge and its title turned on its side, and the strip is deliberately not part
of the window's division: the expanded lanes' units divide what is left once
each folded strip's fixed width has come off the top, so folding a lane is a
re-divide trigger of the Show/Hide Trash family — the window never moves and
the siblings grow into what the lane gave up.

The state is a first-class lane frontmatter key, `collapsed: true`, and
document state exactly as `width` is: the files are the board, so an agent
folds a lane by writing one key. Absent means expanded, expanding removes the
key rather than writing `false` (the remove-at-default family beside a
one-unit `width`, the empty rename's `title` and the None well's
`background`), and the lane's `width` rides along untouched so expanding
restores the lane the user had. The read is `width`'s leniency one type over —
a boolean scalar or a quoted boolean word reads as itself, everything else has
no reading at all and renders as expanded, bytes preserved either way.

Toggling is the header's always-visible collapse chevron, the lane context
menu's single Collapse Lane / Expand Lane row, and a plain click anywhere on
the strip; a modified click on the strip stays the ordinary selection grammar,
so a folded lane is still selectable by pointer. The title reads bottom-up and
is justified to the top of the room below the strip's chrome (owner ruling
2026-08-08), truncating against the strip's own height.

While folded the lane draws no cards at all, which is what makes every
exclusion true by construction rather than by a guard per gesture: no card
face means no marquee target and no navigation frame, and no registered grid
means the masonry's drop zones have nothing to resolve against. What did need
code is the half that names absolute destinations — the option-arrow jumps and
the arrow seed scan past a folded lane, the lane domain's down-arrow is inert
on one, and New Card skips it (a selection inside one falls through to the
last-active lane, the stale selection's rule). A drop on the strip appends at
the lane's end, cards and Finder files alike, with an accent edge standing in
for the shadow the strip has no masonry to open; there is no hover-to-auto-
expand yet. Lane reorder works on the strip, and a dragged folded lane carries
its fold, so its shadow and its replica are the strip rather than its units.

The write is `writeLaneWidths` clause for clause — one `updateIndex` bracket,
the same stamp behaviour, the same three do-nothing paths — with two new
`WriteOperation` cases and two new undo verbs rather than one of each, because
a banner or an Edit-menu row that said "resize" after Collapse Lane would name
a control the user never touched.

Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
2026-08-08 22:53:10 -04:00
parent 57542177c1
commit bab456c08d
33 changed files with 1811 additions and 133 deletions
+24 -1
View File
@@ -2969,6 +2969,24 @@ public enum WriteOperation: Sendable, Equatable, CustomStringConvertible {
/// nobody could confuse for another.
case setBoardBackground
case resize(title: String?) // a lane's `width` the edge drag and the stepper alike (03-board-ui.md § Lane)
/// **A lane folded to its slim strip** the `collapsed: true` write (03-board-ui.md § Lane
/// Collapsed lanes; `BoardStore.setLaneCollapsed`).
///
/// **Its own case rather than a fold into `.resize`**, on the vocabulary's standing reasoning: the
/// two keys sit side by side in a lane's frontmatter and both change how wide the lane draws, but
/// the user pressed *Collapse Lane* and a banner telling them the app "couldn't resize 'Todo'"
/// would name a gesture they never made and a control (the stepper, the edge drag) they never
/// touched.
///
/// **And its own case rather than one shared with `.expand`**, which is `.delete`/`.restore`'s
/// split one rung down: the two directions are two menu rows with two words, and neither
/// direction's failure may be announced in the other's verb.
case collapse(title: String?)
/// **A collapsed lane unfolded** the write that *removes* `collapsed` (the remove-at-default
/// family; `FrontmatterKeys.collapsed`). See `.collapse` for why the pair is two cases.
case expand(title: String?)
/// An inline title editor's commit the third inline editor's write (04-interactions.md
/// Grammar). Its own case rather than a fold into `.style`: "the vocabulary grows with the
/// surfaces" is settled (02-architecture.md § Write-failure surfacing, which names
@@ -3223,6 +3241,8 @@ public enum WriteOperation: Sendable, Equatable, CustomStringConvertible {
case .migrateTombstone: .migrateTombstone(title: title)
case .style: .style(title: title)
case .resize: .resize(title: title)
case .collapse: .collapse(title: title)
case .expand: .expand(title: title)
case .rename: .rename(title: title)
case .duplicateBoard: .duplicateBoard(title: title)
case .saveAsTemplate: .saveAsTemplate(title: title)
@@ -3269,7 +3289,8 @@ public enum WriteOperation: Sendable, Equatable, CustomStringConvertible {
// reading to be about and `.deleteComment`'s move into `comments/.trash/` stamps for the
// plain container reason its board-level twin does.
case .createBoard, .createLane, .createCard, .move, .copy, .delete, .purge, .migrateTombstone,
.style, .resize, .rename, .duplicateBoard, .saveAsTemplate, .paste, .importAttachment,
.style, .resize, .collapse, .expand, .rename, .duplicateBoard, .saveAsTemplate, .paste,
.importAttachment,
.listAttachments, .removeAttachment, .relocateLooseFile, .agentGuide, .seedGitignore,
.mintBoardIndex, .stampSchema, .setBoardBackground,
.displaceClaimedName,
@@ -3300,6 +3321,8 @@ public enum WriteOperation: Sendable, Equatable, CustomStringConvertible {
case let .style(title): Self.phrase("style", title)
case .setBoardBackground: "set this board's background"
case let .resize(title): Self.phrase("resize", title)
case let .collapse(title): Self.phrase("collapse", title)
case let .expand(title): Self.phrase("expand", title)
case let .rename(title): Self.phrase("rename", title)
case let .duplicateBoard(title): Self.phrase("duplicate board", title)
case let .saveAsTemplate(title): Self.phrase("save as template", title)