Read-only viewer !9

merged merged by cmc on 2026-10-05 03:15 UTC · krz/orgstar:phase1-viewer into main

Discussion

cmc

The phase 1 Mac app, and its plan.

  • Folding (OrgPresentation): TAB cycles folded, children, subtree; Shift-TAB cycles overview, contents, show all; #+STARTUP visibility on open (overview, content, showall, showNlevels, ...). A second fold kind hides a heading's own body but keeps its children.
  • Editor: read-only mode, reveal (unfolds what hides the target), reload from disk keeping folds, wrapped lines hang under their text past leading blanks, bullets and checkboxes.
  • OrgApp (no UI frameworks): WorkspaceModel (roots as bookmarks, index in Application Support, background reconciliation, FSEvents, search, fuzzy quick open, file tree) and DocumentSession (open file, outline, reveal and reload requests).
  • Orgstar app: SwiftUI sidebar, outline and search columns around the AppKit editor; ⇧⌘O add folder, ⌘P quick open, ⇧⌘F search. scripts/build-app.sh builds Orgstar.app (sh.krz.orgstar), signed ad hoc.
  • Development hooks: ORGSTAR_DATA_DIR, ORGSTAR_OPEN, ORGSTAR_SNAPSHOT (renders the window from inside the app; the sidebar material doesn't render in snapshots).

179 tests pass. Gates (release): csg.org open 75 ms, typing 6.5 ms, blank line 6.9 ms, memory 9.7x; synthetic files within their limits. Checked by snapshot against a real notes folder; adding a folder, quick open, search and external reload still need a manual pass.