fix(app): process first CLI TUI input#280
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#274
Working session summaryImplemented and finalized PR #280: #280 Fixed the CLI TUI first-input bug by removing the cold-start swallow behavior and making fresh menu snapshots start with active input handling. Updated regression coverage in menu-input-handler.test.ts, with the implementation change in menu-input-handler.ts and menu-state.ts. Verification:
SOURCE: n/a This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (272.7K + 16.2M cached) input tokens, 29.9K output tokens, $20.312756 cost 🤖 Models used:
📎 Log file uploaded as Repository (44390KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
|
тут проблема была в том что он не загружал проекты хотя через browser версию всё работало |
Summary
Fixes #274: the CLI TUI could appear ready while the first real user inputs were still ignored.
Root cause
A fresh menu snapshot started with
inputStage: "cold"andskipInputs: 2. After the readiness/time gate had already finished, the Gridland input boundary could still consume two valid user key events, and the pure menu input handler also intentionally dropped the first single-character alias, arrow, or Enter event while moving fromcoldtoactive.That violates the TUI liveness invariant: once the rendered menu is ready and not busy, a valid user key should be processed without requiring dummy keypresses.
Fix
inputStage: "active"andskipInputs: 0.restoreMenuAfterInteractiveEffect(... skipInputs: 2)..gitkeepthat was only used to bootstrap this PR branch.Mathematical guarantees
forall key in ValidMenuInput: ready(menu) and not busy(menu) and not sshActive(menu) -> processed(key).ready/ignoreUntil), while the pure input routing layer no longer discards valid domain events.Tests
bunx vitest run packages/app/tests/docker-git/menu-input-handler.test.tsbun run --cwd packages/app lint:testsbun run --cwd packages/app lintbun run --cwd packages/app lint:effectbun run --cwd packages/app typecheckbun run checkEnvironment note:
bun run --cwd packages/app testand full directbunx vitest runwere attempted locally, but this runner terminated them with SIGTERM before a Vitest assertion failure was emitted. The focused regression test and static/type checks above passed; CI should run the complete matrix on the pushed SHA.