Skip to content

fix(native-chat): one set of rules for chat text size, colour, hover and focus - #26685

Merged
brennanb2025 merged 8 commits into
stablyai:mainfrom
AmoabaKelvin:native-chat-type-scale
Oct 12, 2026
Merged

brennanb2025 merged 8 commits into
stablyai:mainfrom
AmoabaKelvin:native-chat-type-scale

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​113 $\color{#cf222e}{\Huge{\mathbf{−}}}$​16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​97
Prod 41 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​245 $\color{#cf222e}{\Huge{\mathbf{−}}}$​126 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​119

ELI5

The native chat had no shared rules for how text and controls look, so each part picked its own. Text came out at slightly different sizes and shades, rows highlighted at different strengths on hover, keyboard focus was hard to see, and some warning and diff text was close to unreadable in one theme. This gives the chat one set of rules for size, text colour, hover, focus and contrast, and a lint check that keeps them.

What Changed

Five things, all inside the native chat.

1. Font size

Before, each component picked its own size. There were six sizes between 10 and 14px, 18 of them one-off values like text-[13px]. Rows doing the same job disagreed: a tool run header was 14px, the tool rows inside it 13px, the task list 12px. The Text size setting reached 11 elements, so at size 20 a tool run had a 20px header over 13px rows.

Now there are four named sizes, and Text size scales all of them in proportion. Icons, gaps, padding and row heights scale with the text too, so a larger Text size reads like a zoom of the chat instead of big text beside small icons. Code keeps its own size and follows Code text size.

Step Default Used for
text-sm 14px Anything you read: messages, tool and agent activity rows, card bodies, the composer
text-xs 12px Labels, timestamps, counters
text-2xs 11px Captions, category labels
text-3xs 10px Badges

At the default size, tool rows, subagent entries, background tasks and diff card headers go from 13px to 14px. Task rows in the transcript and the approval card's description go from 12px to 14px.

2. Text colour

Before, secondary text used two greys interchangeably (text-muted-foreground 79 times, text-chat-foreground-faint 47 times), and main text used three colours. Rows that used the app colour ignored the Contrast setting, and seven of them softened it by hand with an opacity like text-foreground/85.

Now text on the chat canvas uses the chat colours, so it follows Contrast. Text on a card, menu, popover or the docks above the composer keeps the app colours. 26 secondary and 10 primary uses moved. Light mode looks the same. In dark mode those rows get slightly dimmer and match the tool rows beside them.

3. Hover and focus

Transcript rows now share one hover strength (hover:bg-accent/20); the diff card header was the outlier. Tool rows and diff card headers had no focus style of their own and now use the same inset ring as their sibling rows. Two one-off ring strengths are gone.

4. Contrast

Four pairs failed the accessibility minimum in at least one theme. Each now uses a chat-only token mixed toward the foreground, so it darkens in light mode and lightens in dark.

Pair Before (light / dark) After (light / dark) Needed
Focus ring on the canvas 1.9 / 2.5 3.7 / 5.1 3.0
Warning notice text 2.2 / 9.2 5.6 / 8.0 4.5
Added diff line on its tint 4.0 / 5.4 6.4 / 7.0 4.5
Removed diff line on its tint 5.8 / 3.0 8.7 / 4.9 4.5

5. Enforcement

A lint plugin, native-chat-design-tokens, fails pnpm lint on arbitrary font sizes, text-foreground/NN and ring-ring/NN inside components/native-chat/. docs/STYLEGUIDE.md documents the size scale and the colour, hover and focus rules.

Mechanism

  • main.css adds text-2xs, text-3xs and text-chat-code as theme steps. The chat root (.native-chat-appearance) redefines --text-sm and the smaller steps as ratios of --chat-font-size, so every size class inside the chat scales without opting in.
  • The chat root also sets Tailwind's spacing unit from the text size (4px at the default 14px), so every size-*, gap-*, p-* and min-h-* inside the chat follows it. The row-height estimates the transcript uses before it measures a row scale by the same factor.
  • The native-chat-message-text class is gone. It set font-size outside a CSS layer, so it silently beat any Tailwind size class on the same element. The subagent header carried text-[13px] and never rendered at 13px.
  • cn() registers the new steps with tailwind-merge. Without that it reads text-2xs as a colour and drops it next to text-muted-foreground.
  • The chat root points --ring at a new --chat-focus-ring token, so every focus ring in the chat picks up the passing colour. --chat-warning, --chat-diff-added and --chat-diff-removed are defined next to the other chat colour tokens.

Why

The chat had colour tokens but no type scale, and no stated rule for when to use the chat colours over the app's. Nothing told a new component which size or colour to pick, so each one guessed. Fixing rows one at a time would have left that gap open.

I compared against T3 Code, which has the same kind of transcript. It uses named steps only, gives each step one job, and scales them all from a single setting. This follows that model.

Alternatives I considered:

  • Tag every reading-size element with the scaling class. This keeps labels fixed, which Add chat appearance settings: text size, code size, width #25657 chose on purpose. It means a per-element opt-in that is easy to forget, which is how tool rows got missed, and at size 20 the labels look small beside the prose. Redefining the steps at the chat root needs no opt-in.
  • Keep 13px for dense rows. The style guide allows 13px for list rows elsewhere in the app. Inside the transcript it sat between the 12px labels and 14px prose and read as a mistake.

This reverses the "keep metadata independent of chat text size" decision from #25657. Labels and timestamps now scale. Worth a look from whoever made that call.

Linked Issue

None.

Visual Proof

In the running app

Rendered in the real app (a hidden dev build with an isolated profile) from a seeded chat transcript, not a live agent. Before is main without this PR (59631b8b263). After is this PR (440fd856d30). Each shot hovers the first reply so its copy, scroll-to-top and time row is showing, with the next message right below it.

Text size 12, 16 and 20

Before After
Light, Text size 12 before-light-12 after-light-12
Light, Text size 16 before-light-16 after-light-16
Light, Text size 20 before-light-20 after-light-20
Dark, Text size 12 before-dark-12 after-dark-12
Dark, Text size 16 before-dark-16 after-dark-16
Dark, Text size 20 before-dark-20 after-dark-20
  • The hover controls never overlap the next message. On both builds the controls row ends exactly where the next message starts (0px overlap, measured at every size and theme).
  • After this PR the whole chat scales with Text size. At 12 / 16 / 20, the gap between messages is 17 / 23 / 29px, the scroll-to-top button is 21 / 27 / 34px, and the time is 10.3 / 13.7 / 17.1px. On main those stay at 20px, 24px and 12px, and only the message text grows.

"Match terminal interface" on, terminal font size 10 and 24 (whole window, so the message box shows too)

Before After
Dark, terminal font size 10 before-match-dark-10-window after-match-dark-10-window
after-match-dark-10-closeup
Dark, terminal font size 24 before-match-dark-24-window after-match-dark-24-window
after-match-dark-24-closeup
Light, terminal font size 10 before-match-light-10-window after-match-light-10-window
after-match-light-10-closeup
Light, terminal font size 24 before-match-light-24-window after-match-light-24-window
after-match-light-24-closeup
  • Before: message text follows the terminal font size (10px and 24px), and labels and buttons stay at their fixed sizes.
  • After: message text follows the terminal font size (10px and 24px, as before this PR). Labels, buttons and spacing stay in the chat's 12–20 range, so a 10px terminal gets Text-size-12 controls and a 24px terminal gets Text-size-20 controls.

A warning-coloured element was not captured. In a chat it only appears when an SSH host goes offline or when a live agent session reports a warning, and this rig had neither.

Earlier renders

Before and after at Text size 12, 14, in dark and light. Before is built from main.

before-light-12 after-light-12

Before/after dark

before-dark-12 after-dark-12

Before / after Light (14px)

before-light-14 after-light-14

Dark (Before / After)
before-dark-14

after-dark-14

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Not yet opened in the running app. What I did check:

  • Rendered the transcript component with the app's CSS in headless Chromium, on main and on this branch, at Text size 12, 14 and 20 in both themes. That is where the screenshots come from. It does not cover the composer, cards, menus or focus rings.
  • Measured computed sizes the same way at Text size 12, 14 and 20. At 20 the steps are 20 / 17.1 / 15.7 / 14.3px. Outside the chat root the same classes stay 14 and 12px.
  • Contrast ratios in the table above are computed from the token values in main.css.
  • New tests: 14 cases for the lint plugin, and one that fails if a size step stops deriving from the Text size setting.
  • pnpm lint, pnpm tc, the three audit scripts and the renderer test suite pass on a fresh rebase onto main.

Review

Three things I left alone and would like an opinion on:

  • The monitor icon in the background tasks strip stays text-yellow-500, which is 1.9:1 in light mode. It matches the sidebar's monitor indicator and a test pins the two together, so fixing it means changing the sidebar too.
  • The Text size description in settings still says "Messages, tool activity and the message box". It now undersells what scales. Changing it touches the translation catalogs.
  • Four labels on cards and docks went from text-foreground/80 to full text-foreground so the lint rule could be on without exceptions. They are slightly stronger than before.

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

Renderer-only CSS and class changes. No IPC, wire, SSH or platform-specific code. Dialogs and menus that render outside the chat root keep the app's sizes. Mobile is a separate app and is untouched. With "Match terminal interface" and a low-contrast terminal theme, derived colours can only be as readable as the theme itself.

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)
  • 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)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Sizes were picked per component, so the same kind of row came out 12, 13 or
14px and the Text size setting reached only a few of them.
@AmoabaKelvin AmoabaKelvin changed the title fix(native-chat): put chat text on one type scale that follows Text size fix(native-chat): one set of rules for chat text size, colour, hover and focus Oct 8, 2026
Icons and gaps stayed fixed while text grew, so at larger sizes they looked
undersized and sat off-centre.
@AmoabaKelvin
AmoabaKelvin marked this pull request as ready for review October 8, 2026 23:16
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e2707b28-f643-4ba2-9295-a0a9d0390201

📥 Commits

Reviewing files that changed from the base of the PR and between c238a46 and b00e70b.


⛔ Files ignored due to path filters (1)
  • src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap is excluded by !**/*.snap

📒 Files selected for processing (15)
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx
  • src/renderer/src/components/native-chat/NativeChatAwaitingInputRow.tsx
  • src/renderer/src/components/native-chat/NativeChatLoadingCue.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.live-reasoning.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatSubagentSectionHead.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.appearance.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx
  • src/renderer/src/components/native-chat/NativeChatTurnActivityLine.tsx
  • src/renderer/src/components/native-chat/NativeChatWorkingStatus.tsx
  • src/renderer/src/components/native-chat/native-chat-type-scale.test.ts

🚧 Files skipped from review as they are similar to previous changes (9)
  • src/renderer/src/components/native-chat/NativeChatWorkingStatus.tsx
  • src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx
  • src/renderer/src/components/native-chat/NativeChatTurnActivityLine.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx
  • src/renderer/src/components/native-chat/NativeChatSubagentSectionHead.tsx
  • src/renderer/src/components/native-chat/NativeChatAwaitingInputRow.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx

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



📝 Walkthrough

Walkthrough

The changes add native-chat typography and color tokens, style guidance, and lint checks. Chat appearance settings now provide a spacing scale used by transcript row-height estimates and virtualizer gaps. Native-chat components adopt the updated typography, foreground, diff, and focus-ring classes. Tests cover the lint rules, appearance tokens, and updated component classes.


Priority: ➖ Normal

Merge Risk: 🔵 Low · up to b00e7

Some composer task labels may not follow the documented surface palette, and transcript row estimates can drift at non-default text sizes. These are bounded presentation issues; the styling rule also has a narrow enforcement gap. The change is mergeable with follow-up.

Pre-merge checks | Passed 3 | Failed 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check Warning The description gives detailed scope, rationale, visual proof, testing notes, and checklist coverage. However, the required Linked Issue section says "None" instead of linking an actual issue, and the… Add the actual issue link after Fixes #. Align the Testing section and checklist with verified results by reporting pnpm typecheck and pnpm build, or state that CI will cover them and update the checkboxes accordingly.
Docstring Coverage Warning Docstring coverage is 42.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 51 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: shared native-chat rules for text size, color, hover, and focus.
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: Description check

Explanation

The description gives detailed scope, rationale, visual proof, testing notes, and checklist coverage. However, the required Linked Issue section says "None" instead of linking an actual issue, and the testing details do not clearly confirm the checked pnpm typecheck and pnpm build items.


  • Fix all pre-merge checks with AI
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 06c1ce9a-aaa9-4c86-bbba-95095cf6c6cb
📥 Commits

Reviewing files that changed from the base of the PR and between 3c07588 and 25a8c2e.

⛔ Files ignored due to path filters (1)
  • src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (49)
  • .oxlintrc.json
  • AGENTS.md
  • config/oxlint-plugins/native-chat-design-tokens.mjs
  • config/scripts/native-chat-design-tokens-plugin.test.mjs
  • docs/STYLEGUIDE.md
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.tsx
  • src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx
  • src/renderer/src/components/native-chat/NativeChatAwaitingInputRow.tsx
  • src/renderer/src/components/native-chat/NativeChatBackgroundTaskRun.tsx
  • src/renderer/src/components/native-chat/NativeChatBackgroundTasksStatus.tsx
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.tsx
  • src/renderer/src/components/native-chat/NativeChatComposerField.tsx
  • src/renderer/src/components/native-chat/NativeChatComposerNotices.tsx
  • src/renderer/src/components/native-chat/NativeChatContextUsageRing.tsx
  • src/renderer/src/components/native-chat/NativeChatDiffCard.tsx
  • src/renderer/src/components/native-chat/NativeChatDiffView.tsx
  • src/renderer/src/components/native-chat/NativeChatEmptyState.tsx
  • src/renderer/src/components/native-chat/NativeChatInlineVisual.tsx
  • src/renderer/src/components/native-chat/NativeChatLoadingCue.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.task-list-frames.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatOlderHistoryRow.tsx
  • src/renderer/src/components/native-chat/NativeChatReasoningDisclosure.tsx
  • src/renderer/src/components/native-chat/NativeChatReasoningRow.tsx
  • src/renderer/src/components/native-chat/NativeChatResolutionReceipt.tsx
  • src/renderer/src/components/native-chat/NativeChatSubagentRun.tsx
  • src/renderer/src/components/native-chat/NativeChatSubagentSectionHead.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.test.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.appearance.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRunMembers.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptRow.tsx
  • src/renderer/src/components/native-chat/NativeChatTurnActivityLine.tsx
  • src/renderer/src/components/native-chat/NativeChatUserMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatVisualPanel.tsx
  • src/renderer/src/components/native-chat/NativeChatWorkingStatus.tsx
  • src/renderer/src/components/native-chat/native-chat-appearance.css
  • src/renderer/src/components/native-chat/native-chat-row-height-estimate.ts
  • src/renderer/src/components/native-chat/native-chat-type-scale.test.ts
  • src/renderer/src/lib/utils.ts

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


const CHECKS = {
'no-arbitrary-font-size': {
pattern: /^text-\[(?:length:)?[\d.]+(?:px|rem|em)\]$/,

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject typed arbitrary font sizes.

text-[length:var(--fixed-size)] is an arbitrary font-size class, but this pattern does not match it. The class can therefore bypass the native-chat type-scale rule and leave text outside the documented steps. Match typed length values as well as numeric lengths, while continuing to exclude arbitrary text colours.

- Scale row gap with text size so controls don't overlap
- Clamp 'Match terminal interface' to 12-20 for labels/controls
- Use existing --status-warning token for warning color
- Rewrite stale test for scaled typography tokens
- Use app colors for in-progress tasks in composer dock

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 373314cf-0206-4a8f-98bf-90bc12e4eeb7
📥 Commits

Reviewing files that changed from the base of the PR and between 25a8c2e and cb817b9.

⛔ Files ignored due to path filters (1)
  • src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (20)
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.tsx
  • src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx
  • src/renderer/src/components/native-chat/NativeChatAwaitingInputRow.tsx
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatReasoningDisclosure.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx
  • src/renderer/src/components/native-chat/NativeChatUserMessageRow.tsx
  • src/renderer/src/components/native-chat/native-chat-appearance-style.test.ts
  • src/renderer/src/components/native-chat/native-chat-appearance-style.ts
  • src/renderer/src/components/native-chat/native-chat-row-height-estimate.ts
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.tsx
  • src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx
  • src/renderer/src/components/native-chat/NativeChatAwaitingInputRow.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx
  • src/renderer/src/components/native-chat/NativeChatUserMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatAgentMessageSenders.tsx
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx

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

>
{list.tasks.map((task, index) => (
<TaskRow key={`${task.content}:${index}`} task={task} />
<TaskRow key={`${task.content}:${index}`} task={task} isInDock={isInDock} />

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Resolve the failing key check.

The GitHub static-analysis check reports react-doctor(no-array-index-as-key) for this changed TaskRow call. The key includes index, so the check fails. Use a stable task identifier if the task contract provides one. Otherwise, document and narrowly suppress the rule for this stateless row.

🧰 Tools
🪛 GitHub Check: static analysis and typecheck

[failure] 92-92: react-doctor(no-array-index-as-key)
Your users can see & submit the wrong data when this list reorders or filters, so use a stable id like key={item.id}, not the array index "index".

Source: Linters/SAST tools

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f216caf4-5621-463d-85d9-4a418e91d0dc
📥 Commits

Reviewing files that changed from the base of the PR and between cb817b9 and 440fd85.

📒 Files selected for processing (1)
  • src/renderer/src/components/native-chat/NativeChatTaskList.tsx

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

'flex items-start gap-1.5 text-xs text-muted-foreground',
task.status === 'in_progress' && 'font-medium text-foreground'
'flex items-start gap-1.5',
task.status === 'in_progress' && 'font-medium text-chat-foreground-strong'

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

# Check composer-mode callers and the documented palette rule.
rg -n -C 3 '(<NativeChatTaskList\b|NativeChatTaskList\s*\()' src/renderer/src --glob '*.tsx'
rg -n -i -C 3 'native-chat|composer|foreground|colour|color' docs/STYLEGUIDE.md

Repository: stablyai/orca

Length of output: 18309


🏁 Script executed:

set -euo pipefail
printf '%s\n' '--- NativeChatTaskList.tsx ---'
nl -ba src/renderer/src/components/native-chat/NativeChatTaskList.tsx | sed -n '1,180p'
printf '%s\n' '--- NativeChatMessageList.tsx caller ---'
nl -ba src/renderer/src/components/native-chat/NativeChatMessageList.tsx | sed -n '380,455p'
printf '%s\n' '--- composer references and containers ---'
rg -n -C 6 --glob '*.tsx' 'presentation="composer"|composer.*NativeChat|NativeChatComposer|<NativeChatTaskList' src/renderer/src/components/native-chat src/renderer/src
printf '%s\n' '--- relevant changed diff ---'
git diff 59631b8b2633692f93c82da05103184cd4d40440 440fd856d30f96780bef827e782ccdd8b9a751cd -- src/renderer/src/components/native-chat/NativeChatTaskList.tsx src/renderer/src/components/native-chat/NativeChatMessageList.tsx

Repository: stablyai/orca

Length of output: 45668


Use the app palette for in-progress composer tasks.

In composer mode, the checklist inherits text-muted-foreground from its app-colored container. The in-progress row overrides that color with text-chat-foreground-strong, which is reserved for chat-canvas text. Keep the chat token for inline mode, and use text-foreground for composer mode.

🐛 Suggested fix
-function TaskRow({ task, label }: { task: NativeChatTask; label?: string }): React.JSX.Element {
+function TaskRow({
+  task,
+  label,
+  appPalette = false
+}: {
+  task: NativeChatTask
+  label?: string
+  appPalette?: boolean
+}): React.JSX.Element {
...
-        task.status === 'in_progress' && 'font-medium text-chat-foreground-strong'
+        task.status === 'in_progress' &&
+          cn('font-medium', appPalette ? 'text-foreground' : 'text-chat-foreground-strong')
...
-function Checklist({ list }: { list: TaskList }): React.JSX.Element {
+function Checklist({
+  list,
+  appPalette = false
+}: {
+  list: TaskList
+  appPalette?: boolean
+}): React.JSX.Element {
...
-        <TaskRow key={`${task.content}:${index}`} task={task} />
+        <TaskRow key={`${task.content}:${index}`} task={task} appPalette={appPalette} />
...
-            <Checklist list={list} />
+            <Checklist list={list} appPalette />

Source: Learnings

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9920e94f-627a-49ac-8760-6f0428ba61bb
📥 Commits

Reviewing files that changed from the base of the PR and between 440fd85 and c238a46.

📒 Files selected for processing (7)
  • src/renderer/src/components/native-chat/native-chat-appearance-style.test.ts
  • src/renderer/src/components/native-chat/native-chat-appearance-style.ts
  • src/renderer/src/components/native-chat/native-chat-appearance.css
  • src/renderer/src/components/native-chat/native-chat-row-height-estimate.test.ts
  • src/renderer/src/components/native-chat/native-chat-row-height-estimate.ts
  • src/renderer/src/components/native-chat/use-native-chat-row-typography.ts
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/native-chat/native-chat-appearance.css

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

typography = DEFAULT_ROW_TYPOGRAPHY
): number {
// Chat spacing and icons scale with the text size, so a row's fixed parts do too.
const scale = typography.spacingScale

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the collapsed-reasoning estimate at least one line high.

When matched terminal message text is 24px, lineHeightPx is about 37.7px, but COLLAPSED_REASONING_PX * spacingScale is about 34.3px. The previous estimate used the greater of line height and 24px. Restore that minimum so a collapsed reasoning trigger does not start with an estimate shorter than its text line.

@brennanb2025
brennanb2025 merged commit 53bf776 into stablyai:main Oct 12, 2026
33 checks passed
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.

2 participants