Skip to content

Settings Drawer - #347

Merged
KacperKozak merged 5 commits into
devfrom
settings-drawer
Aug 7, 2026
Merged

KacperKozak merged 5 commits into
devfrom
settings-drawer

Conversation

@KacperKozak

@KacperKozak KacperKozak commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

The top-right gear no longer pushes /settings — it opens an edge drawer, the same shape as the Social drawer on the left.

What lands

  • Settings Drawer (src/screens/main/overlays/SettingsSheet.tsx): wordmark, the Vescape Account widget (moved off the Social sheet), a three-cell status strip (backup / app version / storage), an update button when one is available, four shortcut widgets (Connection, Live telemetry, Watch on Android, Privacy zones) and one Advanced settings link to the old settings screen.
  • A trigger that wears what matters. IconButton gains takeover — alternate icon, alternate accent and an optional determinate progress ring (Skia) — so the gear becomes an upgrade arrow for a required update, or a spinning-arrows glyph with drain progress while backup runs, the way the Social button becomes an active Group Ride. Priority lives in settingsTrigger.ts and is unit-tested; the component only renders it. Shown in the component library with takeover / progress controls.
  • One color per destination. Settings icon accents move into theme.settingsIcon. Connection is now the pairing purple (same token as Board Link), Live telemetry is telemetry.speed. Recoloring a destination is a single edit.
  • Database moves out of Dev tools into the drawer's storage cell.
  • fmtCompactCount in helpers/format keeps a six-figure backup backlog narrow (1.2k/100k).
  • CONTEXT.md gains Settings Drawer.

Backup is a seam, not an implementation

There is no uploader on dev yet — it lands with #276. Backup enters the UI through one type and one hook (BackupSlot, useBackupSlot), so until #276 merges a signed-in Rider sees a dimmed backup cell rather than a green "backed up" that would be a lie. Wiring it is a body swap in useBackupSlot (TODO in place, naming already matches syncStatusStore / backupProgress).

Verification

bun test (746 pass), tsc, oxlint, and opened on the Android emulator: drawer renders, signed-out backup cell reads Off / Sign in, version and storage are live.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The top-right gear opens an edge drawer instead of pushing /settings: wordmark,
Vescape Account (moved off the Social sheet), a status strip for backup, app
version and storage, the four settings worth one tap, and one link to Advanced.

IconButton gains a takeover — alternate icon, accent and an optional determinate
progress ring — so the Settings button can wear a required update or a running
backup the way Social wears an active Group Ride. Backup enters the UI through a
single BackupSlot seam wired to #276 when it lands.

Settings icon accents move into theme.settingsIcon so a destination keeps one
color everywhere: Connection is now the pairing purple, Live telemetry the speed
blue. Database moves out of Dev tools into the drawer.
…ize hook

- useBackupSlot reports unavailable for every Rider until #276 lands; offering
  "sign in to back up" promised a capability this build does not have.
- fmtCompactCount picks its suffix after rounding, so 999_999 reads 1.0M not 1000k.
- New useDatabaseSize hook for surfaces that only want the number; the drawer no
  longer mounts backup/restore/rebuild state and its progress listener.
The prototype's identity pill, not the full-width widget the Social sheet used.
The pill absorbs what the widget owned: a provisioning credential spins, a failed
Clerk to Device Token exchange turns the pill into a retry button. AccountWidget
had no callers left and is deleted.
Wordmark sits lower and breathes: 24 above, 22 to the account pill, 10 below.
The status strip taller and set off from the shortcut list by its own margin, so
the header, the status and the list read as three groups instead of one column.
A dash said nothing. The cell now reads Sync over No account when there is no
Vescape Account, or Sync over Unavailable while this build has no uploader.
@KacperKozak
KacperKozak merged commit f4b3f2f into dev Aug 7, 2026
2 checks passed
@KacperKozak
KacperKozak deleted the settings-drawer branch August 7, 2026 19:28
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