Skip to content

Show native chat questions in the prompt band - #49387

Merged
brennanb2025 merged 9 commits into
mainfrom
brennanb2025/chat-question-card
Nov 27, 2026
Merged

brennanb2025 merged 9 commits into
mainfrom
brennanb2025/chat-question-card

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Before, a question could appear twice in the answer card. Now it appears once in the colored top band, so the choices start closer to it.

Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45
Prod 15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​180 $\color{#cf222e}{\Huge{\mathbf{−}}}$​135 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45

What Changed

  • Render the full question in the colored band and remove the separate expanded heading.
  • Keep multi-step navigation and answered state beside the question; single-step cards show only collapse and cancel controls.
  • Stop showing short multi-step titles in the expanded band; the question, count, and navigation controls remain.
  • Preserve the card’s accessible name and compact dock behavior, including narrow cards.

Why

A full question supplied as a header was repeated in the expanded card, which consumed space and made the card harder to scan.

Linked Issue

No linked issue.

Visual Proof

Single question

Single question card

Multi-step question

Multi-step question card

Long question

Long question card

Testing

  • Added coverage for the repeated multi-step question case and step controls.

  • Captured single-question, multi-step, long-question, 360px narrow, and 220px narrow fixtures.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Performance

None, because the card renders the same question content once instead of twice.

Risk

Level: Low

The riskiest area is the compact card layout: a regression could hide part of a long question or its first choice. The existing fit limits keep the question and first choice visible, and a plain revert restores the former layout without data changes.

AI Disclosure

Not applicable.

Review

No known code issues.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security, cross-platform support, remote hosts, mobile, backwards compatibility, and performance: no changed boundary or persisted data.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • Final verification will be completed before the PR is marked ready

@brennanb2025
brennanb2025 force-pushed the brennanb2025/chat-question-card branch from 2a837f3 to f4695b7 Compare November 26, 2026 01:46
@brennanb2025
brennanb2025 marked this pull request as ready for review November 27, 2026 03:18
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The question card now displays question text in its header band instead of the scrolling body. Multi-step accessible labels use the question text and step position. Locale resources update the step-label key and related control labels. New fixtures cover three widths, and tests check single-step and multi-step rendering.

Merge Risk: Minimal · up to c0627

This change moves the question text into the colored header band and updates the step labels. No merge-blocking risk was identified. Narrow-width layout was not run in a browser, so a quick visual check is worthwhile.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Show native chat questions in the prompt band" matches the main change: the full question is now rendered once in the colored prompt band, and the separate expanded heading is removed. It i…
Description check Passed The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill boundary, Notes, and Ch…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Show native chat questions in the prompt band" matches the main change: the full question is now rendered once in the colored prompt band, and the separate expanded heading is removed. It is specific and concise, and a teammate scanning history would understand the primary change.

Full details: Description check

Explanation

The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill boundary, Notes, and Checklist sections. The before/after and mechanism are explained, and the risk and rollback are stated. The Linked Issue section says 'No linked issue.' and the template says an issue should always exist for outside contributors, so that section is incomplete. The Visual Proof section has single, multi-step, and long-question images, but it does not clearly provide a BEFORE and AFTER pair that can be switched. The Review section is brief, and the final verification checkbox is unchecked.

Resolution

Consider doing the following before merge: state whether the author is an outside contributor and, if so, link the issue that this PR fixes. Provide a clear BEFORE and AFTER visual pair for the UI change. Complete the final verification item, or explain when it will be completed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick comments: 1

src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.test.tsx: 1

88-88: Trivial · Maintainability & Code Quality · Quick win

Query step controls by role and accessible name.

The attribute count passes even if both navigation buttons lose their accessible names. Query the previous-question and next-question buttons by role and name instead. Keep the visible-text count for question deduplication.

Based on learnings, prefer user-visible roles and accessible labels over non-semantic selectors in frontend tests.

Source: Learnings

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2863e1d2-b9c5-4c64-840d-86152f1d0fc3
Commits

Reviewing files that changed from the base of the PR and between 4cf57aa and c0627c6.

Files selected for processing: 16

  • src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.fixture.tsx
  • src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.test.tsx
  • src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx
  • src/renderer/src/components/native-chat/prompts/NativeChatQuestionCardHeader.tsx
  • src/renderer/src/components/native-chat/prompts/NativeChatQuestionCardParts.tsx
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

The question card now presents each question once in its colored band, keeping multi-step navigation and answer state beside it while single-question cards stay compact.

Verified native-chat prompt and dock tests, the multi-step and narrow card fixtures, the final review pass, and all required CI checks.

@brennanb2025
brennanb2025 merged commit fe6bd53 into main Nov 27, 2026
83 checks passed
2SinceJuly added a commit to 2SinceJuly/orca that referenced this pull request Nov 27, 2026
Main moved the question into the card's prompt band (stablyai#49387) but kept the height cap: 4 lines, and 2 in the card fit. In a short pane that is the reported clip on its own — the 380x312 fixture showed 41px of a 268px question, with the options and the answer field pushed out of the dock's scroll range entirely. The question keeps its two-line floor and now takes the room it needs, so the dock scrolls to the options instead of hiding them.
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