Skip to content

improve(ui): stack toasts in a center lane and an arrivals lane - #192014

Merged
roboclaw-bot merged 8 commits into
mainfrom
brzezowski/toast-stack
Nov 4, 2026
Merged

roboclaw-bot merged 8 commits into
mainfrom
brzezowski/toast-stack

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The Control UI showed one toast at a time: a new toast replaced the visible one, so a Copied! erased a session failure or an Undo. Everything appeared in the top-right corner, whether it answered the operator's own action or arrived from elsewhere.

User Impact

  • Two lanes. Top center holds responses to what the operator just did; top right holds arrivals they did not trigger. In the shell, the center lane centers on the content column. Panel-anchored toasts are unchanged.
  • Each lane stacks newest first. Up to three are visible, the older two peeking behind the newest. The fourth and later wait hidden and paused.
  • Hover or focus opens the lane into a list with 8 px gaps; leaving closes it. On touch, a tap opens it and a tap outside closes it. An open center stack gives every toast the width of the widest.
  • Hover and focus pause the timers. Esc dismisses the focused toast. Timers follow the variant (6 s, warning 8 s, error 10 s) unless the caller sets a duration. A repeated message restarts instead of stacking twice.
  • Arrivals are always blocks: a 24 px squircle corner, 16 px where corner-shape is unsupported, fixed 360 px wide.
  • On a phone both lanes share one column: center first, then arrivals. The column starts below the refresh notices at the top (anchor positioning; engines without it keep the shell offset).

fifo is gone (everything stacks), placement is now top-center | top-right, and Model Providers feedback moves from the bottom corner to the center lane. The background session notice is the first top-right caller.

Why This Change Was Made

Second of four stacked PRs for the approved toast design.

Evidence

Mock Control UI, Absolutely light, through real flows: two failed uploads and an archive for the center; three background sessions finishing for the right.

Before: each toast replaced the previous one:

Before: only the last toast is visible

After: the center stack closed, then open on hover:

After: center stack closed After: center stack open

Center and right lanes together, the right lane closed with a long title, then open:

After: both lanes, right closed After: right lane open

390, closed and opened by a tap:

After: phone, closed After: phone, open

Checks run locally: oxfmt, oxlint, stylelint, pnpm tsgo:ui, pnpm check:control-ui-controllers, the toast unit and browser tests (rewritten for the stack), and the unit tests that read the old host properties (image lightbox, model providers, create agent) or touched callers (archive, palette starts and drafts, background submission). e2e was not run. Accepted edge case: moving the host into or out of a modal replays the short entry offset.

Stacked on #192013 (base brzezowski/toast-component). Land #192013 first, then this.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces single-toast presentation with expandable center and arrivals stacks.

Example: Two uploads fail, then the operator archives a session.

  • Before: The Session archived toast replaces the upload errors.
  • After: Session archived appears above both errors, which become readable when the center stack opens.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful design with direct visual evidence, but concrete recovery regressions and failing consumer and performance checks block merge.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after mock Control UI screenshots exercise upload failures, archive feedback, and background completions through the browser UI, demonstrating the changed center and arrivals presentation; they do not establish timer or failed-chunk behavior.
Patch quality 🦪 silver shellfish (2/6) 7 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: New feedback can erase a failure or Undo, and background completions share the same presentation as immediate action feedback.
Reason: The maintainer-authored design separates useful feedback without adding configuration, persistence, or another notification owner.

Merge readiness

⛔ Needs changes before merge - 8 items remain

Keep this PR open: the maintainer-approved design has clear value, but recovery, deduplication, layout, and incomplete consumer migration need repair before merge.

Priority: P2
Reviewed head: 99326a922a580e1a145440272f24eddc70e497e1

Before merge

  • Give the eager recovery card a visible stack position (P1) - When toast-view fails to download, this fallback has neither data-depth="0" nor a data-open lane. The new collapsed-stack selectors therefore absolutely position the card and set all its children to opacity: 0. Retry, dismissal, and the error message become invisible precisely when recovery is needed. Render the fallback as a visible front card and cover it with production styles.
  • Preserve distinct actions when messages have identical text (P2) - Two background sessions can share the title "Release readiness check" and both complete successfully, producing identical messages but different actionHref values and callbacks. This comparison removes the first completion notice, losing its Open session action; previously those callers used FIFO. Repeated archive batches likewise have identical copy but different Undo targets. Keep actionable entries distinct unless their operation identity also matches.
  • Keep long recovery actions shrinkable and wrappable (P2) - Together with flex: 0 0 auto, nowrap makes a long action wider than its constrained toast. The existing 320px browser scenario uses "Discard unsaved changes and reload" at text scale 1.3, and the production startup recovery uses "Discard unsaved starts and reload". These buttons can overflow the phone gutters or anchored panel instead of wrapping as on the base. Restore bounded wrapping while retaining the action's separate row.
  • Migrate the remaining toast consumers and layout fixtures (P2) - Removing toast and active leaves model-providers-page.order.test.ts:97 and several model-providers-page.removal.test.ts assertions reading the retired property. Exact-head UI CI already fails the order assertion. chat-footer-layout.browser.test.ts also constructs a bare app-toast without the new lane wrapper and fails all six geometry cases. Update these consumers and fixtures with the other migrations so the existing behavioral checks exercise the new contract.
  • Pause every notice represented by the recovery fallback (P2) - The single fallback represents all pending lanes, but its interaction handlers hold only top-center. A top-right completion continues counting down while the operator hovers or focuses Retry and can remove the recovery UI when it expires. Keyboard holding also gets cleared because this fallback never registers its lane element for laneHasFocus. Register the fallback and hold the notices it represents until interaction ends.
  • Retain the original reason when an anchored exit completes (P3) - An anchored toast that expires with motion enabled enters dismissal with reason timeout, but its opacity transition calls this method and reports dismiss instead. The fallback timer preserves timeout, so callback behavior now depends on whether a transition event arrives. Retain the pending dismissal reason and use it for both completion paths.
  • Fit the new toast styles within the enforced CSS budget (P2) - The exact-head performance comparison fails both total CSS limits: raw CSS is 1622.0 KiB against 1619.6 KiB and gzip CSS is 314.1 KiB against 313.8 KiB. Its annotations explicitly identify growth beyond the 64-byte allowance on an already-over-budget base. Reduce the introduced toast stylesheet cost and rerun the base comparison; the inherited overage does not permit additional growth.
  • Explain or restore the original intent of Long action-label wrapping - improve(ui): rebuild toasts on one component with variants and a hover dismiss #192013: The base stylesheet and browser tests preserve wrapping for long recovery actions; this PR removes shrinking and wrapping without explaining their replacement.

Findings

  • [P1] Give the eager recovery card a visible stack position — ui/src/lib/toast-host.tsx:33
  • [P2] Preserve distinct actions when messages have identical text — ui/src/lib/toast.ts:275-279
  • [P2] Keep long recovery actions shrinkable and wrappable — ui/src/styles/components.css:997

Provenance

Agent review details

How this fits together

Control UI callers submit messages and action callbacks to the shared toast owner, which manages lifetimes and publishes entries to the lazy Solid renderer and eager recovery fallback.

flowchart LR
  A[UI action feedback] --> C[Shared toast owner]
  B[Background session completions] --> C
  C --> D[Center and arrivals lanes]
  D --> E[Lazy Solid toast cards]
  D --> F[Eager recovery fallback]
  E --> G[Dismissal and caller actions]
Loading

Technical review

Best possible solution:

Keep one toast owner and renderer, preserve distinct actions and usable recovery, and complete the consumer and stylesheet cutover.

Do we have a high-confidence way to reproduce the issue?

Current-main source confirms replacement and FIFO behavior, supplied screenshots demonstrate the presentation change, and exact-head CI reproduces stale consumer failures; no target code was executed during this review.

Is this the best way to solve the issue?

Extending the existing owner is appropriate, but the smallest complete implementation must retain action identity, recovery visibility, responsive containment, and all existing consumers.

Full review comments:

  • [P1] Give the eager recovery card a visible stack position — ui/src/lib/toast-host.tsx:33
    When toast-view fails to download, this fallback has neither data-depth="0" nor a data-open lane. The new collapsed-stack selectors therefore absolutely position the card and set all its children to opacity: 0. Retry, dismissal, and the error message become invisible precisely when recovery is needed. Render the fallback as a visible front card and cover it with production styles.
    Confidence: 0.99
  • [P2] Preserve distinct actions when messages have identical text — ui/src/lib/toast.ts:275-279
    Two background sessions can share the title "Release readiness check" and both complete successfully, producing identical messages but different actionHref values and callbacks. This comparison removes the first completion notice, losing its Open session action; previously those callers used FIFO. Repeated archive batches likewise have identical copy but different Undo targets. Keep actionable entries distinct unless their operation identity also matches.
    Confidence: 0.99
  • [P2] Keep long recovery actions shrinkable and wrappable — ui/src/styles/components.css:997
    Together with flex: 0 0 auto, nowrap makes a long action wider than its constrained toast. The existing 320px browser scenario uses "Discard unsaved changes and reload" at text scale 1.3, and the production startup recovery uses "Discard unsaved starts and reload". These buttons can overflow the phone gutters or anchored panel instead of wrapping as on the base. Restore bounded wrapping while retaining the action's separate row.
    Confidence: 0.97
  • [P2] Migrate the remaining toast consumers and layout fixtures — ui/src/lib/toast.ts:428
    Removing toast and active leaves model-providers-page.order.test.ts:97 and several model-providers-page.removal.test.ts assertions reading the retired property. Exact-head UI CI already fails the order assertion. chat-footer-layout.browser.test.ts also constructs a bare app-toast without the new lane wrapper and fails all six geometry cases. Update these consumers and fixtures with the other migrations so the existing behavioral checks exercise the new contract.
    Confidence: 1
  • [P2] Pause every notice represented by the recovery fallback — ui/src/lib/toast-host.tsx:21-24
    The single fallback represents all pending lanes, but its interaction handlers hold only top-center. A top-right completion continues counting down while the operator hovers or focuses Retry and can remove the recovery UI when it expires. Keyboard holding also gets cleared because this fallback never registers its lane element for laneHasFocus. Register the fallback and hold the notices it represents until interaction ends.
    Confidence: 0.99
  • [P3] Retain the original reason when an anchored exit completes — ui/src/lib/toast.ts:324-325
    An anchored toast that expires with motion enabled enters dismissal with reason timeout, but its opacity transition calls this method and reports dismiss instead. The fallback timer preserves timeout, so callback behavior now depends on whether a transition event arrives. Retain the pending dismissal reason and use it for both completion paths.
    Confidence: 1
  • [P2] Fit the new toast styles within the enforced CSS budget — ui/src/styles/components.css:715-722
    The exact-head performance comparison fails both total CSS limits: raw CSS is 1622.0 KiB against 1619.6 KiB and gzip CSS is 314.1 KiB against 313.8 KiB. Its annotations explicitly identify growth beyond the 64-byte allowance on an already-over-budget base. Reduce the introduced toast stylesheet cost and rerun the base comparison; the inherited overage does not permit additional growth.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 51bee40d3c7f.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/lib/toast.test.ts ui/src/lib/toast-host.loading.test.ts ui/src/pages/model-providers/model-providers-page.order.test.ts ui/src/pages/model-providers/model-providers-page.removal.test.ts --maxWorkers=1
  • pnpm --dir ui test src/lib/toast.browser.test.ts src/pages/chat/chat-footer-layout.browser.test.ts
  • pnpm tsgo:test:ui
  • pnpm tsgo:ui
  • pnpm ui:build

What I checked:

  • Pinned scope and current main: The introduced diff was inspected against the stacked base. Current main still uses a single visible toast with optional FIFO queuing; this PR's two-lane feature is not implemented there. (ui/src/lib/toast.ts:173, 51bee40d3c7f)
  • Inspected visual evidence: Four prepared screenshots show the previous single toast, the collapsed and expanded center stack, and simultaneous center and arrivals lanes through mock Control UI flows. (99326a922a58)
  • Recovery contract: fix: keep retry controls when lazy recovery views fail #180646 deliberately retained visible Retry and dismissal after lazy-renderer download failure; the new fallback lacks the depth attributes required by the new stack CSS. (ui/src/lib/toast-host.tsx:33, 18596ee6398b)
  • Confirmed incomplete cutover: Exact-head UI CI reports the removed toast.toast property in model-providers-page.order.test.ts and six footer-layout failures from fixtures using the old toast markup. (ui/src/pages/model-providers/model-providers-page.order.test.ts:97, 99326a922a58)
  • CSS budget failure: The exact-head performance comparison reports total CSS growth beyond the 64-byte allowance on an already-over-budget base: raw CSS reaches 1622.0 KiB and gzip CSS reaches 314.1 KiB. (ui/src/styles/components.css:715, 99326a922a58)
  • Inherited lint failures: The stacked base also fails check-lint-core-2 with matching line-limit diagnostics on untouched files; those failures are not assigned to this PR. (8c5b9cf3eb9e)

PR surface

Source +354, Tests +55. Total +409 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 9 694 340 +354
Tests 6 303 248 +55
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 997 588 +409

Labels

Label changes:

  • add P2: A useful UI improvement with focused correctness and validation repairs; no broad runtime outage is established.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: A useful UI improvement with focused correctness and validation repairs; no broad runtime outage is established.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 3, 2026, 10:46 AM ET / 15:46 UTC.

roboclaw-bot and others added 4 commits November 3, 2026 18:44
…ked lanes

Overlay toast hosts no longer inherit the shell chrome offset on phones; e2e checks now center on the content column, read the fixed lane, and blur the toast before Escape.

Co-authored-by: vyctorbrzezowski <[email protected]>
Base automatically changed from brzezowski/toast-component to main November 4, 2026 00:02
# Conflicts:
#	ui/src/lib/toast-host.tsx
#	ui/src/lib/toast-view.tsx
#	ui/src/lib/toast.browser.test.ts
#	ui/src/lib/toast.ts
#	ui/src/styles/components.css
@aklindino

Copy link
Copy Markdown
pedo phile

@aklindino

Copy link
Copy Markdown
I am normal

@aklindino

Copy link
Copy Markdown
coldest nigga alive after george soros

@aklindino

Copy link
Copy Markdown
coldest nigga alive

@roboclaw-bot
roboclaw-bot merged commit 98561a5 into main Nov 4, 2026
60 of 64 checks passed
@roboclaw-bot
roboclaw-bot deleted the brzezowski/toast-stack branch November 4, 2026 00:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…claw#192014)

* improve(ui): rebuild the toast on one component with variants and a hover dismiss

* improve(ui): stack toasts in a center lane and an arrivals lane

* fix(ui): keep phone toasts below the top refresh notices

* test(ui): read stacked toasts in model provider tests

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): keep overlay toasts at the top inset and align e2e with stacked lanes

Overlay toast hosts no longer inherit the shell chrome offset on phones; e2e checks now center on the content column, read the fixed lane, and blur the toast before Escape.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
vincentkoc added a commit that referenced this pull request Nov 4, 2026
* commit 'b4ebd3673fea4932296b92bbc07b7abc4bdc792d':
  fix(ci): allow serial SDK API reports to finish (#192196)
  fix(ci): run PostgreSQL checks when its shard planner changes (#191963)
  fix(ci): model native Linux updater asset entry
  improve(test): speed up config and device binding browser tests (#192404)
  improve(ui): show arrivals top right with a contextual session status (#192016)
  improve(ui): mark error toasts and split two-sentence copy (#192015)
  fix(sandbox): give dependency builders a writable home (#192390)
  fix(worktrees): keep archive manifest checks off the main thread (#192358)
  fix(cron): preserve admitted runs and pacing across unrelated MCP reloads (#192399)
  improve(ui): stack toasts in a center lane and an arrivals lane (#192014)
  fix: reclaim abandoned read-only database snapshots (#192368)
  improve(ui): rebuild the toast on one component with variants and a hover dismiss (#192013)
  docs: consolidate team server and team setup into one Multiplayer page
  fix(ci): reconcile remaining unallocated test lines
  feat: run admitted MCP tools on the worker node that hosts them (#191387)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants