Skip to content

feat(settings): move Connections to Integrations + global toast monitor#975

Merged
Astro-Han merged 4 commits into
devfrom
claude/settings-integrations-move
May 28, 2026
Merged

feat(settings): move Connections to Integrations + global toast monitor#975
Astro-Han merged 4 commits into
devfrom
claude/settings-integrations-move

Conversation

@Astro-Han

@Astro-Han Astro-Han commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire the Integrations tab into the settings shell and move the servers / MCP / LSP / plugins surface out of the right-panel Status section.
  • Add a global ConnectionHealthProvider that owns the 10s server health probe, observes MCP / LSP transitions, and fires coalesced per-category Toasts on healthy → broken transitions. Same broken state does not re-fire until recovery; first-probe broken at startup fires exactly once.
  • Migrate the LSP master toggle from General to Integrations (per [Feature] UI rewrite v2 Area D: settings modular rollout #604 scope).
  • Right-panel Status tab now carries only Summary; mobile status popover is intentionally untouched.

Closes #862. Refs #604.

Why

#862 closed on the architectural decision (Integrations placeholder created in PR #951) but the actual move never happened. The placeholder file still pointed at TODO. Splitting Connections from the session-scoped right panel into a global settings surface + ambient toast monitor delivers the agreed outcome and removes the only remaining duplicated configuration surface for connections.

Design notes

  • Visual: see docs/design/scratch/2026-05-28-settings-integrations-compare.html (variant A — Settings-native, matching Worktrees / General).
  • Component reuse: SettingsList + SettingsRow + Switch + Button + DialogSelectServer, no new shared component. Per-item rows use the same <li> shape as SettingsWorktreeRow.
  • Data flow: Integrations page reads from useGlobalSync().child(directory) for MCP / LSP / plugins, useServer() for servers, and useConnectionHealth() for server probe results — no second 10s loop.
  • Toast click → openSettingsTab("integrations") via a module-level handle registered in Layout (mirrors setNavigate from notification-click.ts).

Acceptance check

  • bun typecheck clean
  • bun test clean (1619 pass)
  • bun test packages/app/e2e/status/status-popover.spec.ts clean (3 passing — right-panel Status only shows Summary; mobile popover untouched)
  • bun run snap settings-shell — grid covers General / Models / Integrations / Memory; PNG under docs/design/preview/screenshots/settings-shell.png
  • Manual bun run dev:desktop walk on macOS — Integrations tab renders the 4 sections; "Manage servers" button + LSP master toggle land in the right places; startup Toast fires for the unreachable test server and "Open Integrations" jumps to the new tab; right-panel Status tab is summary-only.

Out of scope

  • DialogSelectServer / DialogConnectProvider / DialogSelectMCP visual rework.
  • Mobile status popover (still shows the legacy connection tabs by design — different surface).
  • A dedicated connection-fail-toast snap target. The Toast component is from @opencode-ai/ui with existing visual coverage; new wiring is only i18n + click handler, both covered by typecheck + the manual walk.
  • Per-directory permission / scope handling around Integrations (no behavior change vs. the old right-panel widget).

Risk / residual

  • The global poller now runs while user is on the home route too (no project active). MCP / LSP observers are inert in that state; server probe continues at 10s. Net negligible.
  • On project switch the per-category "already notified" sets are reset, so the first probe in a new project follows the same "fire once if broken" rule. Intentional.

Wires the Integrations tab into the settings shell and moves the
servers / MCP / LSP / plugins surface out of the right-panel Status
section. The page reuses SettingsList / SettingsRow / Switch / Button
and reads MCP, LSP and plugins off the per-directory global-sync child
store; servers come from useServer plus a shared health probe.

Connection health alerts are no longer a glanceable widget. A new
ConnectionHealthProvider mounted at the app shell owns the 10s server
HTTP probe and reactively observes MCP / LSP transitions. Healthy to
broken transitions fire a coalesced, per-category toast that opens the
new tab via a module-level openSettingsTab handle; the same broken
state does not re-fire until the connection recovers, and an
already-broken connection found on first probe at app start fires
exactly once.

LSP master toggle moves from General to Integrations. SessionStatusPanel
keeps only the Summary block; the mobile status popover is untouched.

Closes #862. Refs #604.
@Astro-Han Astro-Han added enhancement New feature or request P3 Low priority app Application behavior and product flows ui Design system and user interface labels May 28, 2026
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 30 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c41a36a1-ffca-4c88-ac84-8894c84b092a

📥 Commits

Reviewing files that changed from the base of the PR and between 7419037 and 5aa798c.

📒 Files selected for processing (17)
  • packages/app/e2e/app/home.spec.ts
  • packages/app/e2e/settings/settings-shell.spec.ts
  • packages/app/e2e/snap/settings-shell.snap.ts
  • packages/app/e2e/status/status-popover.spec.ts
  • packages/app/src/app.tsx
  • packages/app/src/components/session/session-status-connections.tsx
  • packages/app/src/components/session/session-status-panel.tsx
  • packages/app/src/components/session/session-status-summary.tsx
  • packages/app/src/components/settings-general.tsx
  • packages/app/src/context/connection-health.tsx
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts
  • packages/app/src/pages/layout.tsx
  • packages/app/src/pages/settings/integrations.tsx
  • packages/app/src/pages/settings/settings-shell.tsx
  • packages/app/src/utils/settings-navigation.ts
  • packages/opencode/test/config/e2e-smoke-tagging.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/settings-integrations-move

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 and usage tips.

@github-actions github-actions Bot added P2 Medium priority and removed P3 Low priority labels May 28, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested priority: P2 (includes user-path files (packages/app/src/app.tsx, packages/app/src/components/session/session-status-connections.tsx, packages/app/src/components/session/session-status-panel.tsx, packages/app/src/components/session/session-status-summary.tsx, packages/app/src/components/settings-general.tsx, packages/app/src/context/connection-health.tsx, packages/app/src/i18n/en.ts, packages/app/src/i18n/zh.ts, packages/app/src/pages/layout.tsx, packages/app/src/pages/settings/integrations.tsx, packages/app/src/pages/settings/settings-shell.tsx, packages/app/src/utils/settings-navigation.ts)).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the connection health monitoring (Servers, MCP, LSP, and Plugins) from the session-scoped right-panel connections component to a new global ConnectionHealthProvider context and a dedicated "Integrations" tab in the Settings panel. It also introduces a global connection health monitor that triggers toasts when connections fail, and updates settings navigation, i18n dictionaries, and E2E tests accordingly. The review feedback identifies two critical reactivity issues in the new ConnectionHealthProvider where using createEffect(on(...)) on reactive store proxies prevents SolidJS from tracking nested property changes (such as MCP and LSP statuses). Removing the on wrapper is recommended to allow SolidJS's auto-tracking to work correctly.

Comment thread packages/app/src/context/connection-health.tsx Outdated
Comment thread packages/app/src/context/connection-health.tsx Outdated
@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown

Perf delta summary

Comparator: pass

Profile / Scenario interaction median interaction worst long task max tbt frame gap p95 frame gap max jank count cls status
default / homepage-cold 40 -> 32 (-8) 40 -> 32 (-8) 90 -> 68 (-22) 40 -> 18 (-22) 33.3 -> 16.8 (-16.5) 166.7 -> 166.7 (0) 4 -> 4 (0) 0 -> 0 (0) pass
default / long-session-input-lag 48 -> 48 (0) 48 -> 48 (0) 0 -> 0 (0) 0 -> 0 (0) 16.7 -> 16.7 (0) 16.8 -> 16.8 (0) 0 -> 0 (0) 0 -> 0 (0) pass
default / session-streaming-long 40 -> 32 (-8) 56 -> 56 (0) 0 -> 0 (0) 0 -> 0 (0) 16.7 -> 16.8 (+0.1) 16.8 -> 16.8 (0) 0 -> 0 (0) 0 -> 0 (0) pass
default / tool-call-expand 24 -> 24 (0) 24 -> 24 (0) 0 -> 0 (0) 0 -> 0 (0) 16.8 -> 16.8 (0) 16.8 -> 16.8 (0) 0 -> 0 (0) 0 -> 0 (0) pass
default / terminal-side-panel-open 40 -> 48 (+8) 40 -> 48 (+8) 0 -> 0 (0) 0 -> 0 (0) 33.4 -> 33.4 (0) 33.4 -> 33.4 (0) 0 -> 0 (0) 0 -> 0 (0) pass
default / session-scroll-reading 16 -> 16 (0) 16 -> 16 (0) 0 -> 0 (0) 0 -> 0 (0) 16.7 -> 16.8 (+0.1) 16.7 -> 16.8 (+0.1) 0 -> 0 (0) 0 -> 0 (0) pass

Astro-Han added 2 commits May 28, 2026 18:55
`createEffect(on(() => Object.entries(store.mcp ?? {}), ...))` only tracks
the outer keys array, not each entry's `.status` field — a MCP flipping
from connected to failed without changing keys would silently skip the
toast. Same hole for LSP, whose source returned `store?.lsp ?? []`.

Drop the `on(...)` wrapper and read `m?.status` / `item.status` inside
the effect body so SolidJS auto-tracks each nested field.
The right-panel Connections section moved to Settings.Integrations, so
two @smoke tests broke:

- home.spec.ts: route the "Manage servers" dialog test through the
  Integrations tab in Settings instead of the right-panel status panel.
- settings-shell.spec.ts: Integrations is now a visible tab; bump the
  nav-list assertion to 6 tabs and drop the toHaveCount(0) guard.
@Astro-Han

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Renamed `@smoke project home status panel can open the server picker
dialog` to `@smoke settings integrations can open the server picker
dialog` in 11aba5b; the inventory snapshot in e2e-smoke-tagging needs
to match.
@github-actions github-actions Bot added the harness Model harness, prompts, tool descriptions, and session mechanics label May 28, 2026
@Astro-Han Astro-Han merged commit 0f4c718 into dev May 28, 2026
27 checks passed
Astro-Han added a commit that referenced this pull request May 28, 2026
Bump PawWork desktop release version to 2026.5.29.

Changes since v2026.5.28:
- feat(settings): move Connections to Integrations + global toast monitor (#975)
- feat(ui): display cache hit rate with one decimal place (#967)
- fix: stabilize session opening state (#969)
- fix(session): repair stale paginated question blockers (#962)
- fix(ui): refit read-file icon into 0-20 viewBox (#964)
- fix: allow running tools to expand
- fix: add run lifecycle diagnostics
- fix: harden Electron repair fallback
- refactor: remove legacy theme choices
- ci: stabilize e2e Playwright install and PR triage paths

Verification: diff scope matches prior release bump (#958) — only the version string in packages/desktop-electron/package.json and the workspace entry in bun.lock. All CI checks green (e2e-artifacts required a rerun due to Playwright browser install flake unrelated to this change).
@Astro-Han Astro-Han deleted the claude/settings-integrations-move branch June 2, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows enhancement New feature or request harness Model harness, prompts, tool descriptions, and session mechanics P2 Medium priority ui Design system and user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Decide right-panel Connections section position (move to Settings or keep, alert channel needed)

1 participant