ADR-0052 vestigial-source unwind; H2 contextual hint (F1 keybinding + `hint` command) fully implemented Phases A–D, closing A1 + H2. 4 issues filed (#35–#38, incl. 3 hint/help deferrals). CI branch merged into main mid-session (D1 release work now on main). 2499 pass / 1 ignored, clippy clean.
8.8 KiB
Session handoff — 2026-06-15 (70)
Seventieth handover. Continues from handoff-69 (which closed the last
four Gitea issues and left the tracker empty). This session did the
ADR-0052 follow-up (unwinding vestigial worker source plumbing),
then designed and fully implemented H2 — the contextual hint
command + F1 keybinding (ADR-0053) end to end (Phases A–D). The CI
branch was also merged into main mid-session (not my work — see §5).
Net: 2 feature areas shipped, 1 new ADR (0053) + 1 ADR amendment
(0052), 4 new Gitea issues (#35–#38), the hint corpus (~57 teaching
blocks), and A1 + H2 closed in requirements.md.
§1. State at handoff
Branch: main. Working tree clean; all work committed. Commits
are local (push is the user's step).
Tests: 2499 passing / 0 failing / 0 skipped / 1 ignored (the
long-standing friendly doctest). Clippy clean (nursery, all
targets). Breakdown: 1799 lib + 500 it + 200 typing-surface-matrix.
Open Gitea issues (4, all enhancement, all filed this session):
- #35 — enforce
cargo fmtacross the codebase (single reformat + CI gate). The tree is not fmt-clean (~1800 pre-existing diffs); do it once, coordinated with CI, before first publication. - #36 —
helpcollapses advanced-SQL forms onto their simple sibling (ahelp-list dedup artifact); they deserve distinct help content. - #37 —
hintclause-concept hints (on deleteactions, constraint slots,with pk, cardinality) — a deferredhint.concept.<topic>layer. - #38 —
hintpre-submit-diagnostic route + the ~33diagnostic.*tier-3 blocks (deferred;Diagnosticcarries no class key).
§2. ADR-0052 follow-up — vestigial worker source unwind (e8fa859)
The first task from handoff-69 §3. ADR-0052 moved success-journaling out
of the worker, leaving the source that handlers threaded purely for the
old history.log write dead. Bigger than the handoff estimated (it
framed it as ~28 call-site edits): the cascade ran through ~30 worker
handlers + the DescribeTable/QueryData/RunSelect request fields +
their DatabaseHandle methods (~164 mostly-test call sites). Fully
unwound, compiler-guided, no behaviour change (journaling uses a
source_for_journal clone at the spawn, independent of the worker). The
only worker source left is the snapshot/undo label. Amended ADR-0052
Consequences + README. (Two scope forks escalated + user-approved.)
§3. H2 — contextual hint (ADR-0053), Phases A–D — shipped
The bulk of the session. ADR-0053 settles the hint slot ADR-0003 left
"ADR pending"; closes A1 (all 15 app commands now exist) and
requirements H2. Read ADR-0053 before touching this area — it went
through three revisions and several user decisions.
The design (all user-chosen)
- Two surfaces: an F1 keybinding → tier-3 hint for the live
partial input (read-only overlay — never touches buffer/cursor/memo);
a submitted
hintcommand → expands on the most recent runtime error. No topic arg (contextual only;help <topic>owns reference). - Tier-3 teaching layer beneath the existing tier-1 (colour / error
headline) and tier-2 (ambient one-liner; the error
hint:shown by default sinceVerbosity::Verboseis the default). Each block iswhat/example/concept, rendered as aHintheading + aligned labels. - Per-form keying (Phase-B revision — the original per-node
hint_idwas too coarse for multi-form commands likeadd/drop/show): a newhint_ids: &[&str]field onCommandNodemirroringusage_ids, resolved byhint_key_for_input_in_mode(reusesusage_key's form-word disambiguation + a mode-primary fallback for shared entry words so advancedinsert→sql_insert, simple →insert). - Comprehensive for v1 = command forms + 9 runtime error classes
(the ~33
diagnostic.*classes were deferred, #38 — see §4).
Key files
src/dsl/command.rs—AppCommand::Hint.src/dsl/grammar/app.rs—HINTnode +build_hint.src/dsl/grammar/mod.rs— thehint_idsfield,hint_key_for_input_in_mode, the factoredpick_form_key, and the two comprehensiveness coverage tests (every node has a resolvinghint.cmd.*; every runtime error class has ahint.err.*).src/app.rs— F1 arm inhandle_key(read-only overlay, placed before the completion-memo clear);note_hint_for_input/note_hint_for_recent_error/note_getting_started/emit_tier3_block;last_error_hint_keystate (set inhandle_dsl_failure, cleared insubmitfor DSL commands).src/friendly/translate.rs—error_hint_class(maps aDbError+ ctx to itshint.err.<class>; mirrorstranslate's dispatch — keep in sync, unit-tested).src/friendly/strings/en-US.yaml+keys.rs— the corpus underhint.cmd.<form>/hint.err.<class>+hint.block.*labels +shortcut.hint.src/ui.rs— ADR-0051 strip advertises F1 (editing + default states); 12 full-panel snapshots re-accepted.
Phases (one commit each unless noted)
- A (
050b363) skeleton + tier-2 fallback; B (4a5fd1b) per-form keying + 3 exemplars; C content in 5 batches (4bdfce6app,6429b56DDL,9c4d520DML,97970f2advanced-SQL,b6b98adruntime errors) +417cbc8diagnostic deferral; D (447112b) coverage gate- F1 strip + status flips; /runda fix (
329adfc) — see §3.1.
- F1 strip + status flips; /runda fix (
3.1 — what the final /runda caught (don't skip)
Per-batch substring tests masked a presentation gap: emit_tier3_block
was emitting three bare, unlabelled lines, deviating from the approved
exemplar format. Fixed to render a Hint heading + aligned What: /
Example: / Concept: lines, locked by an insta snapshot
(hint_block_insert). Also confirmed the Next: line (ADR D2 exemplar)
is correctly omitted — tier-2 ambient already owns live
position-awareness. Lesson for the next content/UI work: add a rendered
snapshot early; substring asserts don't see layout.
§4. Deferrals (all tracked, all user-confirmed)
- #38 diagnostic route +
diagnostic.*blocks —Diagnostic(walker/outcome.rs) carries only its renderedmessage, not a class key, so the F1 diagnostic route would need aclassfield threaded through every diagnostic site (broad) for marginal value (tier-2 already surfaces diagnostics; many duplicate runtime classes). F1 still shows the useful command block when a diagnostic is present. - #37 clause-concept hints — per-form is the right tier-3 granularity;
clause-level concepts are a separate
hint.concept.<topic>layer for later. - #36
helpadvanced-SQL — out of H2's scope (touches shippedhelp).
§5. CI branch merged into main (not my work)
Mid-session the ci branch was merged (commits 47a0816, 138e766
- the
ci:/build:/docs(ci):commits).mainnow carries a CI pipeline, a nix flake, and D1 cross-platform release builds (matrix + macOS), documented under a newdocs/ci/adr/namespace (ci-001..003). Implications for the roadmap: D1 (cross-platform binaries) is now substantially underway — re-assess D1/D2/D3 status against what landed before treating them as open. My H2 work is layered cleanly on top (all green post-merge).
§6. Next session — start here
- Push (user step) — 30-odd local commits incl. the CI merge + all of H2.
- Re-baseline the roadmap against the merged CI work: D1/D2/D3 and
TT5 CI are partly/largely done now — read
docs/ci/adr/and the workflows before assuming they're open (handoff-69 §5 predates this). - #35 (cargo fmt gate) is the natural pairing with the now-merged CI — the user wanted it done once, before first publication.
- Other
requirements.mdopen items (verify against CI merge first): TT4 PTY tier-4 (still unwired), I1 multi-line input, I5/B3 in-flight cancellation, V4 session journal (own ADR), TU1 tutorial system (own ADR). H2/A1 are now done. - The H2 deferrals (#36/#37/#38) are available if the user wants to round out the hint/help surface.
§7. How to take over
- Read handoffs 68 → 69 → 70,
CLAUDE.md,docs/requirements.md. - Confirm green:
cargo test(expect 2499 pass / 1 ignored) +cargo clippy --all-targets(clean). - Read
docs/ci/adr/(the merged CI work) before touching CI/release/D*. - For anything in the
hintarea, read ADR-0053 first (3 revisions- deferrals #37/#38). For journaling, ADR-0052 (+ its 2026-06-14 follow-up note).
- Project workflow unchanged: phased, test-first,
/runda+ DA before commits, ADR amendment + README index-upkeep for decided-area changes, confirm commit messages with the user. - Consider a
cargo sweepat this milestone (target/grows; see CLAUDE.md "Build hygiene").