Skip to content

[#104] UI → Improve status icon - #211

Merged
revett merged 2 commits into
mainfrom
revett/fix/104
Aug 11, 2026
Merged

[#104] UI → Improve status icon#211
revett merged 2 commits into
mainfrom
revett/fix/104

Conversation

@revett

@revett revett commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Resolves #104

Problem

  • During a large first sync the status bar shows a spinner with no counts, which reads as hung after the first minute
  • At rest it says "click to sync", so nothing distinguishes "synced ten seconds ago" from "has not synced since Tuesday"
  • Automatic sync made both of these required rather than cosmetic: the click used to be the feedback, and there is no click now

Changes

  • Added status, a pure module holding the single table that decides what the bar says in each state, so every word is pinned by one test
  • Gave the status bar a label beside the icon, since a tooltip only answers a question you already thought to ask
State Says
Nothing synced yet Not synced yet
Resting Synced 2m ago
A pass with no plan Checking...
A pass applying one Syncing 12/340
A pass failed Sync failed
Automatic sync off Sync paused
  • Taught a pass to report progress, once before the first action and once per action after it, failures included
  • Remembered the time of the last completed pass per device in vault scoped localStorage, beside the pause flag and the device ID
  • Forgot that time when settings repoint the vault at a bucket it has never synced, since the old one is then about somewhere else

Why

  • Silence means everything is fine, which is only a promise worth making if the bar can say when it was last true
  • Checking... is not a placeholder: a first sync spends most of its time reading the manifest and hashing the vault, before there is any plan to count, and that is exactly the stretch the spinner was worst at
  • Progress counts attempted actions rather than successful ones, because a number that stops moving on the first bad file reads as the hang it is there to disprove
  • Ages are coarse on purpose, minutes then hours then days; nothing finer would be read, and nothing coarser answers the question
  • A pass that applied nothing still counts as synced, since it proves the vault and the bucket agree

Greptile Summary

The PR adds a labeled status-bar state model, per-action sync progress, and persisted last-success timestamps.

  • Introduces pure status wording and transition helpers with focused unit coverage.
  • Reports execution progress from the sync engine to the status bar.
  • Preserves or clears per-device sync history according to the configured target and state-read result.
  • Updates the technical documentation and status-bar styling.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
src/main.ts Wires status rendering, last-sync persistence, progress callbacks, and tri-state state reads into the plugin lifecycle.
src/status/status.ts Adds pure status transitions, elapsed-time labels, icon selection, and tooltip generation.
src/status/status.test.ts Covers status views, elapsed-time boundaries, transitions, and persisted timestamp validation.
src/sync/execute.ts Reports progress before execution and after each attempted action.
src/sync/sync.ts Threads an optional progress callback through sync orchestration.
styles.css Styles the labeled status item and preserves icon animation and state-specific appearance.

Reviews (2): Last reviewed commit: "Address comments" | Re-trigger Greptile

Context used (3)

Comment thread src/main.ts Outdated
Comment thread src/main.ts Outdated
@revett
revett merged commit 59c7f5a into main Aug 11, 2026
11 checks passed
@revett
revett deleted the revett/fix/104 branch August 11, 2026 07:19
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.

Status bar gives no progress during long syncs and no last synced time

1 participant