Skip to content

fix(app): process first CLI TUI input#280

Open
konard wants to merge 2 commits into
ProverCoderAI:mainfrom
konard:issue-274-1f6a9d48fe85
Open

fix(app): process first CLI TUI input#280
konard wants to merge 2 commits into
ProverCoderAI:mainfrom
konard:issue-274-1f6a9d48fe85

Conversation

@konard
Copy link
Copy Markdown
Contributor

@konard konard commented May 12, 2026

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" and skipInputs: 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 from cold to active.

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

  • Fresh CLI TUI snapshots now start with inputStage: "active" and skipInputs: 0.
  • The cold-stage input handler no longer drops semantic menu inputs; it activates and processes the first valid key in the same transition.
  • Existing post-interactive SSH/session handoff protection remains intact via restoreMenuAfterInteractiveEffect(... skipInputs: 2).
  • Removed the placeholder .gitkeep that was only used to bootstrap this PR branch.

Mathematical guarantees

  • Invariant: forall key in ValidMenuInput: ready(menu) and not busy(menu) and not sshActive(menu) -> processed(key).
  • CORE/SHELL boundary: bootstrap noise filtering remains in the Gridland shell gate (ready / ignoreUntil), while the pure input routing layer no longer discards valid domain events.
  • SOURCE: n/a.

Tests

  • bunx vitest run packages/app/tests/docker-git/menu-input-handler.test.ts
  • bun run --cwd packages/app lint:tests
  • bun run --cwd packages/app lint
  • bun run --cwd packages/app lint:effect
  • bun run --cwd packages/app typecheck
  • bun run check

Environment note: bun run --cwd packages/app test and full direct bunx vitest run were 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.

konard added 2 commits May 12, 2026 09:49
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: ProverCoderAI#274
@konard konard changed the title [WIP] Почему-то CLI TUI не работает fix(app): process first CLI TUI input May 12, 2026
@konard konard marked this pull request as ready for review May 12, 2026 10:22
@konard
Copy link
Copy Markdown
Contributor Author

konard commented May 12, 2026

Working session summary

Implemented 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:

  • Local targeted regression test passed.
  • Local lint, Effect lint, typecheck, and bun run check passed.
  • GitHub Actions for SHA 8090c62c62d62b1dd61aca06d2fecca146aefdc7 all passed: Check, Checking Dependencies, Snapshot.
  • PR is marked ready for review, merge state is CLEAN.
  • Working tree is clean.

SOURCE: n/a


This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Contributor Author

konard commented May 12, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $20.312756

📊 Context and tokens usage:

  • 272.7K / 1.1M (26%) input tokens, 29.9K / 128K (23%) output tokens

Total: (272.7K + 16.2M cached) input tokens, 29.9K output tokens, $20.312756 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (44390KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Contributor Author

konard commented May 12, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@skulidropek
Copy link
Copy Markdown
Member

тут проблема была в том что он не загружал проекты хотя через browser версию всё работало

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Почему-то CLI TUI не работает

2 participants