Skip to content

feat(settings): live evolu sync status per transport - #98

Merged
pepakriz merged 3 commits into
mainfrom
settings-ux
Sep 27, 2026
Merged

pepakriz merged 3 commits into
mainfrom
settings-ux

Conversation

@pepakriz

Copy link
Copy Markdown
Contributor

Summary

  • Evolu update. Dependencies bumped, including @evolu/common 8.11. That release changed the SharedWorker tab protocol, so the CLI/test client now builds its deps through createEvoluDeps instead of wiring the worker port by hand. Before this, every Evolu-backed test timed out.
  • CLI teardown fix. The CLI/test client now keeps the SharedWorker's resources and disposes them before its runs. This removes the "Cannot use a disposed object" defect that every CLI command and test ended with. The reportDefect filter that used to hide it is gone, so any real defect shows up again.
  • Sync status in security settings. Each active transport shows a live sync status read from Evolu's syncState: synced, syncing, connecting, offline, or error, plus the time or reason that matters.
    • The status is debounced so it doesn't flicker on writes.
    • The relay list is reworked: the URL leads each row, the owner-id placeholder is shown as a label, a switch replaces the activate/deactivate buttons, and the list sits above the add form.

Test plan

  • tsc -b, Biome on src, and Vitest (712 tests) pass
  • CLI tables list exits without the teardown defect
  • Checked in the dev server against the real relays, an unreachable wss://localhost:1, and a deactivated relay

🤖 Generated with Claude Code

https://claude.ai/code/session_01UpBbspBaj5dyAGs5jttwJA

pepakriz and others added 3 commits September 27, 2026 13:20
Evolu 8.11 changed the SharedWorker tab protocol: the worker now sends
Waiting/Connected before DbWorkerInit and tabs elect their own leader.
The CLI/test client wired the port by hand, treated every message as a
DbWorker init and announced itself as leader, so Evolu never started
and every Evolu-backed test timed out. Use createEvoluDeps, which the
web platform uses too and which owns the shared worker and speaks its
protocol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI/test client started the SharedWorker with a fire-and-forget
run(initSharedWorker(self)) and dropped the resources it returns, so on
shutdown only run disposal tore it down. That disposed the tenants' own
runs before the tenant teardown that still uses them, and every command
and test ended with "Cannot use a disposed object", which a custom
reportDefect filtered into a warning.

Keep the returned stack in the disposer so it is disposed before run and
workerRun, and drop the filter so any real defect surfaces again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpBbspBaj5dyAGs5jttwJA
Evolu 8.11 publishes a syncState snapshot of every relay, so the security
settings can finally tell whether a configured transport actually works
instead of only whether it is switched on. Each active relay gets one
status line (synced, syncing, connecting, offline, error) with the time
or reason that matters, settled for 400 ms so writes do not flicker it.

The list itself is reworked around that: the URL leads each row in full
(the wss: scheme toned down, the owner-id placeholder shown as a label),
a switch replaces the activate/deactivate buttons, rows share one
bordered group, and the list sits above the add form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpBbspBaj5dyAGs5jttwJA
@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
payky Ready Ready Preview Sep 27, 2026 11:21am UTC

@pepakriz
pepakriz merged commit e23673b into main Sep 27, 2026
5 checks passed
@pepakriz
pepakriz deleted the settings-ux branch September 27, 2026 11:40

This branch was successfully deployed

1 active deployment
Preview — 9c71400a Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant