Skip to content

Commit e2aa550

Browse files
committed
Add persistent scratchpads and window sessions
Signed-off-by: jeanmonet <15112920+jeanmonet@users.noreply.github.com>
1 parent 9497019 commit e2aa550

12 files changed

Lines changed: 1122 additions & 78 deletions

DESIGN.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ All panes use standard AppKit split-view behavior, system materials, native focu
1818

1919
- A new or comment-free document begins with the source alone. The comment inspector opens automatically only when a document already contains review threads or the user starts a comment.
2020
- Standalone files hide the navigator; directory workspaces reveal it. Closing either sidebar gives its space to the document without changing the outer window frame.
21-
- The initial window uses a generous 1180 × 780 working size when the screen permits. Later launches restore only a usable, on-screen frame, and the document pane remains the elastic region during live resize and full screen.
22-
- Opening several files—through the Open panel, Finder, or the CLI—places them in native tabs. An empty tab is reused, duplicate paths focus their existing tab, and separate windows remain available with `⌘N`.
21+
- The initial window uses a generous 1180 × 780 working size when the screen permits. Later launches restore each window to its prior physical display when available, with a usable on-screen fallback when a display is disconnected; the document pane remains the elastic region during live resize and full screen.
22+
- Opening several files—through the Open panel, Finder, or the CLI—places them in native tabs. An empty start tab is reused, duplicate paths focus their existing tab, and separate windows remain available.
23+
- `⌘T` creates an editable, automatically saved untitled Markdown scratchpad in the current tab group. `⌘N` creates one in a separate window, and `⌘⇧S` promotes it to an ordinary named Markdown file without changing its tab position.
2324
- Tabs follow browser conventions: `⌘T`, `⌘W`, `⌃Tab`, `⌃⇧Tab`, and `⌘1``⌘9`. Pane focus uses `⌃1``⌃3` so it never competes with tab selection.
2425
- Reader presentation and file-provider change watching begin only after they are requested, away from the main interaction path. Stale reader work is discarded when the user switches files or modes.
25-
- A normal relaunch restores tabs and lightweight view state, but an explicit CLI target always wins. Persistence is deferred to a utility queue and never joins the first-window path.
26+
- A normal relaunch restores independent windows, their physical displays, native tab groups and order, the selected window and tab, usable window frames, scratchpad contents, and lightweight editor state. An explicit CLI target always wins. Session persistence is deferred to a utility queue, and scratchpads remain ordinary private Markdown files rather than database records.
2627
- New comments or replies arriving from another process never steal focus or open the inspector. They add a restrained numeric tab/toolbar signal and a temporary **New** filter until the affected thread is deliberately visited.
2728

2829
## Typography and color

Docs/ARCHITECTURE.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,18 @@ directory indexing, filesystem watching, comparison loading, collaboration
102102
overviews, and stage presentation are created only when requested so they do
103103
not join the initial window path.
104104

105-
The application stores only lightweight local presentation state such as open
106-
tabs, pane visibility, selection, scroll position, and the active thread. An
107-
explicit file or directory supplied by the user takes precedence over session
108-
restoration.
105+
The application stores only lightweight local presentation state such as the
106+
independent-window and native-tab hierarchy, pane visibility, selection, scroll
107+
position, display affinity, and the active thread. Stable native restoration
108+
identifiers let AppKit preserve system-managed window state; custom placement
109+
metadata provides physical-display continuity and an on-screen fallback when a
110+
display is unavailable. Untitled scratchpads are ordinary Markdown
111+
files below the user's private Application Support directory; the session holds
112+
only their stable identity and presentation state. Scratch contents use the
113+
same atomic autosave path as named documents, are flushed synchronously during
114+
a normal quit, and move to the selected destination only after Save As
115+
succeeds. An explicit file or directory supplied by the user takes precedence
116+
over session restoration.
109117

110118
## CLI contract
111119

Docs/RELEASE_NOTES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
## Unreleased
44

5-
No changes yet.
5+
- Added durable untitled Markdown scratchpads. `⌘T` creates one in the current
6+
tab group, `⌘N` creates one in a separate window, and `⌘⇧S` promotes it to a
7+
named file. Scratch contents are private file-backed Markdown, autosave while
8+
editing, flush synchronously on quit, and require an explicit Save As or
9+
discard decision before a nonempty scratchpad tab closes.
10+
- Expanded session restoration from one flattened tab list to the complete
11+
independent-window and native-tab hierarchy, including tab order, selected
12+
tabs, usable window frames, cursor and scroll continuity, and open
13+
scratchpads. Existing version-1 sessions migrate to a single restored window.
14+
- Integrated the durable session with native AppKit window restoration.
15+
Physical-display identity and relative placement are retained, with an
16+
on-screen fallback when a monitor is disconnected or its layout changes.
617

718
## 0.5.0 — source-agnostic comparison reviews
819

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Open a file for quick editing or a directory for a native, lazily loaded navigat
6363

6464
In the app you can:
6565

66+
- create an automatically saved untitled Markdown scratchpad with `⌘T`, or a scratchpad in a separate window with `⌘N`, then promote it to an ordinary file with `⌘⇧S`;
67+
- return after a normal quit to the same independent windows and displays, tab groups, selected tabs, cursor positions, and scroll positions;
6668
- edit literal Markdown with restrained syntax cues, delimiter pairing, list continuation, native undo, find, spellcheck, and accessibility support;
6769
- switch to a bounded, typography-first reader view with `⌘⇧R`;
6870
- select a passage and comment from the inline affordance, context menu, or `⌘⌥M`;

Resources/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<string>Copyright © 2026 OpenProse, Inc.</string>
3333
<key>NSPrincipalClass</key>
3434
<string>NSApplication</string>
35+
<key>NSQuitAlwaysKeepsWindows</key>
36+
<true/>
3537
<key>CFBundleDocumentTypes</key>
3638
<array>
3739
<dict>

0 commit comments

Comments
 (0)