generated from eblume/project-template
heph-tui sync health: last-sync age, pending conflicts, auth-failure indicator #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/tui-sync-health"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A spoke (e.g. gilbert) could silently stop syncing — an expired token → 401, or the hub asleep/unreachable — with the only evidence buried in
hephd.log. This adds the visibility, and documents the auth-longevity fix.hephd): tracksSyncHealth(last attempt/success time, last error, auth-failure flag) from the background sync loop andsync.now, classifying an HTTP 401 as an auth failure. Thesync.statusRPC now returns that health plus the pending merge-conflict count (soheph sync --statusshows it too).⟳ <age>since the last good sync, red⚠ authwhen re-login is needed,⚠ offlinewhen the hub is unreachable, and⚠ N conflictswhen conflicts are pending. The event loop polls on a 2s tick so the age advances and failures appear even while idle. Standalone instances show nothing.localStorage-eviction caveat.host-heph-pwapoints at it.Read-side only — no schema, no op-log, no wire change. Closes the backlog items "Add hub connection status to heph-tui" and "Spoke sync health: surface unhealthy state instead of silent 401 spam".
Testing
cargo test --workspace(incl. newsync_indicator/fmt_ageunit tests + a standalone-no-indicator assertion that round-trips thesync.statusRPC)prek run --all-filesheph-tuion gilbert (a real spoke) and confirm the⟳ <age>chip; pull the plug on indri and watch it flip to⚠ offline🤖 Generated with Claude Code