Skip to content

fix(app): prevent stale session tab reads - #39767

Merged
Brendonovich merged 2 commits into
anomalyco:devfrom
OpeOginni:fix-stale-tabs
Jul 31, 2026
Merged

fix(app): prevent stale session tab reads#39767
Brendonovich merged 2 commits into
anomalyco:devfrom
OpeOginni:fix-stale-tabs

Conversation

@OpeOginni

@OpeOginni OpeOginni commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #39766
Closes #39704

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Session and project navigation could update titlebar content while Solid was transitioning away from the previous view. Several callback-form <Show> components exposed guarded accessors to titlebar avatars and portals, allowing their children to read those accessors after the conditions were disposed and crash the desktop renderer with Stale read from <Show>.

This keys those <Show> boundaries and passes their captured values directly to the avatar, portals, and keybind. The titlebar children now receive stable values during teardown instead of reading disposed narrowing accessors.

How did you verify your code works?

  • Reproduced the original crash on desktop 1.18.10 by opening an existing session from another project.
  • Confirmed the original session-tab crash no longer occurs.
  • Ran bun typecheck in packages/app.
  • Ran bun test --conditions=browser --preload ./happydom.ts ./test-browser/solid-router-cleanup.test.ts in packages/app.
  • The repository commit-hook typecheck completed successfully across 30 packages.
  • Ran git diff --check.

Screenshots / recordings

Not applicable; this fixes renderer crashes without changing the UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@Brendonovich
Brendonovich enabled auto-merge (squash) July 31, 2026 04:56
@Brendonovich
Brendonovich merged commit db4dbaa into anomalyco:dev Jul 31, 2026
10 checks passed
@OpeOginni

Copy link
Copy Markdown
Contributor Author

Haha, thanks for the Merge Brendan, but I wasnt completely done with the fix, slept off lol.

Ill make a new one now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants