Report index and reload errors instead of empty results !463

merged merged by cmc on 2026-11-22 19:16 UTC · krz/orgstar:issue-214-index-errors into main

Discussion

cmc

Closes #214.

  • WorkspaceModel.filesChanged sets lastError when a reconcile fails, as refreshOnce does.
  • search, nodes and backlinks throw ("Can't read the index: ...") instead of returning an empty list.
    • Mac: search results show the error in the empty-results overlay; the backlinks pane shows it in place of the lists; node prompts (app.node.*, denote-sequence) show it in the message line.
    • iOS: the Notes section of Search shows it in place of "No notes match"; the Backlinks screen in place of the lists; node prompts in the editor's message.
    • The roam graph keeps its empty result on error.
  • DocumentSession.fileChanged sets lastError ("Can't read a.org: ...") when an open file can't be read, and keeps the buffer.

Messages are plain strings, like the other lastError messages; no catalog changes.

Tests: reportsIndexErrors (closes the index store), unreadableChangeIsReported (file mode 000), nodeFindReportsAnIndexError. All fail before the change. swift test and both Xcode builds pass.