GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(app): avoid leaking tooltip computations on hover by swf-cmd · Pull Request #61652 · anomalyco/opencode

Conversation

@swf-cmd

@swf-cmd swf-cmd commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #61651

Type of change

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

What does this PR do?

Hovering the new-session path tooltip creates an unowned Solid computation. Solid compiles the inline && in disabled into a memo-producing getter, which Kobalte reads from pointer handlers outside a reactive owner.

Move that condition into an accessor so event-time reads only evaluate the existing boolean condition. Tooltip visibility, text and path copying stay the same. The existing path E2E cases now assert that hovering emits no ownership warnings.

Updated onto dev after #63182 rewrote the new-session row (head fb86654c5, dev at b451fe395). The base-branch tooltip from #61651 is gone with that rewrite: the branch chip's tooltip passes no disabled, so this PR no longer touches workspace/selector.tsx, and the assertion that lived in the removed branch-shortcut test went with it. The diff is now view.tsx and the path test only.

How did you verify your code works?

At the current head:

  • Compiled both files with the repo's babel-preset-solid 1.9.15. On dev, the path tooltip's getter is still _$memo(() => fitted().text === directory)() && fitted().minimum <= layout.width; with this PR it is pathFits(directory). workspace/selector.tsx on dev has no disabled getter left.
  • tsc on packages/app passes. typecheck:e2e reports the same diagnostics as dev. Prettier and oxlint pass on the two changed files.
  • Not re-run at this head: the E2E suite and the full bun run check. CI needs to cover those.

At the previous head 04e55b60e, before #63182:

  • bun run check: all 35 tasks passed; bun run typecheck:tsc in packages/app also passed.
  • POSIX path, Windows path and branch-shortcut E2E: all 3 failed on the ownership warning with the dev implementation of that time and passed with the fix. Ten repetitions at 5 workers with no retries passed 30/30 in development.
  • Production build and the full new-session.spec.ts suite: 39/39 passed with 5 workers, full parallelism and no retries.

The tests capture warnings immediately before hover, so unrelated plugin-store startup warnings do not mask this regression.

Reproduce from packages/app (use test:e2e:built for the production build):

PLAYWRIGHT_PORT=4383 bun run test:e2e -- e2e/regression/new-session.spec.ts --project chromium --workers=1 --retries=0 -g 'location path keeps'

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72">
  <style>
    .tip { animation: hover 3s ease-in-out infinite; }
    @keyframes hover { 0%,100% { opacity:.3 } 30%,75% { opacity:1 } }
    @media (prefers-reduced-motion: reduce) { .tip { animation:none } }
  </style>
  <rect x="32" y="43" width="176" height="22" rx="5" fill="currentColor" opacity=".08"/>
  <path d="M45 51h9m-9 6h9m8-3h99" stroke="currentColor" stroke-width="2" opacity=".5"/>
  <g class="tip">
    <rect x="40" y="7" width="160" height="25" rx="5" fill="currentColor" opacity=".12"/>
    <path d="m115 32 5 5 5-5" fill="currentColor" opacity=".12"/>
    <text x="120" y="24" text-anchor="middle" font-family="sans-serif" font-size="11" fill="currentColor">/project/workspace</text>
  </g>
  <path d="m171 48 2 16 4-5 6-1z" fill="currentColor" opacity=".8"/>
</svg>

Screenshots / recordings

No visual or layout change. Same POSIX path tooltip state before and after:

Before:

Path tooltip before the fix

After:

Path tooltip after the fix

Checklist

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@swf-cmd
fix(app): avoid leaking tooltip computations on hover
17df491
@swf-cmd
swf-cmd requested review from Brendonovich and Hona as code owners November 4, 2026 12:52
opencodejr[bot]
opencodejr Bot reviewed Nov 4, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I ran the #61651 reproduction spec in Chromium against the dev build. On the base branch, hovering the truncated path and the "from dev" base-branch trigger both log Solid's "computations created outside a createRoot" warning. With this PR, neither hover logs it. The full new-session.spec.ts suite passes, including the case where the branch tooltip should stay inactive on Local, so disabled still updates. The three updated cases fail on the base and pass here. tsc -b in packages/app is clean.

The fix uses the same function-instead-of-inline-&& pattern as #59501, which is the right fix at the call site.

Public API: unchanged.

Non-blocking: the directory-picker tooltip in packages/app/src/workspaces/selection/dialog.tsx (disabled={!fullSelectionPath() || fullSelectionPath() === shortSelectionPath()}) probably has the same problem. It could be fixed here or in a follow-up. Alternatively, the shared Tooltip could read disabled under its own owner so call sites no longer need this workaround.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@swf-cmd
Merge dev and adapt tooltip ownership regression coverage
04e55b6
opencodejr[bot]
opencodejr Bot reviewed Nov 5, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still fixes the issue after merging dev. The base-branch accessor now reads layout.truncated, and the warnings are captured just before each hover. I re-ran the #61651 reproduction in Chromium against the dev build. On the base branch, each hover logs one ownership warning; with this PR, neither hover logs one. Together with the full new-session.spec.ts suite, all 41 tests pass. The three updated cases still fail on the base. tsc -b in packages/app is clean.

Public API: unchanged.

Nothing new to raise.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@swf-cmd

swf-cmd commented Nov 6, 2026

Copy link
Copy Markdown
Author

The current head is 04e55b60edce00ab86710c3e7c988d91d380f119. GitHub reports it as mergeable, the standards/compliance checks pass, and the latest review reports no new issues. The PR-triggered workflows are all action_required, so the remaining CI checks have not run:

  • check
  • check-test
  • check-nix
  • check-bot-scope

Could a maintainer approve these workflow runs? The focused regression coverage and local validation are recorded in the PR description. I am keeping the optional directory-picker/shared-tooltip follow-up separate so this PR stays focused on #61651.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@swf-cmd @claude
Merge dev and keep the path tooltip fix after the new-session row rew…
fb86654
…rite

anomalyco#63182 rewrote the new-session row on dev. The branch chip's tooltip no
longer passes `disabled`, so its accessor and its hover assertion are
gone with the code they covered. The path tooltip still passes an inline
`&&`, so that accessor and its hover assertion stay.

Co-Authored-By: Claude <[email protected]>
opencodejr[bot]
opencodejr Bot reviewed Nov 12, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still fixes the path tooltip after the merge with #63182. I re-ran the #61651 path-hover reproduction in Chromium against the dev build. The base branch logs one ownership warning on hover; this PR logs none. The full new-session.spec.ts suite passes, and the updated POSIX and Windows path cases fail on the base. With the rewrite, the base-branch tooltip no longer has a disabled prop, so leaving selector.tsx out is correct. tsc -b in packages/app is clean.

Public API: unchanged.

Nothing new to raise.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@swf-cmd swf-cmd closed this Nov 12, 2026
@swf-cmd

swf-cmd commented Nov 12, 2026

Copy link
Copy Markdown
Author

Closing this for now to free one of my three open-PR slots for #63498, the fix to #62554, which a user has just confirmed is costing real cache writes on 2.2.7.

Nothing changed in this fix: on dev the path tooltip still creates an unowned memo on every hover, and the branch (swf-cmd:tooltip-ownership, fb86654c5) merges cleanly. I'll reopen it when a slot frees up, unless #62129 removes the path first.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@swf-cmd @claude
Merge dev into tooltip-ownership
47510c6
One conflict, in view.tsx: dev now passes `path() ?? ""` to fitPath.
Kept dev's line and added `pathFits` after it. The path tooltip on dev
still reads `disabled` through an inline `&&`, so hovering it still
creates an unowned computation; the regression test fails on dev and
passes here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@swf-cmd

swf-cmd commented Nov 27, 2026

Copy link
Copy Markdown
Author

Reopening, as I said I would when I closed this: #62547 is now superseded by #66686, so a PR slot is free again. #62129, which would remove the path, is still open; if it lands first, this can be closed.

The branch now includes dev up to 5ca42a3e0. The only conflict was dev's fitPath(path() ?? "", …) line next to the new pathFits helper. The path tooltip on dev still passes disabled as an inline &&, so each hover still logs "computations created outside a createRoot or render will never be disposed". The two "location path keeps its start and final two segments" tests in new-session.spec.ts fail on dev and pass on this branch (local run, Chrome).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@swf-cmd swf-cmd reopened this Nov 27, 2026

This branch has not been deployed

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

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments
@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

New-session tooltips create unowned computations on hover

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@swf-cmd
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.