Skip to content

Studio: icon-only Copy and Download in the transcript, with tooltips - #11425

Merged
shimmyshimmer merged 2 commits into
mainfrom
studio/tool-cell-icon-buttons
Sep 21, 2026
Merged

shimmyshimmer merged 2 commits into
mainfrom
studio/tool-cell-icon-buttons

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Copy and Download in the transcript carried their words next to the glyph. In a narrow header, sitting next to each other, the word roughly doubles the width to repeat what the icon already says.

Where Was
Code cell header, Copy icon + "Copy"
Code cell header, Download icon + "Download"
Thinking trace header, Copy icon + "Copy"

All three now render through one IconActionButton, icon only:

<Tooltip>
  <TooltipTrigger asChild={true}>
    <button type="button" aria-label={label} className="... p-1 ..." {...props}>
      {children}
    </button>
  </TooltipTrigger>
  <TooltipContent side="top" className="tooltip-compact">{label}</TooltipContent>
</Tooltip>

The word is not lost: it is still the accessible name, and it is what the tooltip shows on hover. Copy keeps its confirmation, swapping in the tick and flipping the tooltip to "Copied" for two seconds.

It lives in its own module rather than in tool-code-cell.tsx, so the trace header and the code cell cannot drift apart.

Duplicate removed

tool-ui-code-execution.tsx carried a byte-identical copy of CopyBtn, down to its own COPY_RESET_MS. Left alone it would have kept the old padded look on the code-execution result while everything around it changed, so it imports the shared one and the duplicate goes, along with the five imports only it used.

The rest of the transcript

Swept every Copy, Download and Expand render site under assistant-ui and features/chat. Everything else was already icon only and is untouched: the image viewer's copy and download, the audio player's download, the canvas toolbar's copy, download and expand, the sandbox file rows, and Streamdown's markdown table controls.

Two keep their words on purpose, since neither is a compact toolbar:

  • Retry in the message error banner, a recovery action in a destructive box
  • Download in the prompt-storage dialog footer, a primary confirm next to Cancel

Testing

Measured the button at 20x20 against the built stylesheet. That is the same height the padded text buttons had, so neither header shifts. TooltipProvider wraps the whole app in app/provider.tsx, and the markup matches the tooltip already used on attachment tiles in the same tree.

Typecheck clean and thinking-fold passes (22 tests). Biome per file: the new module is clean, and reasoning.tsx and tool-code-cell.tsx report the same findings as before, same rules, only line numbers moved.

The cell header is narrow and the two buttons sit next to each other, so the
words doubled their width to repeat what the glyphs said. Both go through one
CellAction: a 20px square button, the same height the padded text buttons had,
so nothing shifts. The word is still the accessible name and is what the
tooltip shows on hover.

tool-ui-code-execution.tsx had a byte-identical copy of CopyBtn, which would
have kept the old look there. It imports the shared one instead.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 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-09-21T07:32:22.445362Z 396f296 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.

Same button, same reason: it sits in the trace header opposite 'Worked for Ns'
and the word only repeated the glyph. The shared button moves out of
tool-code-cell.tsx into icon-action-button.tsx so the trace header and the code
cell cannot drift apart.

Swept the rest of the transcript for the same shape. Everything else that
copies, downloads or expands was already icon only: the image viewer, the audio
player, the canvas toolbar, the sandbox file rows and Streamdown's table
controls. Retry in the error banner and Download in the prompt-storage dialog
keep their words: neither is a compact toolbar.
@shimmyshimmer shimmyshimmer changed the title Studio: icon-only Copy and Download in tool cells, with tooltips Studio: icon-only Copy and Download in the transcript, with tooltips Sep 21, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 396f296c92

ℹ️ 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".

@shimmyshimmer
shimmyshimmer merged commit a9d3b92 into main Sep 21, 2026
40 of 43 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio/tool-cell-icon-buttons branch September 21, 2026 07:47
pull Bot pushed a commit to Penguinjanator/unsloth that referenced this pull request Sep 21, 2026
Backend CI and Frontend CI have been failing on main since this morning, so
every open PR inherits them. Four separate causes, none of which is a defect in
the behaviour being guarded.

tests/test_source_read_encoding.py, two offenders. unslothai#11398 added a read of
run.py in test_reset_password_command.py and unslothai#11402 added a read of the llama
prebuilt module in test_selection_logic.py, both with the platform default
encoding, which breaks on Windows the moment either file gains a non-ASCII
byte. The guard is right and the reads are wrong. Both now pass
encoding = "utf-8".

test_sidebar_exposes_queue_activity_for_each_thread pinned the literal
"{showWorkSpinner && (". unslothai#11408 moved the working row's spinner to the trailing
column and wrote the same gate as "{showWorkSpinner ? (", which mounts the same
element under the same condition, so a correct change failed. It now asks
gates_the_markup whether showWorkSpinner conditions mounted markup, which reads
both spellings and rejects the inverted ternary that only looks like a guard.
That is stricter than the old literal in the way that matters here:
showWorkSpinner also picks class strings in this file, so a plain substring
search would have gone on passing after the spinner stopped being rendered at
all.

The ANSI browser smoke failed with "element(s) not found". The real cause is
that unslothai#11425 gave the transcript code cell an icon button with a tooltip, and
CodeExecutionResultOutput renders it. Tooltip throws outside TooltipProvider,
which takes the whole React root down, so every pane on the page went missing.
The app mounts these components inside the provider tree in app/provider.tsx;
the smoke page mounts them bare and had no provider of its own. It does now.

The second half of that one is the reason it was hard to read. echo_browser_errors
printed the pageerror and nothing acted on it, so the run failed fifteen seconds
later on a locator timeout, with the real message sitting further up a log that
otherwise looked fine. It now returns the uncaught errors and the smoke fails
with them, which is what its own docstring says it exists to prevent. Returning
is additive; callers that ignore it are unchanged.

Verified by running the smoke both ways against a real browser: with the
provider all five panes render clean text, and without it the run now stops
immediately with "the smoke page threw before rendering, so no pane exists to
check: `Tooltip` must be used within `TooltipProvider`".

The four checks still red after this are the ones unslothai#11404 fixes.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…nslothai#11425)

* Studio: icon-only Copy and Download in tool cells, with tooltips

The cell header is narrow and the two buttons sit next to each other, so the
words doubled their width to repeat what the glyphs said. Both go through one
CellAction: a 20px square button, the same height the padded text buttons had,
so nothing shifts. The word is still the accessible name and is what the
tooltip shows on hover.

tool-ui-code-execution.tsx had a byte-identical copy of CopyBtn, which would
have kept the old look there. It imports the shared one instead.

* Studio: the thinking trace's Copy loses its word too

Same button, same reason: it sits in the trace header opposite 'Worked for Ns'
and the word only repeated the glyph. The shared button moves out of
tool-code-cell.tsx into icon-action-button.tsx so the trace header and the code
cell cannot drift apart.

Swept the rest of the transcript for the same shape. Everything else that
copies, downloads or expands was already icon only: the image viewer, the audio
player, the canvas toolbar, the sandbox file rows and Streamdown's table
controls. Retry in the error banner and Download in the prompt-storage dialog
keep their words: neither is a compact toolbar.

---------

Co-authored-by: Unsloth <[email protected]>
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
Backend CI and Frontend CI have been failing on main since this morning, so
every open PR inherits them. Four separate causes, none of which is a defect in
the behaviour being guarded.

tests/test_source_read_encoding.py, two offenders. unslothai#11398 added a read of
run.py in test_reset_password_command.py and unslothai#11402 added a read of the llama
prebuilt module in test_selection_logic.py, both with the platform default
encoding, which breaks on Windows the moment either file gains a non-ASCII
byte. The guard is right and the reads are wrong. Both now pass
encoding = "utf-8".

test_sidebar_exposes_queue_activity_for_each_thread pinned the literal
"{showWorkSpinner && (". unslothai#11408 moved the working row's spinner to the trailing
column and wrote the same gate as "{showWorkSpinner ? (", which mounts the same
element under the same condition, so a correct change failed. It now asks
gates_the_markup whether showWorkSpinner conditions mounted markup, which reads
both spellings and rejects the inverted ternary that only looks like a guard.
That is stricter than the old literal in the way that matters here:
showWorkSpinner also picks class strings in this file, so a plain substring
search would have gone on passing after the spinner stopped being rendered at
all.

The ANSI browser smoke failed with "element(s) not found". The real cause is
that unslothai#11425 gave the transcript code cell an icon button with a tooltip, and
CodeExecutionResultOutput renders it. Tooltip throws outside TooltipProvider,
which takes the whole React root down, so every pane on the page went missing.
The app mounts these components inside the provider tree in app/provider.tsx;
the smoke page mounts them bare and had no provider of its own. It does now.

The second half of that one is the reason it was hard to read. echo_browser_errors
printed the pageerror and nothing acted on it, so the run failed fifteen seconds
later on a locator timeout, with the real message sitting further up a log that
otherwise looked fine. It now returns the uncaught errors and the smoke fails
with them, which is what its own docstring says it exists to prevent. Returning
is additive; callers that ignore it are unchanged.

Verified by running the smoke both ways against a real browser: with the
provider all five panes render clean text, and without it the run now stops
immediately with "the smoke page threw before rendering, so no pane exists to
check: `Tooltip` must be used within `TooltipProvider`".

The four checks still red after this are the ones unslothai#11404 fixes.
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