Skip to content

Agent: compact question card that answers on one click - #1557

Merged
AnthonyRonning merged 2 commits into
masterfrom
agent/question-dialog-compact
Nov 11, 2026
Merged

AnthonyRonning merged 2 commits into
masterfrom
agent/question-dialog-compact

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The question and permission card in Maple Work was the tallest thing above the composer and took two clicks to answer. This makes it compact, lines it up with the composer, and answers a single choice on one click.

Before and after

The real chat screen rendered offscreen with sample data. "Before" is master at 317c1603; "after" is this branch. Dark first, light under it.

Single choice. One click on an option answers. Each option leads with a circle and ends with the key bound to it, the same layout as multi-select, and the free-form answer is the last row.

Before After
Before: single, dark After: single, dark
Before: single, light After: single, light

Multi-select. Several answers can't be sent by one click, so Answer stays, as the inverted pill in the footer.

Before After
Before: multi, dark After: multi, dark
Before: multi, light After: multi, light

Permission request. Deny and Allow once always sit in the footer under the call, at every width.

Before After
Before: permission, dark After: permission, dark
Before: permission, light After: permission, light

Folded. The chevron still folds the card to one line so the reply behind it can be read. The line now names the question itself.

Before After
Before: folded, dark After: folded, dark
Before: folded, light After: folded, light

What changes

  • One frame for every kind of card. The line that names the question and folds the card, the body, then a footer of actions. The "Question from Maple" title row and the separate header line are gone; the question is the title. Nothing moves beside anything else as the window narrows.
  • One click answers a single choice. Clicking an option, or pressing its key, sends it. In a batch of questions it moves to the next one. Moving the keyboard selection still waits for Enter. Multi-select is unchanged: clicks tick, Answer sends.
  • Same row layout for both kinds. Mark on the left (a circle for a single choice, a box for multi-select), the option, then its key at the far right. The circle fills only on the row the keyboard is on.
  • Keys shown as keycaps. Each option shows the shortcut bound to it right now, read from the keymap, so a rebound or unbound key shows correctly. "Skip (Esc)" becomes Skip with an esc keycap in the footer. A new widgets::keycap has one fixed height so keys and labels share a line.
  • Free-form answer is the last row. No boxed field and no coral Answer button. Enter sends what is typed; the return keycap at the end of the row does the same by pointer. On a permission card a typed answer still denies with that note.
  • Same column as the composer. The card took its own width and no gutter, so in a narrower window it ran wider than the composer. It now shares the composer's column and gutter.
  • Neutral look. Hairline border in place of the status-colour outline, and default_button / secondary_button where a button remains.
  • Accessibility. Option rows are buttons to assistive tech; before they were static text that could not be pressed.
  • Strings. chat-skip drops "(Esc)" and chat-answer-placeholder becomes "Something else…" in English, Spanish and German; both translation revision files are stamped.

Behaviour to be aware of

  • A typed note used to ride along when an option was picked and Answer pressed. On a single choice the click now sends at once, so the note is included only if it was typed before the click. Multi-select keeps the note.
  • Permission buttons carry no key hints. Esc is Skip, which also stops the run, so it is not the same as Deny, and Enter does not approve.

Verification

  • just ci-lint and just ci-test pass on 6035918a, rebased onto master at a7074f7f.
  • New and changed tests: test_single_choice_click_answers_at_once (answers on the click, steps through a batch, ignores an option that is not there, keyboard selection still waits) and test_multi_select_option_click_toggles_off.
  • Smoke test on a debug build against a local stack, signed in as the local Pro fixture account, with real model turns: one click answered a question, the chevron folded and unfolded the card, a typed answer sent with Enter, and the second option's shortcut answered.
  • Not exercised live: multi-select (the model sent single-choice each time) and the permission card (the model declined the command itself). Both are covered by the tests and the renders above. Not run on Windows, Linux or a paired computer; the card is drawn by the same code for a paired computer's questions.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

AnthonyRonning and others added 2 commits November 10, 2026 18:07
The question and permission card was the tallest thing above the composer:
a "Question from Maple" title, a header, the question, radio rows, an
answer field with a coral button, and a "Skip (Esc)" line indented past
the rest. Answering a single choice took two clicks.

- One frame for every kind and every width: the line that names the
  question and folds the card, the body, and a footer of actions. On a
  permission card Deny and Allow once always sit in the footer, under the
  call, instead of moving beside it as the window changes.
- A click on a single-choice option answers. Multi-select keeps Answer.
  Moving the keyboard selection still waits for Enter.
- Each option shows the key bound to it now, read from the keymap. Skip
  shows its key as a keycap, and the free-form answer is the card's last
  row, sent with Enter or its key.
- The card takes the composer's column and gutter, on a neutral hairline
  border, with the inverted pill where a button remains.
- Option rows are buttons to accessibility.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
A single choice led each row with its shortcut, which reads as a
power-user view. It now matches multi-select: the mark on the left (a
circle here, a box there), the option, then its key at the far right.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@AnthonyRonning
AnthonyRonning force-pushed the agent/question-dialog-compact branch from 16e81ba to 6035918 Compare November 11, 2026 02:17
@AnthonyRonning
AnthonyRonning merged commit 6ba294b into master Nov 11, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the agent/question-dialog-compact branch November 11, 2026 02:22
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