Commit Graph

12 Commits

Author SHA1 Message Date
roboomp 8a059e3027 fix(coding-agent): normalize ask dialog questions to prevent render crash
The live AskDialog trusted question.question while its render helpers
(replaceTabs, renderQuestionTitle, questionTabLabel) assume a string. A
question reaching AskDialogComponent without a string question field threw
an uncaught TypeError that escaped the TUI render loop and killed the
session. The transcript renderer already normalizes the same malformed
data via normalizeRenderQuestions; the live path did not.

Normalize the questions array at dialog entry (new normalizeDialogQuestions),
coercing question/id/label to strings and options to a well-formed array,
matching the transcript path.

Fixes #7211
2026-08-01 00:11:21 +00:00
roboomp a60f1efa96 fix(tui): formatted selector keybinding hints
Routed copy selector and ask dialog hints through the shared human-readable key formatter and covered both rendered surfaces.

Fixes #7164
2026-07-31 10:06:46 +00:00
robomp-bot 2300c9ff41 fix(coding-agent): addressed PR review feedback (#5988)
- Kept tall-preview pages inside the selected option row.\n- Compared cached overflow output against the initial width-adjusted render.\n\nNote: pre-existing repository formatting failures in bun check are not addressed by this PR.
2026-07-18 22:29:31 +09:00
robomp-bot 59b9f6568a fix(coding-agent): showed remapped cancel key in ask footer
Ask dialogs accepted the configured cancel binding but always advertised Escape. Derive the compact footer label from the active binding so the displayed key remains actionable.
2026-07-18 20:52:29 +09:00
robomp-bot a741e0b388 fix(coding-agent): rendered ask option previews inline
Rich ask options previously exposed preview content only for the highlighted row. Render every preview beneath its option and keep long content reachable without reviving the split-pane layout.
2026-07-18 20:42:23 +09:00
can1357 1b0d629a71 test(coding-agent): cover Ask single-select space input 2026-07-17 04:04:58 +02:00
can1357 bcee73e587 feat(coding-agent-modes): streamlined ask dialog workflow and layout
- Refined dialog layout with stable height clamping and improved preview visibility logic.
- Simplified interaction flow by replacing the "Next" row with "Submit" tab confirmation.
- Enabled accessible option toggling using Enter and Space keys.
- Removed legacy chat integration and streamlined internal dialog state management.
2026-07-11 14:47:20 +02:00
metaphorics f66e527674 fix(ask): guest multi-select Next gating, body height bottom border
- Omit Next from the guest multi-select ui-request options until at least
  one option is checked or a custom answer exists, mirroring the local
  dialog's disabled-Next gating. The remote select has no disabled-row
  concept, so Next is omitted rather than dimmed (PRRT_kwDOQxs0bc6OFbDW).
- Add the bottomBorder(1) term to the ask dialog's fixed-row budget so the
  rendered dialog no longer overflows the viewport by one row
  (PRRT_kwDOQxs0bc6OFbDY).
- Add focused tests: guest wire-level Next gating round trip, and dialog
  height <= viewport assertion.
2026-07-03 14:17:31 +09:00
metaphorics 1d14e262bd fix(ask): tagged guest results, bounded headers, cancel-keeps-open, gated Next
- Replace #requestGuestUiString's string|"unavailable"|undefined channel
  with a tagged GuestUiResult ({answered}|{cancelled}|{unavailable}) so a
  guest answer literally equal to "unavailable" no longer collides with
  the transport-unavailable sentinel (PRRT_kwDOQxs0bc6OE3gN).
- Cap in-body question header rendering to MAX_HEADER_ROWS with ellipsis
  truncation so long/multiline questions cannot push options off-screen
  (PRRT_kwDOQxs0bc6OE3gS).
- Guest Other editor cancellation now continues the loop (multi) / re-shows
  the select (single) instead of cancelling the whole ask
  (PRRT_kwDOQxs0bc6OE3gU).
- Disable the Next row on a single-question multi-select until at least one
  option or custom input is chosen, preventing empty-result submission
  (PRRT_kwDOQxs0bc6OE3gY).
2026-07-03 13:00:26 +09:00
metaphorics 48b2a742c8 fix(ask): distinct chat redirect result, row-specific note prefill
Op: correct
Restores: review:4375

- Widen ExtensionAskDialogResult to a union with { kind: "chat" } variant
  so AskTool can distinguish chat handoff from cancel (undefined).
- AskDialogComponent.#finishChat passes { kind: "chat" } via onChat.
- Controller settles { kind: "chat" } locally and propagates a "chat"
  sentinel through the guest/collab path instead of returning undefined.
- AskTool returns a chat-redirect AgentToolResult (chatRedirect details)
  instead of aborting with ToolAbortError.
- #promptForNote prefills with the existing note only when editing the
  same row (noteRowKey === rowItem.key), preventing cross-row note leaks.
- Add ask-dialog and ask tool tests for chat redirect and row-specific
  note prefill.
2026-07-03 11:52:51 +09:00
metaphorics 69c02c802a fix(ask): reset countdown on input, bound prompt titles, fix scroll viewport
- Reset the inactivity countdown in handleInput after the closed/prompt
  guard, matching HookSelector/HookInput semantics so a user actively
  navigating options/tabs is not auto-submitted by an absolute deadline.
- Add boundPromptTitle helper that flattens whitespace, wraps to the
  terminal content width, and caps at 3 rows with ellipsis truncation;
  apply it to custom-input and note prompt titles in the rich dialog
  and the guest-UI editor path so long/multi-line questions stay usable.
- Drop totalRows from both ScrollView calls so the full allLines array
  is sliced via scrollOffset + row; previously totalRows caused render
  to read lines[row] instead of lines[scrollOffset + row], leaving the
  viewport stuck at the top while the scrollbar thumb moved.
- Add tests for inactivity reset, bounded prompt titles, and scrolling.

Restores: review:4375
Op: correct
2026-07-03 10:16:41 +09:00
metaphorics 38a5c8a893 feat(ask): add rich interactive dialog
Adds the rich TUI ask dialog, additive schema fields, ask.enabled tool gating, note/preview/header support, chat redirect, and timeout behavior that defers while nested prompts are active instead of discarding user input.

Op: extend
2026-07-03 09:20:29 +09:00