Skip to content

[#182] Sync → Say the things a status bar icon cannot - #210

Merged
revett merged 2 commits into
mainfrom
revett/fix/182
Aug 10, 2026
Merged

[#182] Sync → Say the things a status bar icon cannot#210
revett merged 2 commits into
mainfrom
revett/fix/182

Conversation

@revett

@revett revett commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Resolves #182

Problem

  • The status bar is a cloud icon and a tooltip, which answers "what is it doing" and nothing like enough to say something you have to act on
  • A halted sync, a mass change waiting on an answer, and a conflict copy that renamed one of your notes all end in silence today, or in a log file nobody has open
  • Obsidian has no other channel for this, and mobile has no status bar at all

Changes

  • Added notify, a pure module holding the single table that decides what Geode says and how long it stays, so every word and every silence is pinned by one test
  • Routed every occasion through one showToast on the plugin, the only place Notice is now constructed
Occasion Says Stays
Automatic sync halted The reason, since nothing happens until you act Until dismissed
A large change is waiting on you That nothing has synced, for whoever dismissed the dialog 10s
Any pass failed The reason 10s
Conflict copies were made How many, and that your copy sits beside the remote one 10s
A pass applied changes How many 5s
A manual pass found nothing to do That you were already up to date 5s
Syncing recovered That it is working again 5s
Paused, resumed, settings saved That it happened 5s
  • Left exactly one thing silent, an automatic pass that applied nothing, since that is the product working and it happens every few minutes forever
  • Taught syncOnce to report conflictCount, because a conflict copy is the one thing a successful pass does that nobody would find on their own
  • Derived SyncReport from the finished pass rather than tracking it alongside, so there is one description of what happened instead of two that can drift

Why

  • Silence means everything is fine, which is only a promise worth making if the cases that are not fine actually break it
  • Precedence is worst news first, so a halt outranks the failure it arrived as and a conflict outranks the change count it came with, the count being the part you would have guessed
  • One table in one pure module is what keeps the list short; a toast added anywhere else would have to argue with a test first
  • The halt toast is the only sticky one and the next thing Geode says retires it, so a "stopped syncing" notice can never sit on screen after you have already fixed the credentials

Greptile Summary

This PR adds centralized user-facing sync notifications and reports conflict-copy counts from completed sync passes.

  • Introduces pure toast selection and an Obsidian notification adapter.
  • Routes sync, pause, resume, and settings events through the notification flow.
  • Counts only completed conflicts that preserve a local copy.

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 Integrates toast occasions with sync lifecycle, pause/resume state, settings saves, and pass reporting.
src/notify/notify.ts Defines the notification occasion model, precedence, wording, and durations.
src/notify/obsidian.ts Encapsulates Obsidian Notice construction and sticky-notice replacement.
src/sync/sync.ts Extends successful sync outcomes with a count of completed conflicts that created local copies.
src/sync/sync.test.ts Verifies locally deleted conflicts are excluded from the conflict-copy count.

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

Context used (3)

Comment thread src/sync/sync.ts
Comment thread src/main.ts Outdated
@revett
revett merged commit 89f7be2 into main Aug 10, 2026
11 checks passed
@revett
revett deleted the revett/fix/182 branch August 10, 2026 07:41
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.

Toast notifications

1 participant