Skip to content

fix(editor): say when the session cannot be saved - #669

Merged
EVWorth merged 1 commit into
mainfrom
fix/session-save-reporting
Sep 12, 2026
Merged

EVWorth merged 1 commit into
mainfrom
fix/session-save-reporting

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 12, 2026

Copy link
Copy Markdown
Owner

From the full-project review. Stacked on #668.

Of everything the app keeps in localStorage — theme, query settings, formatter settings, grid layouts, history preferences, open tabs — the open tabs are the one whose loss is most visible, and saving them was the one path that swallowed its failure:

} catch {
  // localStorage unavailable
}

A user with a dozen tabs of unsaved SQL restarts and finds them gone, with nothing at any point having said that saving had stopped working — while a failed theme write has been reported in the status bar all along.

The quota is around 5 MB and the tabs hold whatever has been typed or pasted into them, so it is reachable with one large dump in a tab.

It reports through the same store as the rest now, and clears the warning when a write succeeds again — closing a tab can bring the session back under the quota, and a stale warning would say the opposite.

+4 tests, including that the app does not throw when storage is blocked altogether (private mode).

@EVWorth
EVWorth changed the base branch from docs/adr-reality to main September 12, 2026 12:57
Of everything the app keeps in localStorage, the open tabs are the one
whose loss is most visible — and saving them was the one path that
swallowed its failure. A user with a dozen tabs of unsaved SQL would
restart and find them gone, with nothing at any point having said that
saving had stopped working, while a failed theme or settings write has
been reported in the status bar all along.

The quota is around 5 MB and the tabs hold whatever has been typed or
pasted into them, so it is reachable — one large dump in a tab.

It now reports through the same store as the rest, and clears the
warning when a write succeeds again: closing a tab can bring the session
back under the quota, and a stale warning would say the opposite.

+4 tests.
@EVWorth
EVWorth force-pushed the fix/session-save-reporting branch from b4e1b5a to 990bfda Compare September 12, 2026 12:59
@EVWorth
EVWorth merged commit 88dae1e into main Sep 12, 2026
12 checks passed
@EVWorth
EVWorth deleted the fix/session-save-reporting branch September 12, 2026 13:04
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