"Visa fler": count only this thread's opened posts #248

Merged
littlefox merged 2 commits from issue-235-open-budget into main 2026-10-21 22:27:42 +00:00
Owner

Closes #235
Closes #249

Kom::thread gave an opened branch a budget of OPEN_BUDGET * open.len(), and open holds every post opened with "Visa fler" in the session, in any thread. Now each opened post adds OPEN_BUDGET when the walk reaches it.

Verified: the devserver test thread_tree builds a chain longer than one budget (110 links) and checks that opening its root shows the same with and without posts opened elsewhere; it fails without the fix (checked) and passes with it. Lint clean.

Also two flaky specs that failed this PR's first run (#249): thread.spec deep thread (a card read by being seen) and time.spec (a tap lost while the post is drawn again).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #235 Closes #249 `Kom::thread` gave an opened branch a budget of `OPEN_BUDGET * open.len()`, and `open` holds every post opened with "Visa fler" in the session, in any thread. Now each opened post adds `OPEN_BUDGET` when the walk reaches it. Verified: the devserver test `thread_tree` builds a chain longer than one budget (110 links) and checks that opening its root shows the same with and without posts opened elsewhere; it fails without the fix (checked) and passes with it. Lint clean. Also two flaky specs that failed this PR's first run (#249): thread.spec deep thread (a card read by being seen) and time.spec (a tap lost while the post is drawn again). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Count only this thread's opened posts in the "Visa fler" budget
Some checks failed
ci / check (push) Successful in 15m44s
ci / desktop (push) Successful in 21m34s
ci / e2e (push) Failing after 39m5s
87d7c6525a
The budget was 100 per post ever opened with "Visa fler", in any
thread, because the set of opened posts is kept for the session. After
clicks in 20 threads, the next click opened up to 2 000 posts. Now each
opened post adds its 100 when the walk reaches it, so other threads'
posts add nothing. The devserver test opens a chain longer than one
budget with and without posts opened elsewhere; it failed before.

Closes #235

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Fix two flaky specs: a card read by being seen, a lost tap
All checks were successful
ci / check (push) Successful in 9m12s
ci / desktop (push) Successful in 16m8s
ci / e2e (push) Successful in 29m36s
786c724774
thread.spec's deep-thread test looked at the thread long enough for the
next card to be read by being seen, so reading on skipped it; it now
turns read-by-seen off like the first test. time.spec tapped the time
while the post was being drawn again inside its thread; it now taps until
the label switches.

Refs #249

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
littlefox referenced this pull request from a commit 2026-10-22 14:11:05 +00:00
Sign in to join this conversation.
No description provided.