Skip to content

fix(storage): name settings and theme after the app, say when settings are not kept - #25

Merged
maxgfr merged 1 commit into
mainfrom
fix/shared-origin-storage
Nov 2, 2026
Merged

maxgfr merged 1 commit into
mainfrom
fix/shared-origin-storage

Conversation

@maxgfr

@maxgfr maxgfr commented Nov 2, 2026

Copy link
Copy Markdown
Owner

GitHub Pages serves the app from maxgfr.github.io, an origin shared by every project page of the account (one localStorage quota, one IndexedDB namespace, one cookie jar).

  • Settings names: csv-ai-analyzer:settings / csv-ai-analyzer-secrets (session ciphertext csv-ai-analyzer:settings-key) instead of csv-ai-settings / csv-ai-secrets. Old settings are decrypted, saved again encrypted under the new names, and the old copy erased once the new one reads back; otherwise the old preferences are put back and the move is retried on the next load. The clear-text csv-ai-api-key of v1.16 and the legacy cookies are still re-encrypted and deleted, so no clear-text key survives.
  • Theme: csv-ai-analyzer:theme instead of csv-ai-theme (moved once, then removed). The anti-flash script no longer reads document.cookie; the theme provider still migrates the old cookie once and deletes it.
  • Honest save: llm-connect stays on 1.x (2.x requires AI SDK 7, a breaking change for csv-charts-ai). A save is read back, key included, and the dialog warns "Storage for this site is full or blocked…" instead of "Settings Saved" when it was not kept.

No change to packages/csv-charts-ai. No service worker, no other storage.

Checks run locally (Node 24): pnpm lint, pnpm typecheck, pnpm test:all (package 170, app 107), pnpm test:e2e (54 pass), static export build with NEXT_PUBLIC_BASE_PATH=/csv-ai-analyzer.

…s are not kept

GitHub Pages serves the app from maxgfr.github.io, an origin shared by every
project page of the account: one localStorage quota, one IndexedDB namespace
and one cookie jar for all of them.

- Settings use csv-ai-analyzer:settings and csv-ai-analyzer-secrets instead
  of csv-ai-settings / csv-ai-secrets: decrypted with the old key, saved
  again encrypted under the new names, and the old copy erased once the new
  one reads back (put back otherwise, and retried on the next load). The
  clear-text csv-ai-api-key of v1.16 is still re-encrypted and deleted.
- The theme moves from csv-ai-theme to csv-ai-analyzer:theme; the anti-flash
  script no longer reads document.cookie (the old cookie is still migrated
  once by the theme provider, then deleted).
- llm-connect 1.x does not report a refused write (2.x needs AI SDK 7, a
  breaking change for csv-charts-ai), so a save is read back, key included,
  and the dialog warns that the settings only last for the page instead of
  saying they were saved.
@maxgfr
maxgfr merged commit 7ac6d4a into main Nov 2, 2026
3 checks passed
@maxgfr
maxgfr deleted the fix/shared-origin-storage branch November 2, 2026 10:42
github-actions Bot pushed a commit that referenced this pull request Nov 2, 2026
## [1.17.6](v1.17.5...v1.17.6) (2026-11-02)

### Bug Fixes

* **storage:** name settings and theme after the app, say when settings are not kept ([#25](#25)) ([7ac6d4a](7ac6d4a))
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.17.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant