Repository navigation
Commit 0de4eac
fix(client-runtime): an attached primary no longer reconnects on every platform poll (#1477)
## What Changed
The saved-connection shadow path now installs the attached primary with `retainEquivalentRuntime: true`, the same option upstream's platform path uses.
An unchanged primary keeps its live connection across platform polls.
## Why
A client-only desktop with a saved connection to its attached server tore down and reopened the primary WebSocket on every 3 s platform poll.
The shell and thread streams never settled, so the sidebar and conversation stopped updating while the agent kept working.
```text
platform poll (3 s) → reconcilePlatform → SavedConnectionPrecedence.shadow
→ installEntry(entry) # no retain: close service scope, reconnect
```
The new test in `registry.fork.test.ts` fails 5 of 5 runs without the fix and passes with it.
## UI Changes
Both runs used the `qa-desktop` VM and the same steps: client-only desktop, attached to a guest test backend, with a saved connection to the same environment.
| Signal | Before, `0.0.45-hyprws.1` | After, this branch at `eafa40241cc` |
| --- | --- | --- |
| Renderer `/ws` opens in 45 s | 15, one every 3.0 s | 0 |
| `t3 project add` on the server | absent 15 s later | shown within 3 s |
| Before | After |
| --- | --- |
|  |  |
Before:
https://github.com/user-attachments/assets/f5edfb6b-12ac-4b11-957a-02af1ca949ab
After:
https://github.com/user-attachments/assets/ea04230c-edb7-4b63-a30d-c6900f055cc3
<details>
<summary>Checks</summary>
- `vp test run packages/client-runtime/src/connection/registry.fork.test.ts` → 3 passed
- `vp test run packages/client-runtime/src/connection/registry.test.ts` → 28 passed
- `vp run typecheck` in `packages/client-runtime` → exit 0
- `vp run fork:ci` → exit 0
- `vp run dist:desktop:linux` → exit 0; the built bundle's shadow path passes `retainEquivalentRuntime`
</details>
## Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] I included before/after screenshots for any UI changes
- [x] I included a video for animation/interaction changes
Closes #1469
Closes #1472
🤖 claude-opus-5-5 via Claude Code in T3 Code
## Fork trailers
Squashes:
- bd553c7 fix(client-runtime): an attached primary no longer reconnects on every platform poll (#1477) (#1477)
- ead034c fix(fork): adapt fork seams to v0.0.46-nightly.20261005.2689
Fork-Domain: backend-attach
Fork-Tier: bugfix
Fork-Upstreamable: no1 parent 49aa471 commit 0de4eac
2 files changed
Lines changed: 51 additions & 5 deletions
File tree
- packages/client-runtime/src/connection
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| |||
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
80 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
81 | 98 | | |
82 | 99 | | |
83 | 100 | | |
| |||
96 | 113 | | |
97 | 114 | | |
98 | 115 | | |
99 | | - | |
| 116 | + | |
100 | 117 | | |
101 | 118 | | |
102 | 119 | | |
| |||
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
140 | 181 | | |
141 | 182 | | |
142 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
0 commit comments