Skip to content

fix(web): surface durable-storage status in the status bar - #287

Merged
crs48 merged 2 commits into
mainfrom
claude/silly-ptolemy-3cf9d5
Jun 26, 2026
Merged

fix(web): surface durable-storage status in the status bar#287
crs48 merged 2 commits into
mainfrom
claude/silly-ptolemy-3cf9d5

Conversation

@crs48

@crs48 crs48 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Problem

The green "Durable local storage enabled" bar was a fixed top overlay rebuilt on every page load. Its X only set component-local state, so it reappeared on reload (reads as a broken dismiss), and it offered no action once storage was already working.

Fix

When durable storage is working → no banner; the status moves into the bottom StatusBar with the other system info. When it isn't working → the actionable not-granted/error banner still shows, and the bottom bar carries a warning-toned reminder that survives dismissing the banner.

  • getStorageBanner returns null for the granted state
  • new useStorageStatus hook (mirrors useHubStatus: prompt-less checkPersistentStorage + storage-status bus + permission watcher)
  • new StorageStatus indicator in StatusBar (HardDrive icon + usage; neutral when granted, text-warning when not)
  • shared formatBytes util (de-dupes the banner's local copy)

All changes are in apps/web (an app, not a publishable package) → no changeset required.

Verification

  • Typecheck: 0 errors in apps/web (after building workspace packages)
  • Tests: storage-banner 18/18 + Workbench-rendering dom tests pass
  • Browser (live dev server):
    • Not-granted → top "Durable storage pending" banner + bottom bar 🖴 9.2 MB (warning-toned, explanatory tooltip)
    • Forced a granted status through the app's bus → top banner disappears, bottom bar reads ● offline main 🖴 13 MB 🔔 with tooltip "Durable local storage enabled — 13 MB of 10 GB used". No console errors.

🤖 Generated with Claude Code

The green "Durable local storage enabled" banner was a fixed top overlay
rebuilt on every page load; its X only set component-local state, so it
reappeared on reload (reads as a broken dismiss) and it offered no action
once storage was working.

Drop the success banner and show durable storage as ambient system info in
the StatusBar instead (HardDrive icon + usage, neutral when granted,
warning-toned when not). The actionable not-granted/error banners stay.

- getStorageBanner returns null for the granted state
- new useStorageStatus hook (mirrors useHubStatus: prompt-less check + bus +
  permission watcher)
- new StorageStatus indicator in StatusBar
- shared formatBytes util (de-dupes the banner's local copy)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@crs48
crs48 temporarily deployed to pr-287 June 26, 2026 21:13 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

✓ Changelog fragment found — thanks!

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@crs48
crs48 temporarily deployed to pr-287 June 26, 2026 21:14 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jun 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

No visual differences detected in the changed UI.

CI run

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #287.

github-actions Bot added a commit that referenced this pull request Jun 26, 2026
@crs48
crs48 merged commit 520a897 into main Jun 26, 2026
13 of 14 checks passed
@crs48
crs48 deleted the claude/silly-ptolemy-3cf9d5 branch June 26, 2026 21:25
github-actions Bot added a commit that referenced this pull request Jun 26, 2026
* re-appear on every page load. Glanceable usage when storage is working; a
* warning-toned reminder (alongside the actionable top banner) when it isn't.
*/
function StorageStatus() {
*/
const BYTE_UNITS = ['KB', 'MB', 'GB', 'TB', 'PB'] as const

export function formatBytes(bytes: number): string {
crs48 pushed a commit that referenced this pull request Jun 26, 2026
#287)

PR #287 added an always-on durable-storage indicator to the status bar.
Combine it with the 0233 sync cluster: keep main's <StorageStatus/>,
drop the now-redundant storage chip + useStorageEstimate hook, and source
the popover's storage row from the canonical useStorageStatus + the shared
lib/format-bytes (no duplication).
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.

2 participants