fix(panel): remove dead Input onEscape callbacks — Escape cancels (#63) - #74
Merged
Merged
Conversation
The panel's handleInput intercepts Escape in every modal branch BEFORE the active pi-tui Input sees it, so pi-tui's Input.onEscape never fired — all 15 assignments (link/task/lc*/sched*/resume/steer/tiers/wfPrompt) were dead code, and several promised 'Escape accepts the default' semantics that never existed. - remove all 15 dead onEscape callbacks - remove the unreachable escape check in the lcRevising branch (same dead-code class — the panel-level intercept resolves the checkpoint as abort first) - document the Escape policy in handleInput: Escape cancels; defaults via Enter-on-blank. Caveat documented: ctrl+c also matches tui.select.cancel but is forwarded (Input ignores control chars) — a no-op since this PR; pre-PR it could fire the execute-type onEscape callbacks (accidental launches), so the removal is also a safety improvement, not a pure no-op. - fix the stale SPEC-6-5 comment on lcCwdInput - align SPEC-6-5 spec §3.5 to the actual behavior: Escape cancels the run Default paths unchanged: blank-Enter already accepted defaults on every step that had an accept-default onEscape (name→'default', cwd→parentCwd, link→undefined, fork task→run.task). Closes #63
rz1989s
force-pushed
the
fix/63-dead-onescape
branch
from
August 29, 2026 13:30
a1ebee2 to
bb26981
Compare
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.
Problem
FleetPanel.handleInputintercepts Escape in every modal branch (wf/steer/tiers/resume/sched/lc/run) before forwarding to the activeInput— so pi-tui'sInput.onEscapenever fires. All 13onEscapeassignments infleet-panel.tswere dead code, and several (link-input, sched-name, lc-name, lc-cwd) promised "Escape accepts the default" semantics that never existed in practice.Fix (option (a) per the issue)
onEscapecallbacks.handleInput: Escape always cancels the active flow; defaults are accepted via Enter-on-blank.lcCwdInput(claimed "Escape accepts the default").No behavior change
Blank-Enter already covered every accept-default path:
name.trim() || "default"· lc cwd:cwd.trim() || parentCwdtodoIdRaw.trim() || undefined· fork task:task.trim() || run.taskThe rendered prompts already say
esc cancel— now the code matches.Gates
pnpm typecheck— pass (standalone)pnpm test:run— 722/722Closes #63