fix(frontend): elicitation chat polish — friendly names, card elevation, stepper mode - #5217
Conversation
…n over borders
Dogfooding feedback on the released elicitation UI:
- The widget attribution leaked the raw MCP wire name on the Claude
harness ("Asked by mcp__agenta-tools__request_input"). Chat-facing copy
now uses the shared resolveToolDisplay label; the raw name stays
reachable where it belongs (Build-mode inspect, traces).
- Choice cards traded borders for elevation (the providers-grid
treatment): unselected options are borderless elevated fills, hover
brightens the fill, and the single selected card per group carries the
one accent border. A stack of outlined boxes read exhausting in the
dark theme; light keeps its quiet look via the same fill tokens.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds ChangesElicitation stepper flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant RequestInput as request_input tool
participant ElicitationWidget
participant SchemaForm
participant User
RequestInput->>ElicitationWidget: Send requestedSchema with x-ag-stepper
ElicitationWidget->>SchemaForm: Configure stepper form
User->>SchemaForm: Answer and review questions
SchemaForm-->>ElicitationWidget: Return values or validation errors
ElicitationWidget->>RequestInput: Submit accepted form
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A form with several questions (choice-card groups especially) is a wall
of scrolling; the user loses track of which question they are on. Agents
can now opt a form into one-question-at-a-time presentation via
"x-ag-stepper": true on requestedSchema (author-controlled — the x-ag
presentation-hint channel the validator already tolerates).
- SchemaForm stepper: progress header ("Question 2 of 5"), free-roam
Back/Next, and a final review step listing label → answer (no option
lists) with click-to-jump rows; unanswered required questions show a
Required marker. Fields stay MOUNTED and are CSS-hidden per step —
unmounting would drop antd registration (the collapsed-defaults bug
class). Validation stays at Accept; a failure jumps to the failing
question via the new goToField handle.
- request_input description teaches the hint; the shared payload type
admits x-ag keys on requestedSchema.
…Claude env vars Removed DAYTONA_AUTOSTOP, DAYTONA_AUTOARCHIVE, DAYTONA_AUTODELETE, and CLAUDE_CODE_OAUTH_TOKEN environment variables from the runner service. Changed ngrok tunnel profile from `with-tunnel` (on by default) to `remote` (off by default). Removed the conditional entrypoint logic that gracefully exited when NGROK_AUTHTOKEN was unset; now the token is required when the profile is active. Simplified command to direct
…eys, stepper header/skip/enter - ChoiceCards Other tile: always-visible input (no click-to-reveal); single-select commits as you type, multi keeps Enter/blur chip commit - Number badges 1..9 on choice cards; digit keypress selects (Other gets next digit) - Stepper: active question label+description promoted to header, field labels hidden - Compact progress pill (2/5) replaces the question counter line - Skip button on optional questions (clears the value); Enter advances with a ⏎ hint on Next; Space keeps checkbox toggle semantics
…ped answer antd setFieldValue fires no onValuesChange, so Skip cleared the field but left the localStorage draft holding the pre-skip value; reloading restored the answer the user explicitly declined, and one-click Accept would have submitted it.
Playbook bodies deliberately do NOT re-state it (the don't-re-teach rule): the build-an-agent loop step 1 tells the builder when to set x-ag-stepper, and the authoring skill's platform fact tells playbook writers it exists.
In chat, Enter means send — the composer footer says '↵ Send' right below the form, so a Next button advertising ⏎ is a conflicting affordance. Navigation is click + digit keys; Next becomes a plain default button.
…icator + fill Fifth round on the dark-mode yellow-wall: the root mistake was keeping the accent BORDER as the selection signal. The filled indicator already says selected; selection now reads as a stronger fill (Secondary vs Quaternary), no border anywhere on cards. The inline Other input becomes a borderless inset on the container bg (no nested focus rings, no spellcheck squiggles), and digit badges move to the right edge, full card height, quiet text.
Back/Next were a whole extra row above Accept/Decline, and the default- variant Next carried a border nothing else has. Navigation is now a minimal ‹ n/N › pager in the header (text-type icon buttons, no borders), with Skip folded in as a quiet text button that appears only on optional questions. Review stays reachable via › past the last question.
…x magic number The typographic measure (65ch) is content-relative and scales with the font; the M1-era pixel cap predates choice cards and the stepper.
max-w-prose (65ch) resolved to ~the same ~500px as the old cap at this font size — a no-op. 672px gives choice-card descriptions and the header pager visible breathing room.
… options Stepper: ArrowLeft/Right move between questions, guarded wherever a caret or dropdown owns the arrows (inputs, textareas, Select, DatePicker). Choice cards: ArrowUp/Down move focus card-to-card with wrap; selection stays Enter/Space/click so browsing never mutates the answer.
…cus, auto-advance Answering a form took multiple Tab presses per question because every card was its own Tab stop and step changes moved focus nowhere. Three mechanisms, modeled on what the user is doing (answer, move on): - Roving tabindex: one Tab stop per card group (selected card, else the first); arrows walk cards inside it. - On step change the answer surface receives focus automatically (never on mount — the composer may own focus), so digits/arrows/typing land with zero Tab presses. - A single-select card pick auto-advances to the next question after a short beat; multi-select and text fields keep explicit navigation. Full-keyboard chain: 2 → (auto) → 1 → (auto) → type → → → review → Accept.
Plain ←/→ were rightly guarded inside text inputs (the caret owns them), which left text-question steps unreachable by keyboard. Cmd/Ctrl+←/→ now pages deterministically everywhere — inputs included — while plain arrows keep their native meaning (caret movement, dropdown navigation) and ↑/↓ keeps walking choice cards without any modifier.
The dominant always-enabled primary invited submitting unfinished forms (navigation is deliberately muted next to it). Accept now enables only when all required fields hold a value — defaults count, so a fully prefilled form stays one-click acceptable; Decline/Dismiss remain always-available.
'Answer the required questions first' read as a scolding. Now it informs: '2 required answers to go'.
Discoverability fix at the structural level: the dominant primary slot was a disabled Accept (dead weight) while the actual next action hid in 12px chevrons. While stepping, the primary button IS Next (Review on the last question, via a new nextStep handle + onStepChange host callback); Accept rides along muted and takes the primary slot back on review. A thin segmented progress bar across the card top makes multi-step-ness visible at a glance; the compact pager stays for direct control.
The primary Next in the action row didn't land — reverted (nextStep/
onStepChange API removed with it, no dead surface). Discoverability
instead: the ‹ › pager chevrons take the accent tint, and question
titles carry their number ('2. Where should release notes be
published?'), pairing with the segmented progress bar.
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2c5181c2-55a3-4c92-9f56-8a5d04ce4ba2
📒 Files selected for processing (8)
.agents/skills/write-template-playbooks/SKILL.mdapi/oss/src/core/workflows/static_catalog.pysdks/python/agenta/sdk/agents/adapters/agenta_builtins.pyweb/oss/src/components/AgentChatSlice/components/clientTools/ElicitationWidget.tsxweb/packages/agenta-entity-ui/src/gatewayTool/components/SchemaForm.tsxweb/packages/agenta-entity-ui/src/gatewayTool/components/schemaFormOptions.tsweb/packages/agenta-entity-ui/tests/unit/schemaFormOptions.test.tsweb/packages/agenta-shared/src/utils/elicitation.ts
Make the single-select auto-advance idempotent per question: advance only if still on the question that was answered. Prevents rapid re-picks (two pending timers) or a stale timer after manual navigation from skipping a question.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Dogfooding feedback on the released elicitation UI, with Claude Code's AskUserQuestion UI as the design bar for the form interactions.
Chat chrome
resolveToolDisplaylabel. Raw wire names remain in Build-mode inspect and traces.colorFillQuaternary, hovercolorFillTertiary); only the selected card carries an accent border. Kills the wall-of-outlines in dark; light keeps its quiet look.Stepper mode (author-controlled)
"x-ag-stepper": trueonrequestedSchemarenders multi-question forms one question at a time with free-roam Back/Next and a final review step (label→answer rows, click to jump, Required markers). Fields stay mounted and are CSS-hidden per step so antd registration (defaults, typed values) survives.goToFieldhandle).Choice-card interactions
Pure control logic (
typeCustomValue,resolveDigitSelection,digitKeyIndex) lives inschemaFormOptions.tswith unit tests; the__ag_enum_other__sentinel invariant stays pinned.entity-ui 185 tests + tsc + lint green. QA: a multi-question
x-ag-stepperelicitation + any choice-card form, both themes.