diff --git a/docs/architecture/ribbon.md b/docs/architecture/ribbon.md index 4c6213e..b0f6713 100644 --- a/docs/architecture/ribbon.md +++ b/docs/architecture/ribbon.md @@ -7,7 +7,7 @@ compared. Everything the ribbon drives is the same editor, through the same comm ## The mode switch `chromeMode: 'classic' | 'ribbon'` lives in `storage/theme.ts` beside the other UI-chrome prefs -(`edentext-chrome`, default `'classic'`). `App.svelte` forks on it: the ribbon docks as a plain +(`edentext-chrome`, default `'ribbon'`). `App.svelte` forks on it: the ribbon docks as a plain flex child, the island keeps its absolute overlay. Reachable from both sides — the theme dropdown in classic, the strip's appearance menu in the ribbon. diff --git a/src/lib/storage/CLAUDE.md b/src/lib/storage/CLAUDE.md index 5c789cc..5976af5 100644 --- a/src/lib/storage/CLAUDE.md +++ b/src/lib/storage/CLAUDE.md @@ -31,7 +31,7 @@ All keys share the `edentext-` prefix — a namespace, not a description: on Git - **Recent files:** `edentext-recent-files` — `{id, name, at}` per entry, newest first, eight kept (`recentFiles.ts`). Only the label lives here: the `FileSystemFileHandle` that reopens one is structured-cloneable but not JSON, so it sits in the `edentext-recent` IndexedDB store under the same id, and each write sweeps the handles no entry names. Two handles compare only through `isSameEntry`, which is async — hence the walk when recording a file already in the list. Reopening re-asks for permission (the API drops it on reload); a refusal, a moved file or a browser with no picker leaves the entry unopenable, and it is dropped with a message instead of failing again. - **Theme:** `edentext-theme` — `'light' | 'dark' | 'allBlack' | 'auto'`. - **Toolbar expanded:** `edentext-toolbar-expanded` — boolean string. -- **Chrome:** `edentext-chrome` — `'classic' | 'ribbon'`; absent = classic. +- **Chrome:** `edentext-chrome` — `'classic' | 'ribbon'`; absent = ribbon. - **Ribbon collapsed:** `edentext-ribbon-collapsed` — boolean string; absent = expanded. - **Formatting marks:** `edentext-formatting-marks` — boolean string. - **Ruler:** `edentext-ruler` — boolean string; absent = on. diff --git a/src/lib/storage/theme.ts b/src/lib/storage/theme.ts index b14d3e9..f619fef 100644 --- a/src/lib/storage/theme.ts +++ b/src/lib/storage/theme.ts @@ -36,7 +36,7 @@ export function saveToolbarExpanded(expanded: boolean): void { } export function loadChromeMode(): ChromeMode { - return localStorage.getItem(CHROME_KEY) === 'ribbon' ? 'ribbon' : 'classic'; + return localStorage.getItem(CHROME_KEY) === 'classic' ? 'classic' : 'ribbon'; } export function saveChromeMode(mode: ChromeMode): void {