Skip to content

Remove the New divider from Chat UI - #38044

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/rm-new-indicator
Nov 4, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/rm-new-indicator

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Chat no longer inserts a “New” line when you return to messages that arrived while you were away.

What Changed

Remove the transcript divider, its foreground/visibility tracking, screen-reader announcement, automatic scroll-to-divider behavior, and marker-specific virtualized row pin. Delete the marker tests, unused translations and color token, and the CSS-value test containing the removed token assertion (per the repository's test guidelines). Normal transcript following, parked scroll restoration, Jump to latest, find, rail navigation, and diff reveals keep their existing owners.

Why

The divider adds unwanted visual noise. Removing its implementation also avoids retaining its tracking and scroll side effects after the visible feature is gone.

Linked Issue

Internal maintainer request; no existing issue.

Visual Proof

Same transcript row at a 640px fixture width, rendered headlessly in both themes. The temporary fixture was removed after capture; screenshots are attached outside the source diff.

Before (dark):

Before — dark

After (dark):

After — dark

Before (light):

Before — light

After (light):

After — light

Testing

  • Headless component screenshots in light and dark mode on macOS; visually reviewed before and after.
  • Ran ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2: all non-unit checks passed after staging the deleted tests and rerunning node config/scripts/check-test-file-runners.mjs. This includes both affected typecheck projects, lint/format, code quality, localization extraction/catalog/coverage, import boundaries, dead classes, and ratchets. The broad affected-test selection reached unrelated repository suites; stopped after 5m29s and used scoped tests, as permitted by AGENTS.md.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/native-chat/NativeChatMessageList.windowing.test.tsx src/renderer/src/components/native-chat/native-chat-submission-navigation.test.tsx src/renderer/src/components/native-chat/native-chat-appearance-palette.test.ts --maxWorkers=2: 3 files, 23 tests passed.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/agent-hooks/server-claude-helper-recovery.test.ts --maxWorkers=2: 24 tests passed while investigating the unrelated initial CI failure.
  • Full PR CI passed, including all 12 unit shards, static analysis/typecheck, both packaging jobs, and PR checks passed. The first run hit a timing-sensitive assertion in the unchanged hook-recovery test; retrying only failed jobs passed on the same commit.
  • Marker-only tests removed with the feature; no new tests for a presentational removal.
  • Native mobile has a separate transcript and does not render this divider. No runtime protocol, persistence, OS-specific, SSH, or workspace-path changes. Linux/Windows/full application builds are covered by CI.

Risk

Level: Low. Returning to chat now uses the existing transcript scroll restoration/follow behavior instead of jumping to the first unread divider. A mistake in the row-pin cleanup could affect find/diff/rail navigation; existing transcript/windowing suites cover those paths. A plain revert restores the feature; no data migration is involved.

Review

Self-reviewed the render path, all message-list-handle callers, row pinning, scrolling ownership, and remaining references. No correctness or security findings.

Agent skill upstream boundary

  • Not applicable: no upstream skill source or assets copied.

Checklist

  • Small and focused feature removal
  • Explained behavior, implementation, and reason
  • Risk and rollback documented
  • Before/after visual evidence captured
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, remote, mobile, and folder-workspace impact considered
  • Scoped local tests and applicable non-unit gates passed; broad suite delegated to full PR CI

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The change removes the native chat new-rows marker, its arrival announcement, and the tracking logic that placed the marker. The message list, transcript rows, and pinned-row selection no longer use marker state. The change also removes marker-related translations and color tokens, updates the style guide, and deletes tests for the removed behavior.

Merge Risk: Low · up to d85a4

Restore the unrelated palette assertions to retain light- and dark-theme regression coverage. No current visual defect is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the primary change: removing the New divider from the Chat UI.
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.
Description check Passed The description covers the change, reason, visual proof, testing, risk, rollback, and checklist. The author identifies the request as internal and states that no existing issue applies. The Review sec…
Full details: Description check

Explanation

The description covers the change, reason, visual proof, testing, risk, rollback, and checklist. The author identifies the request as internal and states that no existing issue applies. The Review section is empty, but self-review findings are documented elsewhere, so this omission is non-critical.

Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 6 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • 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/native-chat-appearance-palette.test.ts: 1

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

Restore the opposite-scheme assertions for retained palette roles.

The removed test covered behavior that remains in the native-chat palette: computed foreground and surface mappings, code foreground blending, and status/diff role isolation. Keep the --chat-unread assertion deleted, but restore the remaining assertions so regressions in either app/terminal scheme combination remain detectable.

Suggested fix
+const statusRoles = [
+  '--destructive',
+  '--status-success',
+  '--status-warning',
+  '--git-decoration-added',
+  '--git-decoration-deleted',
+  '--diff-added-background',
+  '--diff-added-gutter',
+  '--diff-removed-background',
+  '--diff-removed-gutter'
+]
+
 describe('matching chat surfaces with opposite app schemes', () => {
+  it.each([
+    ['dark', 'light'],
+    ['light', 'dark']
+  ] as const)('uses the %s app with a %s terminal palette', (appScheme, terminalScheme) => {
+    const chat = createChat(appScheme, terminalScheme)
+    const matched = getComputedStyle(chat)
+    const terminalForegroundAtFullStrength = `${terminalScheme === 'light' ? '#000000' : '#ffffff'} 100%`
+    expect(chat.style.color).toBe('var(--foreground)')
+    expect(matched.getPropertyValue('--chat-foreground')).toContain(terminalForegroundAtFullStrength)
+    expect(matched.getPropertyValue('--chat-foreground-strong')).toContain(terminalForegroundAtFullStrength)
+    expect(matched.getPropertyValue('--foreground')).toContain(terminalForegroundAtFullStrength)
+    expect(matched.getPropertyValue('--muted')).toContain('7%')
+    expect(matched.getPropertyValue('--muted-foreground')).toContain('62%')
+    expect(matched.getPropertyValue('--popover')).toContain('4%')
+    expect(matched.getPropertyValue('--popover-foreground')).toContain(terminalForegroundAtFullStrength)
+    expect(matched.getPropertyValue('--accent')).toContain('9%')
+    expect(matched.getPropertyValue('--input')).toContain('7%')
+    expect(matched.getPropertyValue('--secondary')).toContain('7%')
+    expect(matched.getPropertyValue('--ring')).toContain('44%')
+    expect(matched.getPropertyValue('--chat-source-background')).toBe(
+      terminalScheme === 'light' ? '#ffffff' : '#000000'
+    )
+    expect(matched.getPropertyValue('--chat-source-foreground')).toBe(
+      terminalScheme === 'light' ? '#000000' : '#ffffff'
+    )
+    const codeForeground = matched.getPropertyValue('--chat-code-foreground')
+    expect(codeForeground).toContain(`${terminalScheme === 'light' ? '#000000' : '#ffffff'} 85%`)
+    expect(codeForeground).toContain(terminalScheme === 'light' ? '#ffffff' : '#000000')
+    expect(codeForeground).not.toContain(appScheme === 'dark' ? '#fafafa' : '#0a0a0a')
+    const outside = getComputedStyle(document.documentElement)
+    const appStatus = statusRoles.map((role) => outside.getPropertyValue(role))
+    const chatStatus = statusRoles.map((role) => matched.getPropertyValue(role))
+    expect(chatStatus.every(Boolean)).toBe(true)
+    expect(chatStatus).not.toEqual(appStatus)
+    document.documentElement.classList.toggle('dark', terminalScheme === 'dark')
+    expect(
+      statusRoles.map((role) => getComputedStyle(document.documentElement).getPropertyValue(role))
+    ).toEqual(chatStatus)
+  })
+
   it('resolves an incomplete terminal palette without a local background variable cycle', () => {
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: 4449625c-4c17-45e6-8b3e-6bd86687f5bc
Commits

Reviewing files that changed from the base of the PR and between e3b2e9c and d85a405.

Files selected for processing: 25
  • docs/styleguide/native-chat.md
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/native-chat/NativeChatMessageList.new-rows-marker.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatNewRowsMarker.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNewRowsMarker.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptItems.tsx
  • src/renderer/src/components/native-chat/NativeChatTranscriptRow.tsx
  • src/renderer/src/components/native-chat/native-chat-appearance-palette.test.ts
  • src/renderer/src/components/native-chat/native-chat-new-rows-marker.test.tsx
  • src/renderer/src/components/native-chat/native-chat-new-rows-marker.ts
  • src/renderer/src/components/native-chat/native-chat-pinned-rows.ts
  • src/renderer/src/components/native-chat/use-native-chat-reveal-latest.ts
  • src/renderer/src/components/native-chat/use-native-chat-transcript-window.ts
  • 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
Files with no reviewable changes: 18
  • src/renderer/src/components/native-chat/native-chat-new-rows-marker.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNewRowsMarker.test.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/native-chat/NativeChatNewRowsMarker.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.new-rows-marker.test.tsx
  • src/renderer/src/components/native-chat/native-chat-new-rows-marker.ts
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/components/native-chat/native-chat-appearance-palette.test.ts
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/fr.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.

@AmethystLiang
AmethystLiang merged commit ee6a248 into main Nov 4, 2026
71 of 73 checks passed
AmoabaKelvin added a commit that referenced this pull request Nov 9, 2026
Restores the line above messages that arrived while you were away, the scroll to it on return and the screen-reader announcement, all removed in #38044. A new Chat > Behavior switch, "Mark new messages when returning to a chat" (on by default), turns it off; off tracks nothing.
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