Skip to content

Studio: prevent tooltips from hidden run settings - #13614

Merged
danielhanchen merged 1 commit into
unslothai:mainfrom
wasimysaid:fix/hidden-run-settings-tooltip
Oct 14, 2026
Merged

danielhanchen merged 1 commit into
unslothai:mainfrom
wasimysaid:fix/hidden-run-settings-tooltip

Conversation

@wasimysaid

@wasimysaid wasimysaid commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix a clipped black Close run settings tooltip that can remain visible at the right edge of chat when its hidden trigger receives focus.

The closed desktop settings panel uses w-0 overflow-hidden, but its controls remain mounted and focusable. The tooltip is portaled outside the panel, so clipping the panel does not hide it.

  • Make the closed panel inert so its controls cannot receive focus or pointer input.
  • Reset the close-button tooltip when panel visibility changes, preventing its open state from surviving a close/reopen cycle.

Keeps the rest of the settings content mounted and preserves the existing compact-layout behavior. One source file; two insertions and one deletion. No test files, generated assets, or evidence files in the diff.

Verification

  • Before: Tab navigation reaches the hidden close control. Diagnostic offscreen focus produces a clipped tooltip that remains after moving the pointer away, including during real Qwen4 chat.
  • After: hidden controls reject focus and are skipped by Tab; visible close-button hover/focus still works; closing removes the tooltip; reopening does not resurrect it.
  • Browser checks at DPR 1 and 2.5, plus compact settings open/dismiss at 900 CSS pixels.
  • npm run typecheck, npm run build, and npm run i18n:check:strict pass.
  • Full npm test: 11,992 passed, 9 failed. All 9 failures reproduce unchanged in the corresponding test files on the unmodified base (locale-format expectations and an unrelated image-settings restore test).
  • npm run lint reports the same 1,413 diagnostics on base and head (1,085 errors, 328 warnings); no new diagnostics after normalizing shifted line numbers and formatter spacing.

The screenshot-matching reproduction used diagnostic focus on the offscreen control; this does not establish the original reporter's exact mouse-only sequence or native Windows behavior.

Before / after (merge base 2e556ba vs head 759fb0c, Chromium 1600x1000)

Run settings closed, Tab pressed from the page start. Before: the 7th Tab stop is the hidden close button inside the 0-width panel, so focus disappears with no visible target (33 of 60 Tab stops land inside the collapsed panel). After: the closed panel is inert and Tab never enters it (0 of 60).

Closed Run settings panel, Tab walk

Panel open, hovering the close button: the "Close run settings" tooltip still shows on both sides.

Open Run settings panel, close button hover

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T16:28:10.583054Z 759fb0c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 759fb0cde7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ref={asideRef}
data-tour="chat-settings"
data-slot="chat-settings-panel"
inert={!open}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Transfer focus before making the panel inert

When a keyboard user activates the panel's Close button, this update makes the button's ancestor inert while it still owns focus (and the newly keyed Tooltip also replaces that node). Native inert therefore drops focus to document.body; the sibling Open run settings button in chat-page.tsx is rendered without a ref or effect to receive it. This leaves no visible focus target after a keyboard close, so transfer focus to the opener or another stable control as part of the close transition.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not a regression: on the merge base the keyboard close leaves focus on the now invisible close button inside the collapsed w-0 panel (measured in a browser), so there was no visible focus target before either; with inert the browser moves focus to the document instead of a hidden control. Returning focus to the opener is a separate accessibility improvement outside this fix.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 14, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 14, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 759fb0cde7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants