Skip to content

Improve toast layout - #7734

Merged
shimmyshimmer merged 1 commit into
unslothai:mainfrom
mahiatlinux:ui-composer-and-toast-layout
Aug 2, 2026
Merged

shimmyshimmer merged 1 commit into
unslothai:mainfrom
mahiatlinux:ui-composer-and-toast-layout

Conversation

@mahiatlinux

@mahiatlinux mahiatlinux commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Lay toasts out on a grid so a long message and its action button get their own rows instead of competing for one.
  • Drop the absolute positioning and the compensating right padding the cancel button used to need.
  • Keep the model loading toast's dedicated progress bar spacing from Stop and send buttons on the chat dictation bar #7683.
  • Switch the Firefox voice typing toast to Sonner's action rather than a hand rolled button inside the description, so it flows through the same layout.

Notes

The composer spacing and send icon work that was originally on this branch has been dropped, so this is toast only now. #7683 has landed in main, so the diff is just the three files above.

Validation

npm run typecheck, npm test (242 passing) and npm run build in studio/frontend.

@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: 8a625831de

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

[data-sonner-toast][data-styled='true'].chat-model-loaded-toast {
padding-top: 14px !important;
padding-bottom: 14px !important;
[data-sonner-toast][data-styled='true']:has([data-button]) {

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 Include cancel-only toasts in the grid layout

When a toast uses Sonner's cancel option without an action (for example the model-loading toast in use-chat-model-runtime.ts and the document-indexing wait toast), Sonner renders the button as [data-cancel], not [data-button]. Because this new grid layout only applies to :has([data-button]) and the old absolute [data-cancel] positioning was removed, those cancel-only toasts keep the default inline layout and long progress/descriptive text can still compete with the Cancel button—the regression this change is trying to fix.

Useful? React with 👍 / 👎.

Comment on lines +243 to +247
tooltip={transcribing === "stop" ? "Transcribing…" : "Stop recording"}
aria-label="Stop recording"
variant="ghost"
onClick={discard}
className="size-8 rounded-full text-muted-foreground hover:text-foreground"
onClick={stop}
disabled={transcribing !== null}

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 Keep a visible discard path for touch users

On touch-only/mobile sessions there is no Escape key, so after this button changed from discard to stop, the recording bar only offers actions that transcribe the audio (and non-empty transcripts are also saved to Recent dictations). That removes the previous way to abandon an accidental or private recording without saving/transcribing it; please keep a visible discard/cancel control or expose an equivalent non-keyboard path.

Useful? React with 👍 / 👎.

danielhanchen added a commit that referenced this pull request Aug 2, 2026
The import-hoist step diffed $MERGE_BASE against HEAD. On a pull_request
event HEAD is refs/pull/N/merge, so that range spans every base commit
since the branch point, and the step lints files the PR never touched.

It fails PRs that change no Python at all. #7734 touches
only TypeScript and CSS and was failed by 3 blockers from #6880; the run
reported "checking 78 file(s)".

Pin the AFTER end to the PR head SHA so the range is the PR's own commits.
The head is fetched via refs/pull/N/head, which exists for fork PRs too,
and the verifier reads revisions with git show, so the shallow clone
stands.

A failure here also short-circuits the rest of the job, so every later
lint step (debugger calls, shell parse, YAML/JSON parse, codespell,
shellcheck, ruff format) is skipped.

Co-authored-by: danielhanchen <[email protected]>
Lay toasts out on a grid so a long message and its action button get
their own rows instead of competing for one, and drop the absolute
positioning the cancel button used to need. The model loading toast
keeps its dedicated progress bar spacing from unslothai#7683.

The Firefox voice typing toast now uses Sonner's action instead of a
hand rolled button in the description, so it flows through the same
layout.
@shimmyshimmer
shimmyshimmer force-pushed the ui-composer-and-toast-layout branch from 8a62583 to 77cac7e Compare August 2, 2026 10:44
@shimmyshimmer shimmyshimmer changed the title Improve composer and toast layout Improve toast layout Aug 2, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 77cac7ec8e

ℹ️ 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 7dd1620 into unslothai:main Aug 2, 2026
36 checks passed
@mahiatlinux
mahiatlinux deleted the ui-composer-and-toast-layout branch August 13, 2026 22:21
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.

2 participants