Skip to content

fix(picker): keep a superseded refresh from overwriting the alt-x layout - #4708

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-41980394445
Nov 5, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-41980394445

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

After two quick alt-r refreshes in the wt switch picker, a superseded refresh whose skeleton lands last could overwrite the layout that alt-x uses, so a later alt-x rendered its / branch row on the old column grid. provide_layout wrote the session-shared layout_slot unconditionally. on_skeleton already guards the other session-shared writes (shared_items and the shortcut table) with spawn_gen.is_current(). This change applies the same check inside the lock and updates the module summary, which still described three sinks.

superseded_skeleton_leaves_shared_state_alone now also checks that a live spawn publishes its layout and that a superseded one leaves the slot empty. The new assertion fails without the guard.

The nightly sweep (run 41980394445) prepared this fix, but its PR was refused twice because the bot had reached its creation allowance (#4706). The daily run review opened it from the pushed branch without changes.

`provide_layout` wrote the session-shared `layout_slot` unconditionally,
while `on_skeleton` guards the other session-shared writes (`shared_items`,
the shortcut table) on the spawn generation. After two rapid alt-r
presses, a superseded spawn whose skeleton landed last also left its
pre-refresh layout in the slot, so a later alt-x morph row rendered on
the old column grid. Take the same `is_current()` check inside the lock,
and refresh the module summary, which still described three sinks.
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Nov 5, 2026
@max-sixty
max-sixty merged commit 8d46d6b into main Nov 5, 2026
36 of 45 checks passed
@max-sixty
max-sixty deleted the nightly/clean-41980394445 branch November 5, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants