Info: plain mentions no longer stay missing when search lags (#414) #420

Closed
kayg wants to merge 1 commit from issue/links-mention-flake into dev
Owner

Closes #414.

Flake in links.spec.ts:57: Info's Mentions list never showed the plain-mention note. It fails 1 in 6 on plain dev and on train 2026-10-15k (chromium-1440, --repeat-each 6).

Cause: plain mentions come from search, which follows the journal a moment behind. Info asks notes.backlinks once on open and only asks again when some note changes, so a stale answer stayed (trace: one backlinks request). The web also ignored incomplete.

Fix: MentionFinder::caught_up waits up to 2 s for the index to be idle; notes.backlinks sets incomplete if it is still behind; Info re-asks each second while incomplete (max 10).

Checked: spec 18/18 with --repeat-each 18 (was 5/6 before); clippy, search+notes tests, svelte-check pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

Closes #414. Flake in `links.spec.ts:57`: Info's Mentions list never showed the plain-mention note. It fails 1 in 6 on plain dev and on train 2026-10-15k (chromium-1440, `--repeat-each 6`). Cause: plain mentions come from search, which follows the journal a moment behind. Info asks `notes.backlinks` once on open and only asks again when some note changes, so a stale answer stayed (trace: one backlinks request). The web also ignored `incomplete`. Fix: `MentionFinder::caught_up` waits up to 2 s for the index to be idle; `notes.backlinks` sets `incomplete` if it is still behind; Info re-asks each second while `incomplete` (max 10). Checked: spec 18/18 with `--repeat-each 18` (was 5/6 before); clippy, search+notes tests, svelte-check pass. 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Info: wait for search and re-ask while plain mentions lag a fresh note (#414)
Some checks failed
CI / server (pull_request) Successful in 28s
CI / rust (pull_request) Successful in 2m1s
CI / web (pull_request) Failing after 40m37s
6bbacfc387
notes.backlinks waits up to 2 s for the search index to be idle before
asking for plain mentions, and reports incomplete if it is still behind.
Info re-asks each second while incomplete, so a note written just before
the sheet opened shows up without any other note changing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Author
Owner

Superseded by #423: no waiting and no polling; search pushes search.caught_up over the live socket.

Superseded by #423: no waiting and no polling; search pushes `search.caught_up` over the live socket.
kayg closed this pull request 2026-10-15 08:20:08 +00:00
Some checks failed
CI / server (pull_request) Successful in 28s
CI / rust (pull_request) Successful in 2m1s
CI / web (pull_request) Failing after 40m37s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!420
No description provided.