Grilling: Posts-list refresh model #61

Closed
opened 2026-10-02 15:46:37 +02:00 by AlexKucera · 1 comment
Owner

Part of #18

Question

After #17's read-only scan on .task(id:), how does the Posts list stay a mirror of posts/? An FSEvents watcher with debounced rescan (external Finder changes flow in too), own-ops-only rescans (after new/rename/delete/save and on pane re-focus), or a manual refresh affordance?

[Generated by AI]

Part of #18 ## Question After #17's read-only scan on `.task(id:)`, how does the Posts list stay a mirror of `posts/`? An FSEvents watcher with debounced rescan (external Finder changes flow in too), own-ops-only rescans (after new/rename/delete/save and on pane re-focus), or a manual refresh affordance? [Generated by AI]
AlexKucera added the wayfinder:grilling label 2026-10-02 15:46:37 +02:00
AlexKucera self-assigned this 2026-10-02 15:46:37 +02:00
Author
Owner

Resolution

FSEvents watcher on posts/ with debounced rescan. External Finder changes flow in — "the list mirrors posts/" becomes literally true, which #17's AC promised.

  • Own operations (new/rename/delete/save) route through the same debounced rescan — one path, no special-casing, and the watcher doubles as the correctness net if an own-op move races the list.
  • Debounce window ≈ 0.5 s; rescan reuses Post.scan(home:) off-main exactly as #17's audit left it (Task.detached in .task(id:) becomes watch-driven).
  • Watcher lifetime: run while the workspace is open (app-scoped), not pane-visibility-scoped — simpler, and rename/delete from Finder while another pane is showing still updates. Build session may cheapen this if it bites.

[Generated by AI]

## Resolution **FSEvents watcher on `posts/` with debounced rescan.** External Finder changes flow in — "the list mirrors `posts/`" becomes literally true, which #17's AC promised. - Own operations (new/rename/delete/save) route through the **same debounced rescan** — one path, no special-casing, and the watcher doubles as the correctness net if an own-op move races the list. - Debounce window ≈ 0.5 s; rescan reuses `Post.scan(home:)` off-main exactly as #17's audit left it (`Task.detached` in `.task(id:)` becomes watch-driven). - Watcher lifetime: run while the workspace is open (app-scoped), not pane-visibility-scoped — simpler, and rename/delete from Finder while another pane is showing still updates. Build session may cheapen this if it bites. [Generated by AI]
Sign in to join this conversation.