Repository navigation
[CTX-0723] feat(present): wire fold/hint/composer into live input path - #1312
Merged
Merged
Conversation
Leader chord (OQ-088, via #1307) arms a live hint session from the single cross-panel engine: operator+label keystrokes dispatch with prefix completion behind the operator-conflict gate, with fail-open timeout expiry and Esc cancel. Fold verbs (fold_toggle/expand/collapse) resolve the focused view's latest OSC 133 command block. Composer opens for real with modal input routing and single-frame PTY submit; the $EDITOR request stays a loud routing flag (no terminal fd in the GUI root). Fold persistence replays anchor ordinals; provider unregister completes the P6 dispose symmetry. Engine now includes command targets by default (headless-neutral). Tests: 14 runtime integration (cw_uipresent.rs), 5 app intercept, 1 config. fmt/clippy/test green (workspace). Closes #980, Closes #983, Closes #984. Relates #981, #982, #985, #990, #1088 (HOLD, see per-issue comments). Task: CTX-0723
This was referenced Sep 23, 2026
added 2 commits
September 23, 2026 14:57
This was referenced Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Priority: P1 | Area: area:ui | Labels: feat,P1,area:ui | Milestone: v0.1.0 | RFC: ui-compositor-gap-analysis.md gap 1; semantic-terminal-rfc.md P1/P2/P3/P4/P5/P6 | Task: CTX-0723
Wires the CW present candidates into the live app input path (present-path state, keymap dispatch, modal routing), on top of CTX-0700 headless ownership and the OQ-088 Leader contract (#1307).
Closes #980
Closes #983
Closes #984
Relates #981, #982, #985, #990, #1088 (HOLD — per-issue comments with precise gaps).
What lands
fold_toggle/fold_expand/fold_collapsekeymap actions (parse + canonical + aliases, never in defaults) dispatch throughapply_fold_verbtoRuntime::cw_fold_latest, which resolves the focused view's latestOSC 133command block fail-closed (no marks, no target). Live fold projection feeds every present derivation.resolve_leader_for) and arms a live hint session from the single cross-panel engine in a new modal tier (below copy/search, above user keymap). Operator+label keystrokes feedcw_hint_push_keywith prefix-completion dispatch behind the operator-conflict gate; expiry fail-opens to the shell, Esc cancels. No PTY byte leaks (tested).open_composeropens the live session for real; while open the press routes tocw_composer_feed; Ctrl+Enter writes exactly one bracketed frame to the focused PTY via the single input router.CwHintEngine::unregister_provider+Runtime::cw_hint_unregistercomplete the P6 dispose symmetry; the live engine now includes command targets by default (headless-neutral: zero zones yield zero targets).cw_fold_snapshot_ordinals/cw_fold_restore_ordinals, idempotent, fail-closed past the fold cap); ordinal anchors ride every present plan.ComposerKey(Event),DispatchOutcome,HintScope) sobitty-appconsumes the path without a directbitty-richdependency.What stays HOLD (partial wiring only, gaps named in code + comments)
Follow-ups named (not silent)
Evidence
crates/bitty-runtime/tests/cw_uipresent.rs: 14 tests (fold-latest verbs, arm/feed/disarm/conflict-gate/prefix-completion, submit-to-PTY frame bytes, unregister lifecycle, snapshot/restore incl. cap saturation).chrome_keys.rsheadless intercept tests: 5 (fold verbs, Leader arm + dispatch with zero PTY bytes, Esc/expiry, composer typing + submit frame bytes).keymap.rs: fold-verb parse/canonical/never-default test.cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warnings,cargo test --workspace --all-targets --locked: green.Task: CTX-0723