mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Add snippet metadata panel, duplicate, and immediate-load preview (M4.5)
This commit is contained in:
@@ -472,6 +472,14 @@ reset: () => set({ snippets: [], activeSnippetId: null, draftSpec: '' });
|
||||
- Do persistence and external sync (IndexedDB, `localStorage`, URL hash, theme) in
|
||||
startup `subscribe` listeners via `infrastructure/` adapters.
|
||||
- Debounce expensive reactions (auto-save, re-render) inside the subscriber.
|
||||
- Advance a snippet's `modified` on **every** save the library sorts by — draft
|
||||
auto-save, inline name/comment edits, publish, revert, rename-propagation — so
|
||||
Modified-descending keeps the just-touched snippet on top (spec §02 → Sort).
|
||||
- Bump `SnippetStore.bufferEpoch` only on a _programmatic_ buffer load (select /
|
||||
create / duplicate / revert / hydrate) — it is the "reload the editor, this isn't
|
||||
a keystroke" signal consumed by both the Monaco buffer and the preview's
|
||||
immediate-render path (arch 05 §5). Metadata edits (name/comment) advance
|
||||
`modified` but must **not** bump it — they aren't in the spec buffer.
|
||||
- Import singleton store hooks directly in the leaves that need shared state.
|
||||
|
||||
**Don't**
|
||||
|
||||
Reference in New Issue
Block a user