Skip to content

fix(core): a question mark stays until the question is answered (#144) - #145

Merged
Maxaubert merged 3 commits into
mainfrom
fix/144-question-stays
Oct 10, 2026
Merged

Maxaubert merged 3 commits into
mainfrom
fix/144-question-stays

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #144.

Owner, 2026-10-09: "if you go on that tab and then just move to another tab without answering the question, the blue bar shouldn't disappear ... it should only disappear if you actually answered the question."

Root cause

useAgentIndicator's look effect treated a question like news: setQuestionIds(... activeId && focused && prev.has(activeId) ? without(prev, activeId) ...) took the mark down the moment the tab was in front with the window focused. Every raise path (hook, Codex title, Claude's screen box) was also gated on nobody looking.

Fix (core, so Prism gets it too)

  • A question is a state now: raisedWhileSeen('question') (agentHookState) lets it go up on the tab in front, and the look effect no longer clears it. Finished and Failed keep the look-clears rule.
  • It goes when answered: a working hook or title, a done/failed hook, the agent leaving (now also cleared on the poll's "gone"), or the tab closing.
  • A "No" on a permission prompt or an Esc on a question fires no hook, so the panel now reports keys on termBus (reportTermKey, xterm onKey, nothing kept) and a key that settles a box (Enter, Esc, Ctrl+C, a digit; answersQuestion) clears it once the box has gone from the screen (questionAnswered, read at 250 ms and 1 s). Arrows do not; a box still up (the next of several questions) keeps it.
  • The taskbar badge needed no change: it counts questionIds, so it counts the question until it is answered.
  • On the active tab the 3 px question line sits under the label with the accent rule on top, as on any tab (.e2e-shots/attention-question-active.png).

Versions: core 0.27.0 -> 0.27.1, app 0.34.0 -> 0.34.1. The core bump will open the Prism bump PR as usual.

Tests

  • Unit: raisedWhileSeen, answersQuestion, questionAnswered. typecheck, lint (0 errors), npm test 1482 passed.
  • e2e (one at a time, parked): attention 20/20, agentHooks 30/30, indicator 9/9. New checks: opened then left, the question line and badge stay; answering (work title / Enter with the box gone / a working hook) clears it; ArrowDown does not; a question asked on the tab in front marks it. The new attention checks FAIL on main's indicator (4 fails), so this is a ratchet.

Hands-on: a real Claude permission prompt answered "No", and an AskUserQuestion with several questions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

Maxaubert and others added 3 commits October 9, 2026 23:15
Opening a tab with a pending question used to clear its Question line, so
leaving it unanswered lost it. A question is now a state: it goes up on the
tab in front too, a look never takes it down, and the taskbar badge counts
it until the agent works again, says another state, leaves, the tab closes,
or a key that settles the box (Enter, Esc, Ctrl+C, a digit) leaves the box
gone from the screen. Finished and Failed keep the look-clears rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
…wer check (#144)

Review of #145. A hooked session's screen is read only after an answering
key, so two reads in one second left the line up until the next prompt when
the repaint came late; it now reads at 250 ms, 1 s, 2.5 s and 5 s. A new
question (hook or Codex title) cancels pending reads, so a read in the gap
before its box is drawn cannot take it down unanswered. The attention e2e
now checks the active tab's line is a visible 3px colour, not only present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
@Maxaubert
Maxaubert merged commit fd6bd2f into main Oct 10, 2026
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 10, 2026
#145)

* fix(core): a question mark stays until the question is answered (#144)

Opening a tab with a pending question used to clear its Question line, so
leaving it unanswered lost it. A question is now a state: it goes up on the
tab in front too, a look never takes it down, and the taskbar badge counts
it until the agent works again, says another state, leaves, the tab closes,
or a key that settles the box (Enter, Esc, Ctrl+C, a digit) leaves the box
gone from the screen. Finished and Failed keep the look-clears rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

* fix(core): a late repaint or a fresh question no longer loses the answer check (#144)

Review of #145. A hooked session's screen is read only after an answering
key, so two reads in one second left the line up until the next prompt when
the repaint came late; it now reads at 250 ms, 1 s, 2.5 s and 5 s. A new
question (hook or Codex title) cancels pending reads, so a read in the gap
before its box is drawn cannot take it down unanswered. The attention e2e
now checks the active tab's line is a visible 3px colour, not only present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

Question mark should stay until the question is answered

1 participant