iOS: export names from the open tree, block bands only when needed, org-protocol message !465

merged merged by cmc on 2026-11-22 19:41 UTC · krz/orgstar:issue-230-ios-export-menu into main

Discussion

cmc

Closes #230. Closes #220.

#230

  • ExportScope.fileName takes a parsed tree. ExportMenu and SubtreeExportScreen take the document's tree and read the name once per evaluation instead of parsing the file once per format.
  • mayChangeBlocks moves from OrgEditor to Presentation. The iOS editor walks the tree for block bands only after an edit on a line that can start or end a block; other edits move the bands.

iPhone 17 simulator, Release, ORGSTAR_PERF=1, main-thread waits:

before after
1 MB editor open 1445 ms 808 ms
1 MB, 20 characters typed 1271+183+451+330+360 ms 150 ms
1 MB, one keystroke 181+166, then 362 after save none over 100 ms
10 MB reader open 9796 ms 2122 ms
10 MB editor open 8423 ms 3235 ms
10 MB caret tap 1086+1789+2984 ms 614+521+281 ms
10 MB, one keystroke 2850+204+2158, then 3229+1903 after save 615, then 316 after save

#220

  • iOS shows "orgstar handles org-protocol capture and store-link" for other org-protocol sub-protocols. The URL handling moved into a method: the root view's body no longer type-checked with the added branch.
  • Manual, "How a save works": the Mac App Store version writes in place when the folder refuses the temporary file.

Tests: swift test, both Xcode builds.