Skip to content

fix: a replaced session's old word no longer takes the click from its copy - #875

Merged
petre-c merged 1 commit into
mainfrom
fix/session-rank-skips-replaced
Dec 1, 2026
Merged

petre-c merged 1 commit into
mainfrom
fix/session-rank-skips-replaced

Conversation

@petre-c

@petre-c petre-c commented Dec 1, 2026

Copy link
Copy Markdown

Deskbar task 7e552f55

Main has been red since Deskbar #870 merged. Its own CI run already failed on the same test, and every open pull request now fails it too.

The failing test is JsonTaskStoreTests.A_file_with_fields_this_build_does_not_know_loads_whole_and_the_next_save_drops_them. It expects a session's copy (c2-0000) to stay the task's session after a session list shows the old, replaced session (s1) running again, and it got s1. The old session had written "Started" on the thread and the copy had not written yet, so #870's last-word rule ranked the old one first.

The fix is in SessionRank.cs: a replaced session's word no longer counts. /clear or a model switch carried that conversation on under the copy's id, so the old ask belongs to the copy's history. The replaced session keeps its place among live sessions, just without the word, which brings back the order it had before #870 (newest joined first). A comment and the task page were never affected, because both already skip replaced sessions.

Tested: Release build with warnings as errors, and Deskbar.Core.Tests, 6198 pass, including the test that was failing.

Release notes

  • After /clear, Open Claude and the task's icon on the bar go to the new session again, even when the old one still shows as running.

opus5.5

… copy

Main has been red since the merge of Deskbar #870: JsonTaskStoreTests'
"fields this build does not know" test expected the copy c2-0000 to be the
task's session, and got the replaced s1. A session list showing s1 running
brings it back live, and s1 had written "Started" on the thread while its
copy had not written yet, so the new last-word rule ranked s1 first.

A replaced session's conversation goes on under the copy's id, so its word
no longer counts. It keeps its place among live sessions, just without the
word, which gives the old order (newest joined first) back for it.
CommentWake and the page's transcript already leave replaced sessions out.

*opus5.5*
@petre-c
petre-c merged commit ae89d70 into main Dec 1, 2026
2 checks passed
@petre-c
petre-c deleted the fix/session-rank-skips-replaced branch December 1, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant