feat(question-card): click the session row to focus the asking terminal - #325
Open
mutoe wants to merge 1 commit into
Open
feat(question-card): click the session row to focus the asking terminal#325mutoe wants to merge 1 commit into
mutoe wants to merge 1 commit into
Conversation
The question card offered no way back to the conversation. When an AskUserQuestion / plan-mode prompt pops up, the only exits are answering an option or Skip — and Skip denies the request and drops it from the queue rather than deferring it, so there was no safe way to say "let me read the terminal first". The approval card already does this: clicking it focuses the owning terminal. QuestionBar simply never received the session to do it with — it got session?.source and session?.cwd as plain strings, even though the construction site already holds the full SessionSnapshot. Extract the driver both cards need — activate terminal, poll to verify the jump landed, collapse on success, error sound + shake on failure — into startNotchCardJump, parameterised by NotchCardKind so a jump only collapses the surface it started from. ApprovalBar behaviour is unchanged; SessionCard is left alone. QuestionBar's session-context row becomes the jump target, with a hover highlight and an arrow glyph so the affordance is discoverable. The question text stays unclickable on purpose: that line is what the user is reading. Collapsing after a jump does not answer or discard the question — it stays queued and answerable, in the terminal or back on the card.
nguyenvanduocit
pushed a commit
to nguyenvanduocit/CodeIsland
that referenced
this pull request
Aug 26, 2026
…badge, T-088 question card jump) New open PRs on wxtsky/CodeIsland (Aug 25, 2026): - T-088: PR wxtsky#325 — click question card to jump to asking terminal (medium, S; depends on T-036) - T-087: PR wxtsky#326 — multiplexer badge chip on session cards (low, XS; depends on T-055) Both gated on upstream merge. Upstream otherwise quiet 11 days since v1.0.32. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UXGjprGYFRNkJMwaYmddBJ
nguyenvanduocit
pushed a commit
to nguyenvanduocit/CodeIsland
that referenced
this pull request
Aug 29, 2026
…1.0.32) No new commits on wxtsky/CodeIsland or vibeislandapp/vibe-island since Aug 26. Issues wxtsky#327 (Qoder) and wxtsky#328 (Codex) are non-Claude CLI specific. PRs wxtsky#314, wxtsky#323, wxtsky#325, wxtsky#326 remain open and watching. No actionable items. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T4KU8w1bHuFtRzeNAvW1bn
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
The question card offers no way back to the conversation that asked the question.
When an
AskUserQuestion/ plan-mode prompt pops up, the only exits are answering an option or Skip. Skip is not "hide this for now" — it denies the request and drops it from the queue (as explained in #210), so there is no safe way to say "let me go read the terminal first."The approval card already solves exactly this: clicking it focuses the owning terminal. The question card just never got wired up.
QuestionBarreceives onlysession?.sourceandsession?.cwdas plain strings, even though the construction site one screen away already has the fullSessionSnapshot:So
TerminalActivator.activatehad exactly two call sites:ApprovalBarandSessionCard.Change
1. Extract the shared jump driver.
ApprovalBar.handleCardClick()held ~60 lines — activate terminal, poll 3× with increasing delays to see whether the jump landed, collapse on success, error sound + shake on failure. Rather than paste a third copy, it moves tostartNotchCardJump(kind:session:sessionId:appState:autoCollapseAfterJump:shakeOffset:).ApprovalBarbehaviour is preserved line for line;SessionCardis untouched (its jump has slightly different semantics around remote sessions, so it stays as it is).The only thing that differed between the two cards is which surface may auto-collapse, now a
NotchCardKind.2. Wire up
QuestionBar. It gainssession/sessionId/appState, and the "CLI icon + project folder" row becomes the jump target — with a hover highlight and an↗glyph, so the affordance is discoverable rather than an invisible hit area. The row now also renders when the session has no cwd, so a jumpable session always has an entry point.I deliberately did not make the question text clickable, the way the approval card's tool-name row is. That line is what the user is reading; a misclick there would yank them to another app mid-thought. The session-identity row carries the clearer meaning anyway: click which session this is → go to that session.
3. Fixed a doc comment that had drifted onto
shortcutHint(it documentshandleCardClick).Behaviour
Tests
NotchPanelViewTestsNotchCardKind.matchesacross every surface: a question-card jump must never collapse an approval card, and vice versa. Jump validation is async, so by the time it resolves the panel may have swapped cards — collapsing then would discard a live request the user never touched, the Answer from the notch card can be delivered to the wrong session when several sessions are waiting #308 failure mode.[120ms, 320ms, 640ms].AppStateQuestionFlowTeststestCollapsingAQuestionCardAfterAJumpKeepsItAnswerable— collapse the surface the way a successful jump does, then assert the question is still queued and still answers correctly through its continuation. This pins the property that separates a jump from a Skip.Full suite green locally on macOS 26.4 / Xcode 26 (Swift 6.3.3): 890 tests, 2 skipped, 0 failures.
swift buildis clean — no new warnings from these files.Notes
CHANGELOG is left alone since it looks like it's written at release time.