Skip to content

fix(native-chat): show host outages in the notice card - #26161

Merged
brennanb2025 merged 5 commits into
mainfrom
brennanb2025/native-chat-host-notice-row
Oct 7, 2026
Merged

brennanb2025 merged 5 commits into
mainfrom
brennanb2025/native-chat-host-notice-row

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When a native chat's host becomes unreachable, its host message and Reconnect action appear outside the notice card used for other chat notices. The moved row also used a crossed-out Wi-Fi icon, so it did not match the sidebar's red slashed-server icon. This PR puts host status in the existing card, including approval and question slots, and uses the same server icon: red when offline, muted while reconnecting.

What Changed

  • The card accepts a host row with the same slashed-server icon used by the sidebar: red when offline and muted while reconnecting. Row text keeps its warning or muted color, with an optional Reconnect action. Errors stay first; the host row precedes attachment hints and has no dismiss control.
  • A small session-owned hook derives the row from the existing outage state and keeps Reconnect disabled during its attempt, including when the composer swaps with a prompt card.
  • The standalone component is removed. Host detection, the two-second reconnecting grace, immediate offline feedback, refused-host policy, connection helper, failure toast, older-history suppression and read-error handling are unchanged.
  • Host text keeps its previous single-line truncation policy. QA caught a narrow-layout regression in the first version: wrapping beside Reconnect made the row about 396px tall. The final fix restores a compact row while other notice text still wraps.

Why

This completes #25835's visual follow-up for the host notice introduced in #24898. Extending the approved card reuses its row, ordering and action presentation; keeping the separate component would leave two notice surfaces. The pending action belongs to the session so replacing the input slot does not reset it.

Intended difference from the common pattern: Orca retains its approved single notice card and existing host-outage policy. This change moves the existing host explanation into that surface; it adds no recovery mechanism.

Linked Issue

Follow-up to #24898 and #25835. Maintainer-requested presentation change; no new issue needed.

Visual Proof

Matched macOS screenshots use the same populated native pane and both sidebars at 1200×850. BEFORE is the reviewed base; AFTER is pushed icon-fix commit b7a33f1. The unreachable host and conversation data were injected in an isolated rig.

Theme Before After
Dark Before: separate host line After: host row in notice card
Light Before: separate host line After: host row in notice card

The corrected server icon is muted while reconnecting, after the existing two-second grace. Offline text remains amber; only its icon is red.

Reconnecting, dark Reconnecting, light
Muted server icon while reconnecting, dark Muted server icon while reconnecting, light
Earlier Windows evidence at 4331763, before the icon correction

Windows screenshots at 4331763, before the icon correction, use the actual native app with injected host and conversation state. Windows layout QA at that commit completed: the host row stays 36px tall (38px card), with Reconnect inside the card in both themes and narrow layouts. No Windows baseline was captured; the matched before/after comparison above is macOS.

Windows light, 1200×950 Windows dark, 1200×950
Earlier Windows light Earlier Windows dark
860×700 800×850
Earlier Windows at 860×700 Earlier Windows at 800×850
Approval slot Question slot
Earlier Windows approval slot Earlier Windows question slot

The host text retains its single-line truncation; the attachment hint keeps its normal wrapping and dismiss control.

Earlier Windows host and attachment rows

Supported narrow window and prompt slots

At 800×850 with both sidebars open, the chat pane is 169px wide. The baseline host line is 32px tall; the final card row is 36px tall with Reconnect in bounds. Host text is strongly elided, as with the old line. Existing narrow composer clipping is visible in the baseline and is outside this change.

Before After
Before at 800×850 After at 800×850

After at 800×850, light

Approval slot Question slot
Host row above approval Host row above question
Windows action evidence before the final text-only fix

At c5b9e38, native Windows captured the populated chat and the actual pending Reconnect action. These earlier action checks remain distinct from the final 4331763 layout and prompt screenshots above.

Offline Pending Reconnect
Windows host row and transcript Windows disabled pending Reconnect

Testing

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

Rendered validation used hidden native Electron apps on remote macOS and Windows through Playwright's Chrome DevTools connection. These were isolated synthetic-host checks, not a manual desktop session or a real network outage. The native chat pane and notice components were used directly. The rig injected host status, transcript and prompt data, substituted fake-environment/session RPC responses in generated preload output, and held Reconnect promises. macOS also seeded the existing read-owner registry. No source fixture or screenshot is included in the PR diff.

Earlier Windows QA completed at 4331763, before the icon correction. The configuration-hash stop was an unrelated false alarm, confirmed by the maintainer. Other Codex sessions had added trusted-folder entries on the coordinator's laptop; no QA rig path was present. The saved final screenshots are now attached and their URLs and original file bytes verified; no QA rerun was needed. Windows' own four protected files are unchanged, owned test processes are gone, and private profiles are pruned. Agent hooks were seeded disabled before launch and observed false before chat interactions; no runtime settings snapshot preceded the initial onboarding dismissal. This evidence gap remains explicit.

The earlier c5b9e38 rigs exercised pending Reconnect, blocked duplicate clicks, one existing failure toast, retry and restored-host removal; macOS also checked grace and a short blip. Windows checked refusal, older-history suppression, host plus attachment, and pending composer-to-approval handoff. Earlier 4331763 checks revalidated layout and prompt-row presence after the text-only fix. Fresh macOS captures at b7a33f1 check ServerOff in both themes while offline and reconnecting, both narrow offline views, and approval/question slots. The new smoke checks the glyph, computed colors, compact row geometry and truncation; it does not repeat the earlier action checks. Hooks were observed disabled before any interaction in this macOS run; protected files matched after excluding unrelated Codex trusted-folder entries.

  • Icon follow-up at b7a33f1: two targeted native-chat files and 21 tests passed, including red offline and muted reconnecting ServerOff assertions. Formatting and commit hooks passed. The full orca-ci-checks pre-push gate passed all 23 checks, including lint, quality checks, localization and full typechecking through the machine queue.
  • Current-head CI: Current-head CI completed with 35 terminal checks: 19 passed, 16 skipped, none failed or pending. Static analysis/typecheck, all ten full unit shards, relay integration, Linux and Windows packaging, and the final verify gate executed and passed. Skipped jobs are not counted as passes.
  • Earlier validation at 4331763 and its preceding commits: the full native-chat suite passed 319 files/3,234 tests; after rebase, six affected files/107 tests passed; the narrow-layout fix passed four affected files/49 tests plus scoped web typecheck, formatting and changed-code checks. These results are historical, and the earlier ready workflow reused its exact prior tested source. They are not attributed to the new icon smoke.

Verification limits: the corrected icon has not been recaptured on Windows; its attached captures remain earlier layout/action evidence. No real host loss/reconnection, screen-reader speech, normal populated local conversation, Linux rendered UI, simultaneous error+host+attachment card, or pending composer-to-question handoff was exercised. Ordering and prompt handoffs have source/unit coverage. The fixture blocked rendering all three notice kinds together; genuine send failures appeared in their existing message surface. Catalog console errors occurred during fixture runs, including the fresh macOS icon smoke and final Windows layout smoke, so no clean-console or network end-to-end claim is made.

Review

Independent functional and UI reviews, an architecture challenger who sketched its solution before reading the implementation, and final readiness review without counsel used Codex gpt-6.1-sol at xhigh effort. Rendered QA found N1/P2, excessive narrow host wrapping, fixed at 4331763 and checked by a fresh reviewer. Brennan then reported N2/P2, the wrong host icon. It is fixed at b7a33f1 by reusing the sidebar’s ServerOff glyph and offline color; reconnecting remains muted. The focused follow-up source review found no further issues. No findings remain open and no nits were deferred. The card keeps its empty/populated live-region element within each slot; its instance changes across composer/prompt handoff, so speech continuity is unverified.

Agent skill upstream boundary

  • Not applicable; no skill installer or upstream skill source changes.

Notes

Renderer presentation only: no persisted data, wire protocol, connection ownership, status store, provider or execution changes. React Native mobile uses separate chat components; existing routing excludes plain SSH and WSL workspace launches from this structured-chat surface, so those moved-row paths are not applicable. Paired-runtime desktop rendering is covered by the injected state checks. Folder workspaces do not require a separate code path here.

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)
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​130 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​125
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​75 $\color{#cf222e}{\Huge{\mathbf{−}}}$​76 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1

@brennanb2025

brennanb2025 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Native chat showed an unreachable host as a separate line beside the card used for other notices. The moved row also used a crossed-out Wi-Fi icon instead of the sidebar’s slashed-server icon. This PR puts the offline/reconnecting message and Reconnect action into the existing card, including approval and question slots. The host now uses ServerOff: red offline, muted while reconnecting. Text colors, sizing, truncation and the existing connection behavior stay unchanged.

N1/P2, excessive host wrapping in narrow windows, was fixed at 4331763. Brennan’s follow-up N2/P2, the wrong icon, is fixed at b7a33f1. The focused source review found no further issues; no findings remain open and no nits were deferred.

The icon follow-up passed 21 targeted tests and the full orca-ci-checks pre-push gate. Current-head CI completed with 35 terminal checks: 19 passed, 16 skipped, none failed or pending. Static analysis/typecheck, all ten full unit shards, relay integration, Linux and Windows packaging, and the final verify gate executed and passed. Skipped jobs are not counted as passes.

The PR body now shows eight fresh macOS captures at b7a33f1: offline and reconnecting in both themes, narrow offline views in both themes, and approval/question slots. I inspected all eight original PNGs and the raw rendered measurements, verified their source commit, and compared every uploaded image byte for byte with its capture original. All 20 image URLs in the revised body load as PNGs. Earlier Windows layout screenshots remain explicitly labeled 4331763, before the icon correction; the corrected Windows icon was not recaptured. The maintainer cleared the prior unrelated configuration-hash false alarm.

Rendered proof uses hidden native Electron panes with injected host/conversation/prompt state and generated-preload fake responses. The new icon smoke verifies glyph, computed colors and unchanged geometry; earlier action runs at c5b9e38 cover pending/duplicate-click/failure/retry behavior. No real host was disconnected. Real network recovery, screen-reader speech, normal populated local chat, Linux rendered UI, simultaneous error+host+attachment rendering and pending composer-to-question handoff remain unverified. Fixture console errors and these limits remain disclosed in the body.

The PR remains ready for review. No merge or auto-merge was performed.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 7, 2026 18:19
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: aefaf631-632c-4ddd-bcc0-c79bfb7a0841
📥 Commits

Reviewing files that changed from the base of the PR and between 6c9bb6e and 3bc7e4b.

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

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


📝 Walkthrough

Walkthrough

The structured session now represents host outages as composer notices. The notice hook provides offline or reconnecting text and can expose a reconnect action that connects the runtime host and reloads projects. Notice rows display host-specific styling and honor disabled actions. Tests cover notice ordering, reconnect attempts, prompt interactions, and host recovery.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 3bc7e

The host outage notice remains visible across composer and prompt modes, and Reconnect stays disabled during an attempt. No actionable merge-blocking risk remains; the change is ready for normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: showing native chat host outages in the notice card.
Description check ✅ Passed The description is complete and directly matches the template. It explains the user impact, implementation, rationale, linked issues, visual proof, testing, review status, compatibility considerations…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Place host notices before attachment notices. · NativeChatComposerNotices.tsx:20-22

src/renderer/src/components/native-chat/NativeChatComposerNotices.tsx:20-22
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Place host notices before attachment notices.

The comparator prioritizes errors only. If an attachment notice precedes a host notice, the list renders error → attachment → host. The changed test now expects that order, but the required order is error → host → attachment. Add a priority for each kind and update the test expectation.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 05c53179-6f7c-44b3-bef9-81f6a7132acb
📥 Commits

Reviewing files that changed from the base of the PR and between e6bcc5a and 4331763.

📒 Files selected for processing (7)
  • src/renderer/src/components/native-chat/NativeChatComposerNotices.test.tsx
  • src/renderer/src/components/native-chat/NativeChatComposerNotices.tsx
  • src/renderer/src/components/native-chat/NativeChatHostOutageNotice.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.host-outage.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/native-chat-composer-notice.ts
  • src/renderer/src/components/native-chat/use-native-chat-host-outage-notice.ts
💤 Files with no reviewable changes (1)
  • src/renderer/src/components/native-chat/NativeChatHostOutageNotice.tsx

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

@brennanb2025
brennanb2025 merged commit b57bb7c into main Oct 7, 2026
23 of 25 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.

1 participant