Repository navigation
Name the workspace in the sync problem card when it is not the one in view - #2217
Conversation
Node's WebSocket (undici) fires only 'error' on a refused connection, never 'close'. The client scheduled its retry and rejected openPromise on 'close' alone, so a Store whose first attempt came before the server listened stayed offline for good. This is the dead socket in develop runs 5208 and 5211, where upload-roundtrip logged '[WS] Connection failed' and then waited out its timeout. Teardown and retry now run once per socket from 'close', and from 'error' when the socket never opened.
|
CI on b562afe stopped in the lib integration stage: Generated by Claude Code |
|
Complexity review after merge (+230/-14, patches only). Worth a small follow-up, not urgent.
Generated by Claude Code |
Requested by Joep · project thread
Before: viewing the Ontola drive, the Sync page showed "This server does not have this workspace" with "Drive atomic:LoASJ... is not enrolled for sync on this node". That is a different drive than the one in view, shown as a raw id, and "Turn off server sync" would have switched the viewed drive instead.
After: when the problem belongs to another workspace, the card says "This server does not have “<title>”" (or "another workspace on this device" if its name cannot be loaded), says it is not the workspace you are viewing, and only offers "Connect a device". The raw server message stays as the quoted detail. Problems with the viewed workspace read as before.
The Sync page builds this card from parked changes of any workspace on the device, not only the viewed one. The workspace is read from the server message (atomic: and did:ad: spellings treated alike) or from the parked change itself (
store.driveOfSubject), and its title is loaded inSyncRoute.How:
syncProblem.tsgetsdriveOfanddriveTitleinputs and anotherDrivefield; unit tests cover the viewed drive, another drive with and without a title, adid:ad:spelling, and a drive found from the entry. Typecheck, lint andpnpm clean-translationsdone (three new msgids per catalog, nothing removed). Screenshots of the card are shared in the project thread, not in the repo.Also in this PR (commit 2dcde14): the e2e spec
sync.spec.ts"offline edits sync to server when connection is restored" failed in CI with the browser error "Save is still queued; the server has not acknowledged it." That error came from the debounced scheduled save reporting a queued offline edit throughStore.notifyError, although a queued edit is a normal state thatgetSaveStatealready shows. The queued case now throws a typedSaveQueuedError, and only the scheduled-save path (SaveStatusCoordinator.createScheduler) ignores it. Explicitresource.save()callers still get the throw exactly as before; the wider question of howsave()reports a commit that the outbox is still retrying is not touched here.The host name in the card is still the node the app is connected to (node1.atomicserver.eu); that changes with the atomic.place node hostname cutover, not with this PR.
Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01FG3tCqQCD8TqAEhJ1Q7hmg