You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 53c339c
Browse filesBrowse the repository at this point in the historyBrowse files
Feat(panels): per-note panels come back after a restart (#794)
With "Keep panels when switching notes" off, each note remembered its
own Connections, Outline, Comments and Calendar, but only until you
quit. Hand testing showed that as the one place the feature felt
unfinished: set up a project note with its Outline, a reading note with
Comments, relaunch, and every note was bare again while the tabs and
splits around them had come back.
The memory now rides in the workspace snapshot, the same record that
already restores tabs, layout and the sidebar, locally and as
`.zennotes/workspace.json` for a synced vault. Nothing is written into
the notes themselves, which stay plain files. A calendar you closed on
a daily note stays closed after a restart too, because the "dismissed"
bit travels with the rest.
What it is careful about, since that file syncs between machines and
versions and can be edited by hand:
- It stays small. Only panes that still exist are written, only what is
open is spelled out (a note with Outline open is `{"outline": true}`),
a note with nothing open is not stored at all, and each pane keeps the
200 most recently set notes. Setting a note's panels again moves it to
the back of that queue.
- Nothing in it is trusted on the way back in: unknown panes are
dropped and every field is coerced to its type. A snapshot written
before this change simply has no panels.
- Once the note listing is in, memory for notes that no longer exist is
retired, with the same empty-listing guard the tab check uses, so dead
paths do not pile up after deletes on another machine.
- Toggling a panel changes nothing else about the workspace, so that
action asks for the save itself instead of waiting for a tab change.
The default mode is untouched: with the setting on, panels belong to the
pane for the session and nothing is restored at launch, exactly as in
2.51.1. Per-note view modes (Edit / Split / Preview) are still
session-only; this change does not extend to them.
comment: 'true = Connections / Outline / Comments / Calendar stay as set while you switch notes; false = each note remembers its own panels for the session'
370
+
comment: 'true = Connections / Outline / Comments / Calendar stay as set while you switch notes; false = each note remembers its own panels (saved with the workspace, so they survive a restart)'
Copy file name to clipboardExpand all lines: packages/app-core/src/components/SettingsModal.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2639,7 +2639,7 @@ export function SettingsModal(): JSX.Element {
2639
2639
/>
2640
2640
<ToggleRow
2641
2641
label="Keep panels when switching notes"
2642
-
description="Connections, Outline, Comments and Calendar stay as you set them while you move between notes. Turn off and each note remembers its own panels until you quit, so a note you have not opened yet starts with none."
2642
+
description="Connections, Outline, Comments and Calendar stay as you set them while you move between notes. Turn off and each note remembers its own panels, across restarts too, so a note you have not opened yet starts with none."
'Tabs, splits, floating windows, the reference pane, and the connections panel are all there to help you keep related material visible while you write instead of forcing constant back-and-forth navigation. The Connections, Outline, Comments and Calendar panels stay as you set them while you move between notes. If you would rather each note kept its own, turn off Settings → Editor → Keep panels when switching notes (or run Remember Panels per Note from the command palette): a note then comes back with the panels you left it with, until you quit, and a note you have not opened yet starts with none. With the automatic calendar on, a daily or weekly note whose calendar you closed stays closed when you return to it. The setting travels with your portable config as `keep_panels_across_notes` under `[view]`.'
74
+
'Tabs, splits, floating windows, the reference pane, and the connections panel are all there to help you keep related material visible while you write instead of forcing constant back-and-forth navigation. The Connections, Outline, Comments and Calendar panels stay as you set them while you move between notes. If you would rather each note kept its own, turn off Settings → Editor → Keep panels when switching notes (or run Remember Panels per Note from the command palette): a note then comes back with the panels you left it with, after a restart too (the memory is saved with your tabs and layout, never in the note), and a note you have not opened yet starts with none. With the automatic calendar on, a daily or weekly note whose calendar you closed stays closed when you return to it. The setting travels with your portable config as `keep_panels_across_notes` under `[view]`.'
0 commit comments