Replace polling with file, scene-tree, process-handle and bridge events #360
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!360
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/spirelens-polling-patterns-138645"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces each polling loop in SpireLens with an event-driven wait.
Commits
Core play-now watcher.
ReplayPlayNowWatcherdrops its 1 s GodotTimer. It now checksplay-now.jsonwhen:FileSystemWatcherreports a change (marshalled to the main thread withCallDeferred, bursts merged into one check);NMainMenubecomesready(the scene tree'snode_addedsignal, no Harmony);Two narrow timed fallbacks remain where no event exists:
A generation counter drops callbacks queued by an earlier Core after a hot reload.
Run page play status. The page no longer asks
GET /api/playevery 1.5 s. It opensGET /api/play/events, a server-sent event stream.serveblocks on a Windows directory change notification (FindFirstChangeNotification) for the playlists directory and pushes{"pending": ...}when the request appears, changes or is consumed. The 10 s "not picked up" warning is a single timer, not a check.Host harness.
WaitSts2ReadyandProbeBridgewait on a directory change notification for the bridge's ready file. It is written onceNGame.GameStartupCompletefinishes and must name a live STS2 pid. They then confirm once over HTTP.StopSts2opens the processes' handles beforetaskkilland blocks onWaitForMultipleObjects.prepare_scenario.py, the "three stable menu reads", the fixedsleep(3.0)and the 0.5 s state loops are replaced by the bridge'swait_for_change. "Settled" now means startup actually finished, rather than a guess at when.Docs updated:
docs/replay-player.md,docs/run-database.md,docs/sts2-runtime-primer.md,docs/glimmung-workflow.md.Deployed / not verified
Core.Initialize complete,HOT RELOAD DONE,452 classes patched, 0 failed/skipped).spirelens-dbis reinstalled.-p:Sts2DataDir=/nonexistent).go buildandgo vetpass for Windows and Linux.