Repository navigation
Fix remote agent workflows and runtime performance - #7976
SiteupAgencia wants to merge 21 commits into
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe changes add runtime-aware provider account clients for local and remote environments, update account settings and status-bar switchers to consume remote snapshots, and add remote-specific UI text and controls. Activity construction now derives live agents from terminal metadata and applies deterministic ordering, status grouping, and read-state handling. Compact agent rendering and mirrored agent synchronization preserve stable identity and timestamps. Native chat working suppression, Hermes catalog rendering, mobile PTY status retention, IPC authorization handling, remote session cleanup, and account listing behavior are also updated. 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/settings/AccountsPane.tsx (1)
505-539: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winNarrow the
loadAccountseffect dependency instead of the wholesettingsobject.Depending on the full
settingsobject means any unrelated global setting change (theme, terminal font, etc.) re-runsloadAccounts, which for remote scope re-establishes a subscribe/unsubscribe cycle (up to a 15s timeout) against the remote server even though onlyactiveRuntimeEnvironmentIdactually matters here.♻️ Suggested narrower dependency
- }, [settings, setRateLimitsFromPush]) + }, [settings.activeRuntimeEnvironmentId, setRateLimitsFromPush])Note: if other fields consumed inside
listProviderAccounts(viasettings) can also change independently and matter, extend the dependency list accordingly, but avoid depending on the whole object if it isn't referentially stable across unrelated updates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 33d1cbed-2787-44bb-968a-700f03a039ca
📥 Commits
Reviewing files that changed from the base of the PR and between 1b0febc and 2fd6bc719ded6d2517d06fffc5723f6092d3d469.
📒 Files selected for processing (20)
src/main/ipc/notification-authorization-status.tssrc/main/runtime/rpc/methods/accounts.tssrc/renderer/src/components/activity/ActivityPrototypePage.test.tssrc/renderer/src/components/activity/ActivityPrototypePage.tsxsrc/renderer/src/components/settings/AccountsPane.test.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/sidebar/WorktreeCardAgents.test.tsxsrc/renderer/src/components/sidebar/WorktreeCardAgents.tsxsrc/renderer/src/components/sidebar/worktree-title-derived-agent-rows.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-runtime-groups.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/runtime/runtime-provider-accounts-client.test.tssrc/renderer/src/runtime/runtime-provider-accounts-client.tssrc/renderer/src/runtime/web-session-tabs-sync.test.tssrc/renderer/src/runtime/web-session-tabs-sync.ts
|
|
||
| it('shows remote-owned accounts with local sign-in actions disabled', () => { | ||
| useAppStore.setState({ | ||
| runtimeEnvironments: [{ id: 'env-1', name: 'LXC1 Siteup' }] as never | ||
| }) | ||
| const markup = renderPane({ | ||
| ...getDefaultSettings('/tmp'), | ||
| activeRuntimeEnvironmentId: 'env-1' | ||
| }) | ||
|
|
||
| expect(markup).toContain('Showing accounts managed by Remote server.') | ||
| const addAccountIndex = markup.indexOf('Add Account') | ||
| expect(addAccountIndex).toBeGreaterThan(0) | ||
| expect(markup.slice(markup.lastIndexOf('<button', addAccountIndex), addAccountIndex)).toContain( | ||
| 'disabled=""' | ||
| ) | ||
| expect(markup).not.toContain('Account location') | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm RuntimeEnvironment's display-name field and cross-check usage
rg -n "interface RuntimeEnvironment|type RuntimeEnvironment" -A 10 -g '*.ts' src/shared src/renderer
rg -n "runtimeEnvironments\.find" -g '*.tsx' src/renderer/src/componentsRepository: stablyai/orca
Length of output: 1978
Adjust the remote-account assertions in this test
This case should render Showing accounts managed by LXC1 Siteup. with the provided runtimeEnvironments entry, so the current Remote server expectation misses the scoped-label path. If you want to cover the new !isRemoteAccountScope gate, pass wslSupportedPlatform: true too; otherwise Account location is already hidden by the existing WSL check.
|
Follow-up validation on a real headless Remote Orca Server:
This confirms the list/select/remove routing in this PR and also demonstrates the remaining follow-up described in #7973: a supported interactive add/re-auth flow for headless remote runtimes. This PR intentionally does not claim to solve that login flow. |
|
Additional validation/fix in
Validation: 600 focused Vitest tests passed, node/web typechecks passed, focused oxlint passed, and |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/native-chat/native-chat-working-suppression.ts (1)
3-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the asymmetric five-second timestamp tolerance.
Explain why user messages may precede
workingStartedAtby five seconds while assistant messages may not, including why that threshold is safe. This temporal correlation rule is otherwise easy to change incorrectly.As per coding guidelines, “When writing or modifying code driven by a design doc or another non-obvious constraint, add a brief comment explaining why the code behaves that way.” <coding_guidelines>
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 88ac5b96-2dc3-4432-a70c-3334df0ee5e5
📥 Commits
Reviewing files that changed from the base of the PR and between 2fd6bc719ded6d2517d06fffc5723f6092d3d469 and 0cc63427a7f9acd29111c6ab7eace676e3784309.
⛔ Files ignored due to path filters (1)
resources/hermes.pngis excluded by!**/*.png
📒 Files selected for processing (7)
src/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.tssrc/renderer/src/components/native-chat/NativeChatView.tsxsrc/renderer/src/components/native-chat/native-chat-working-suppression.test.tssrc/renderer/src/components/native-chat/native-chat-working-suppression.tssrc/renderer/src/lib/agent-catalog.test.tsxsrc/renderer/src/lib/agent-catalog.tsx
✅ Files skipped from review due to trivial changes (1)
- src/renderer/src/lib/agent-catalog.test.tsx
|
Follow-up pushed in The selected visible thread was being unacknowledged by the button and then immediately acknowledged again by the visible-thread auto-ack effect. Explicit Mark thread unread now wins until the thread is reopened (clicking the row again, switching away and back, jumping to its workspace, or marking all read). Validation: 4 focused test files / 627 tests passed, web + node typechecks passed, focused oxlint passed, and |
|
Additional follow-up pushed in Closing a terminal through a remote runtime removed the host tab but left its retained completed-agent row behind on the client. Remote workspace snapshots now identify target-owned terminal tabs removed by the authoritative host and drop their live/retained agent status locally. This keeps Live validation on the rebuilt app: the two test terminals were closed and their stale |
|
Thanks for this — you found the real root cause, picked the right seam ( We validated against a live paired-server reproduction and reviewed the diff in depth; we can't take this PR as-is, for two categories of reasons: Scope. Only part of the diff addresses #7973. The PR also changes remote agent-status retention in Defects in the account slice:
We've opened #7999, which keeps your direction and semantics for list/select/remove routing (with credit), but uses a persistent |
|
Added Validation: 33 focused Activity tests, web typecheck, oxlint/React Doctor hooks, formatting, and a full macOS ARM64 build. The build is installed locally. End-to-end remote validation is pending a safe restart window because two real agents are still active on the VPS runtime. |
ec5416f to
6630f4b
Compare
6630f4b to
7445536
Compare
# Conflicts: # src/main/native-chat/transcript-reader.ts # src/main/runtime/orca-runtime.ts # src/renderer/src/components/native-chat/native-chat-attachment-upload.ts # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/lib/launch-agent-in-new-tab.ts
# Conflicts: # src/main/providers/agent-foreground-process.ts
|
Closing as superseded — the linked issue(s) for this PR were fixed by another change that has already been merged.
Superseding merge: #7999 Thank you for the contribution! If anything remains unaddressed, please open a new issue or PR against current |
Summary
/proc/*/fdport sweeps with targeted process-tree reads andssv1.4.135-rc.3terminal batching, hidden-tab parking, restore, and backpressure workValidation
pnpm typecheckautomation.externalManagersFixes #7973
Latest revision (f19aecc)
Validation: 29 focused tests, full typecheck, disposable remote switch from gpt-5.5 to gpt-5.6-sol medium, matching installed app.asar hashes on macOS and Linux, both runtimes ready, remote HTTP 200.
Upstream sync (c3db912)
ELI5
Several remote-agent and paired-runtime issues are fixed together: activity lifecycle, unread state, identity, Hermes status, native chat selection, account switching per runtime, Hermes cron management, and lower Linux runtime load. Remote workflows should feel consistent and less broken under load.