Repository navigation
fix(linux): recover saved remote connections without replacing active sessions - #146047
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 1:02 PM ET / 17:02 UTC (Revision 10). ClawSweeper reviewWhat this changesThe Linux companion adds saved-remote retry and SSH recovery, preserves active connections through Connection Settings, and refreshes native RPC after local Start or Restart. Merge readiness✅ Ready for maintainer review The previous Settings-return, credential-reuse, and local RPC blockers are addressed. No remaining actionable defect was found, and the recovery work remains absent from current main. Priority: P2 Review scores
Verification
How this fits togetherThe Linux companion connects its embedded dashboard and native features to a local or remote Gateway. Tray actions and saved connection settings feed its navigation, credential, and SSH lifecycle owners. flowchart TD
A[Tray and settings actions] --> B[Ordered connection operations]
C[Saved settings and credentials] --> B
B --> D[Local service or remote SSH connection]
D --> E[Current navigation owner]
E --> F[Dashboard and native RPC]
D --> G[SSH exit monitoring]
G --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +240, Docs +8, Other +2657. Total +2905 across 14 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep connection publication, passive dashboard presentation, and Settings feedback separate while preserving saved credentials and the selected transport. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes the current-main remote replacement and readiness defects, and the retained native before/after record describes concrete Settings and RPC failures. This read-only review did not execute the application. Is this the best way to solve the issue? Yes. The patch repairs the existing connection and navigation owners, preserves the credential format, and resolves the previous findings without adding a competing transport API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9d1137bee018. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
985a523 to
6ef43ef
Compare
d7102a9 to
a92cbc1
Compare
|
Merged via squash.
|
* commit '201f11afefdb19a9c75e9d3542bf7425c80df7a7': (141 commits) fix: keep catalog discovery scoped and execution lazy (#147159) fix: serialize reclamation worker shutdown with foreground writes (#147178) test(sessions): cover abrupt committed transcript recovery (#143984) fix: stop transcript storms during context overflow recovery (#147202) fix: reduce CPU overhead for small history and usage reads (#147205) fix: resume tasks after tools finish and the model times out (#147203) refactor(scripts): share SQLite reliability message waits (#146900) feat(exec): configure approval reviewer thinking and fastMode (#147192) test: remove redundant Bonjour module headers (#146981) refactor: share streaming media tail boundary update (#146989) refactor(tui): classify resume candidates once (#146983) improve: skip unused toast dismissal work (#147196) fix(linux): recover saved remote connections without replacing active sessions (#146047) fix: doctor stays silent when Windows state dir is under OneDrive (#123720) feat: announce successful Daybreak retries (#147146) feat(code-mode): reuse results across code cells (#147154) refactor(test): reuse CLI plugin fixture writer (#147186) test: skip unused compiler setup in routing fixtures (#147194) test: reuse LINE webhook runtime fixture (#146710) fix(code-mode): check automation and process result types (#147143) ...
… sessions (openclaw#146047) * fix(linux): recover remote sessions and preserve Settings return * test(linux): distinguish dashboard presentation from reconnect * test(linux): skip unsupported menu introspection endpoints * fix(linux): reuse saved credentials for Settings connections * style(linux): format composed navigation test imports * fix(linux): refresh local RPC behind connection settings
Related: #145355
Stack 3/8.
Previous: #146046 | Next: #146048
This same-repository branch is writable by maintainers with push access.
What Problem This Solves
Fixes false readiness and lost retry after remote/SSH failures, healthy sessions being reset by Open Dashboard, and Connection Settings trapping users instead of returning to their existing dashboard. It also fixes blank same-endpoint Settings Connect losing runtime credentials even though their saved references remain in config, and local Start/Restart failing to publish fresh native RPC configuration while Settings owns the page.
User Impact
Saved remote connections can recover without implicit local startup. Back and Open Dashboard leave Settings without replacing a healthy connection; local Start also restores the dashboard when the Gateway becomes healthy. Failed edits do not masquerade as failure of the connection still in use. Blank credential fields reuse configured credentials only for the same endpoint; an explicit replacement takes precedence. Explicit local Start/Restart refreshes the native RPC connection without dismissing a valid local Settings editor.
Why This Change Was Made
Keep connection preparation, committed presentation, and transient editor feedback under their respective owners. Explicit saved retry still reconnects; passive presentation does not. Settings captures the page being edited away from, while Open Dashboard retains its canonical target. The current-main integration preserves native-browser initialization, desktop session routing, and one route-authorized SSH shutdown without reconfiguring RPC for presentation. Submitted credentials are resolved once for browser bootstrap and native RPC, while persistence retains the original submission intent and raw SecretRefs rather than writing resolved bytes. Explicit local service completion publishes its fresh RPC configuration under the navigation owner even when Settings suppresses presentation; passive Back and healthy-status polling remain presentation-only.
Evidence
7a9e484(signed), with the exact source tree accepted by the focused native Stop/Start and changed-credential Restart proof below. Core CI and Ubuntu22 LinuxApp CI passed on that exact head. LinuxApp includes formatting, Rust tests/build, ABI/Omarchy tests and the actual inline-browser flow; its macOS companion also passed. Bundle, AppImage and packaged first-run steps were skipped.a92cbc1, LinuxApp CI passed formatting, 183 application tests, 11 native-browser tests and build, then exposed a stale inline-browser fixture expectation: passive Open Dashboard was still expected to clear tabs. The fixture now checks that the same tab/session/URL survives passive presentation, then uses the app-owned Connection Settings menu and same-URL Connect to verify explicit replacement clears tabs. Its existing reload, pointer, history, snapshot and download save/cancel checks remain.UnknownMethodduring discovery of an app-owned D-Bus connection, after passive retention passed and before any menu action. The bounded fixture repair skips only that discoveryIntrospecterror; owner checks, menu actions, malformed replies and other errors remain fatal. The same production binary then passed all four phases, including actual Settings/Connect, tab clearing/reopen, snapshots and download save/cancel, with source pins unchanged and an inspected painted PASS capture. This Ubuntu24/custom-protocol proof is not an attribution of the original Ubuntu22 failure's exact call and does not replace new-head Ubuntu22 LinuxApp CI. Fresh focused P2 review was clean. That fixture-only repair left production source unchanged.a5167b0passed core CI and Ubuntu22 LinuxApp CI, including the actual revised inline-browser flow, Rust formatting/tests/build, Omarchy and ABI-scanner tests. The macOS companion job also passed. Bundle, AppImage and packaged first-run steps were skipped; this is not packaging proof or CI proof for the credential-repair head.567066cat the Submitted credential owner. In a focused native auth run, the retained before binary lost both browser-bootstrap and production-RPC credentials after blank same-endpoint Connect for file-token and env-password cases. Both candidate cases authenticated browser bootstrap and the new production RPC connection, answered a fresh config pulse, retained raw refs/providers and the same SSH process, kept resolved bytes out of private config, and quit normally with no owned children. Formatting, 18 credential-owner tests, native build and fresh scoped P2 review passed on the frozen candidate.7b72184composes that preserved auth commit with maine986b89. It retains the upstream unknown-status recovery fix, including its regression test, and derives tray Start enablement from the explicit stopped phase through the existing deferred main-thread callback. Auth and Settings behavior are unchanged. Fresh focused composition P2 review passed. Its LinuxApp run stopped at one Rust import-wrap formatting difference before tests/build/inline execution;566ebd6applies exactly that mechanical correction, with non-whitespace bytes unchanged. Ubuntu22 LinuxApp CI on566ebd6then passed formatting, Rust tests/build and the actual inline-browser flow; the macOS companion also passed. No additional native auth run is claimed for this composition.566ebd6failed the Control UI startup-byte budget. The exact tested main had the same 355770-byte result and identical relevant inputs, so this was inherited rather than growth from the Linux delta. Commit2c861c5merges mainca0746ad, which includes the independently landed owner repair. The complete 14-path Linux delta is byte-identical across that sync; no UI or budget change was authored here. Core CI on2c861c5then passed, before the additional local RPC completion repair. Fresh ready-head core and Ubuntu22 LinuxApp CI are required for that repair.Before the command-exposure correction, Back remained in Settings with an explicit IPC error:
After the correction, the same Local Restart → Settings → Back flow restored the synthetic dashboard:
This pair demonstrates the IPC correction and visible return, not the separate queued-operation or late-Save guarantees. Both captures precede the current-main replay.