phase 7: query blocks UI
- Ctrl+Shift+Q toggles the focused block into/out of a query block (persisted as a 'query' property, not special content syntax)
- hand-rolled Scheme tokenizer (scheme_highlight.rs) for syntax highlighting + multi-line matching-paren indication in BlockEditor; documented the tree-sitter-vs-hand-rolled tradeoff in design.md
- debounced background evaluation via eval_query, off the UI thread (background OS thread + oneshot channel awaited from a foreground gpui::Task), with a per-block generation counter guarding stale results
- outline-slice and sortable-table result rendering, Markdown-formatted (not raw source), indented and visually distinct from ordinary rows
Fixes along the way:
- query_eval_generation was a single global counter; scheduling one query block's lazy eval could invalidate another block's in-flight debounced eval as 'stale', permanently stranding an error result since an error still counts as a cached result and skips the lazy-retry path. Made per-block.
- result list items now render through the Markdown pipeline instead of showing raw source
- fixed result indentation (missing the fold-column allowance every row reserves) and the result background (was using padding, which paints under itself, instead of margin, which actually moves the box) so the result reads as an inset card nested under the query, not a full-width block flush with it
Phase 7 (Query Blocks UI) complete: 7.1-7.5.
graham.systems
(Jul 12, 2026, 2:52 PM -0700)
92395638
6579350a