Implement live search filtering
The board's live title+body filter per 04-interactions.md § Search: - SearchFilter — a pure value folding the query once (case- and diacritic-insensitive substring, locale-stable); title OR body matches, attachment filenames never searched; only the literal empty string is inactive. - One universe: the filter threads through SelectionGrammar's order lists as a defaulted parameter, so ranges, Select All, arrow navigation, the marquee, drop zones, count badges, and the shown trash all read the same filtered set by construction; lanes are deliberately never filtered out (an emptied lane keeps its slot with a 0 badge). Hidden cards leave the selection through the existing constrain primitive, run on every query change and as the last line of the reload resolve; the delete successor is filtered so ⌫ never selects a hidden neighbour. - The field: an NSSearchField-backed toolbar item (the toolbar's sole default item); Edit ▸ Find ⌘F focuses it through a focused-value presentation; stock field-editor dispatch — Return swallowed, Tab is the keep-filter path to the board, board commands stay enabled except the caret-chord pair, now one shared caretChordsYield expression. - Escape is staged: clear the non-empty query (focus stays), hand an empty field back to the board, clear an active search from board focus — before Escape's clear-selection meaning. - Creating a card clears the search (the placeholder funnel); a rename deliberately gets no carve-out; filter reflow rides the content spring keyed narrowly on the query. 903 unit tests (24 new). Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -159,6 +159,19 @@ struct KanbanApp: App {
|
||||
TrashCommands()
|
||||
}
|
||||
|
||||
// The Edit menu's one row of ours: Find (⌘F), placed after the standard Cut/Copy/Paste/
|
||||
// Select All group, which is where macOS puts Find. Undo/Redo and the clipboard items are
|
||||
// the system's and the board answers them as a responder (`ClipboardCommands.swift`) — a
|
||||
// second item sharing one of those titles is what titles-are-API forbids.
|
||||
//
|
||||
// m6-card-window: Find Next / Find Previous (⌘G/⇧⌘G) join here, scoped to the card window's
|
||||
// find bar and "disabled in the board window — board search is a live filter, not a cursor"
|
||||
// (11-command-nexus.md). They wait for the window that owns them rather than shipping as two
|
||||
// permanently disabled rows.
|
||||
CommandGroup(after: .pasteboard) {
|
||||
FindCommand()
|
||||
}
|
||||
|
||||
// The View menu. `CommandGroupPlacement.toolbar` *is* View — the menu the toolbar's own
|
||||
// items live in — which is where 11-command-nexus.md files Show Trash, alongside the card
|
||||
// window's Edit Body / Raw Source / History still to come.
|
||||
|
||||
Reference in New Issue
Block a user