Skip to content

fix: keep drawing and window settings, movable favourites bar, quieter self-healing sync - #65

Merged
cyenite merged 4 commits into
mainfrom
fix/persist-ui-and-quiet-sync
Nov 9, 2026
Merged

cyenite merged 4 commits into
mainfrom
fix/persist-ui-and-quiet-sync

Conversation

@cyenite

@cyenite cyenite commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Summary

Three fixes from user feedback:

  1. Drawing settings and window size were not kept between launches. The drawing rail's cursor, magnet, Stay in Drawing Mode, Lock and Hide switches now persist per computer (openterm.drawing-tools.v1). The main window reopens at its last size and place, maximised or full screen if it was (window.json, electron/window-bounds.ts).
  2. The favourites bar could not be moved. It now has a drag handle like the drawing style bar, keeps its place (meridian.favorites.position) and is kept inside the charts when they shrink.
  3. Sync issues needed a click and the status bar was distracting. Errors the user cannot act on now retry on the scheduler's back-off with a new retrying status, journalled once per problem. The status bar cell is a small dimmed cloud icon that shows how the last run ended, so it no longer flips to "Syncing" with a spinner on every poll; words appear only when the user must act.

What changed

  • src/lib/drawing-tools.ts, src/lib/drawing-tools-model.ts (new), src/main.tsx: load and save the rail switches.
  • packages/meridian-charts/src/ui/toolbar.ts, ui/styles.ts: favourites bar handle, drag, saved position, clamping on resize.
  • electron/window-bounds.ts (new), electron/main.ts: save and restore the main window placement.
  • electron/sync-service.ts, shared/sync.ts: retryQuietly for setup, damaged-file, unknown and newer-format errors; the unused failed attention reason is removed.
  • src/lib/sync.ts, src/components/sync/SyncStatus.tsx, SyncDialog.tsx, src/components/ui/Icon.tsx, src/styles.css: settled status in the store, icon-only status cell, retry banner in the dialog.

Behaviour choices

  • The tool in hand and the eraser cursor are not restored, so a restart never starts mid-drawing or deletes the first drawing clicked.
  • The rail switches stay per computer and do not sync.
  • A window last left on a display that is gone opens centred on the primary display, shrunk to fit.
  • Sync still stops and asks for mass deletions, joining, stale or rolled-back history, tampering, removal from sync, a lost GitHub sign-in and a missing or public repository.

How was this tested?

  • New tests: rail switch parsing (2), window placement (6, including a save-then-restore round trip with maximise), and a sync source that fails twice, retries quietly, journals once and recovers.
  • npm run typecheck, npm test (852 pass) and npm run build pass locally.
  • The renderer was checked with the README screenshot harness (mock backend) under Xvfb: rail switches came back after a reload; the favourites bar dragged, kept its place over a reload and stayed inside a shrunk window; the sync cell kept a constant width through synced, syncing and retrying, and showed "Sync needs you" in the attention state.
  • Window placement was not checked in the packaged app.

Checklist

  • npm run check passes (typecheck, tests and build).
  • New behaviour is covered by tests.
  • Documentation in docs/ is updated where needed (no user guide change needed).
  • User-visible changes have an entry under Unreleased in CHANGELOG.md.
  • No credentials, account numbers or captured broker traffic are included.

The cursor, magnet, stay in drawing mode, lock and hide switches reset
on every launch. They are now saved per computer in
openterm.drawing-tools.v1 and restored at startup. The tool in hand is
not restored, and neither is the eraser cursor, so a restart never
deletes the first drawing clicked.

The favourites bar sat fixed at the top centre of the charts. It now has
a drag handle like the drawing style bar, keeps its place in
meridian.favorites.position and stays inside the chart body when the
window shrinks.
The main window always opened at 1440x900. Its normal bounds and its
maximised or full-screen state are now saved in window.json and
restored at startup. A window last left on a display that is gone opens
centred on the primary display, shrunk to fit.
Unexpected errors, damaged-setup errors and data written by a newer
version stopped sync until the user pressed Try again. They now retry on
the scheduler's back-off with a new "retrying" status, journalled once
per problem. Mass deletions, joining, stale or rolled-back history,
tampering, removal and lost GitHub sign-ins still stop and ask.

The status bar flipped between "Synced" and "Syncing" with a spinner on
every poll. It is now a small dimmed cloud icon that shows how the last
run ended, with words only when the user must act.
@cyenite
cyenite merged commit f0f8e7a into main Nov 9, 2026
4 checks passed
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