Skip to content

feat(tui): error dismiss, quick question selection, contextual Blue footer, UI cleanup - #1039

Merged
PurpleCHOIms merged 6 commits into
mainfrom
feat/tui-error-polish
Oct 22, 2026
Merged

PurpleCHOIms merged 6 commits into
mainfrom
feat/tui-error-polish

Conversation

@PurpleCHOIms

Copy link
Copy Markdown
Member

Partially addresses #1034

What

  • Esc-to-dismiss errors: ErrorMessage accepts onDismiss (esc) with a dim 'esc to dismiss' hint; useAgent exposes clearError and both render sites (prompt + transcript) pass it through.
  • Quick question selection: QuestionPicker accepts 1–n number keys (single-select submits, multi-select toggles, Other opens the input) — the list was already numbered.
  • Contextual Blue footer: renders only while monitoring is connected or unread notifications exist, instead of every session.
  • Dead code removal: SessionPicker (141 lines, unreferenced — sessions use CommandPicker) and SpinnerIcon (unused).
  • Blue notification templates → English, matching the rest of the TUI (per-run agent language stays server-controlled via the engagement middleware).

Deliberately deferred (needs design; happy to follow up)

  • One-shot auto-reconnect + 'Reconnecting…' indicator (touches run lifecycle)
  • Transcript-mode interactivity (scroll / slash input)

Compatibility

Pure Ink/React primitives only — no platform-specific behavior (macOS / Linux / WSL2 / Windows terminals).

Verification

  • tsc --noEmit clean
  • vitest 222/224 in the full suite; the 2 threadStore auth failures also fail identically without this change and pass 3/3 standalone (parallel-run interference)
  • Blue notification strings now Korean-free (grep-verified)

Implementation commit: ed5baa4

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T06:23:29.986700Z ed5baa4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed5baa4620

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +92 to +94
// The option list is numbered in the UI; accept the same number keys
// for quick selection without changing the arrow-key flow.
const number = Number(_input);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Record the user-visible TUI changes in CHAGELOG

Add these user-visible error-dismissal, question-selection, and footer changes to the root CHAGELOG.md under Unreleased, including the proposed PR link; this commit changes interactive behavior without the release-history entry required for every PR.

AGENTS.md reference: AGENTS.md:L3-L8

Useful? React with 👍 / 👎.

Comment on lines +34 to +38
useInput(
(_input, key) => {
if (key.escape) onDismiss?.();
},
{ isActive: onDismiss !== undefined },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent error dismissal from interrupting the active run

When a server error is displayed while runState is still streaming, pressing the advertised Escape key invokes this handler and the non-modal global handler, whose streaming Escape path calls onInterrupt; in transcript mode it also exits the transcript. Thus following the new dismissal hint can unexpectedly pause the live run or navigate away. Give error dismissal priority in the global keybinding flow or otherwise suppress the conflicting handler.

Useful? React with 👍 / 👎.

Comment on lines +95 to +97
if (Number.isInteger(number) && number >= 1 && number <= options.length) {
const next = number - 1;
if (allowOther && next === otherIndex) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the numbered Other entry in shortcut bounds

When allowOther is true, the rendered Other entry is numbered options.length + 1, but this guard only accepts numbers through options.length. Consequently next === otherIndex is unreachable, so pressing the displayed number for Other does nothing instead of opening the text input as intended.

Useful? React with 👍 / 👎.

mschoi added 3 commits October 22, 2026 09:53
…ooter, UI cleanup

- ErrorMessage accepts onDismiss (esc) with an 'esc to dismiss' hint;
  useAgent exposes clearError and both render sites pass it through.
- QuestionPicker accepts 1..n number keys for quick selection (single
  select submits, multi-select toggles, Other opens the input).
- Blue footer renders only while monitoring is connected or unread
  notifications exist, instead of every session.
- Remove dead code: SessionPicker (141 lines, unreferenced) and
  SpinnerIcon (unused).
- Blue notification templates use English to match the rest of the TUI
  (per-run agent language remains server-controlled).

Deferred from #1034 as needing design: one-shot auto-reconnect with a
'Reconnecting…' indicator, and transcript-mode interactivity (scroll /
slash input). Pure Ink primitives — cross-platform (macOS/Linux/WSL2/
Windows).

Partially addresses #1034
The first i18n pass had not persisted (working-tree translation lost across
branch switches) — this re-applies and verifies the templates are Korean-free,
and updates the blue notification tests to the English templates.
threadStore failures in the full suite are pre-existing (pass standalone).

Partially addresses #1034
@PurpleCHOIms
PurpleCHOIms force-pushed the feat/tui-error-polish branch from b9ec66c to 8d70472 Compare October 22, 2026 00:53
mschoi added 3 commits October 22, 2026 17:31
# Conflicts:
#	clients/cli/src/screens/REPL.tsx
The quick-number range check stopped at options.length, so the numbered
Other entry (options.length + 1) could only be selected with the arrow
keys and the number branch for it was dead code. Gate on totalEntries
instead; add regression tests for number submit, Other-by-number, and
numbers past the last entry.
@PurpleCHOIms
PurpleCHOIms merged commit 9caca32 into main Oct 22, 2026
29 checks passed
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.

1 participant