Repository navigation
improve: skip unused toast dismissal work - #147196
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 12:53 PM ET / 16:53 UTC. ClawSweeper reviewWhat this changesThe PR avoids unused browser measurements during toast dismissal and extends existing tests to preserve callbacks, cleanup, and reduced-motion behavior. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused optimization absent from current main. No actionable correctness or security findings were identified, and the maintainer-protected PR is not eligible for cleanup closure. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI’s shared toast host receives notifications and optional actions from UI features. It manages placement, dismissal timing, queued notifications, and completion callbacks. flowchart TD
A[UI notifications] --> B[Shared toast host]
B --> C[Action, removal, or timeout]
C --> D{Animation needed?}
D -->|No| E[Complete dismissal]
D -->|Yes| F[Read motion preference and geometry]
F --> G[Animate with fallback timer]
G --> E
E --> H[Notify caller and advance queue]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +18. Total +19 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep dismissal decisions in the shared toast host and perform live browser queries only when their results affect animation. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main queries media and anchor geometry before action or removal dismissal, despite immediately finishing those paths. Runtime reproduction was not executed in this read-only review. Is this the best way to solve the issue? Yes. Short-circuiting the existing dismissal decision and sharing its anchor predicate removes unnecessary work without adding state, changing public options, or altering callback semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b735b686361e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '201f11afefdb19a9c75e9d3542bf7425c80df7a7': (141 commits) fix: keep catalog discovery scoped and execution lazy (#147159) fix: serialize reclamation worker shutdown with foreground writes (#147178) test(sessions): cover abrupt committed transcript recovery (#143984) fix: stop transcript storms during context overflow recovery (#147202) fix: reduce CPU overhead for small history and usage reads (#147205) fix: resume tasks after tools finish and the model times out (#147203) refactor(scripts): share SQLite reliability message waits (#146900) feat(exec): configure approval reviewer thinking and fastMode (#147192) test: remove redundant Bonjour module headers (#146981) refactor: share streaming media tail boundary update (#146989) refactor(tui): classify resume candidates once (#146983) improve: skip unused toast dismissal work (#147196) fix(linux): recover saved remote connections without replacing active sessions (#146047) fix: doctor stays silent when Windows state dir is under OneDrive (#123720) feat: announce successful Daybreak retries (#147146) feat(code-mode): reuse results across code cells (#147154) refactor(test): reuse CLI plugin fixture writer (#147186) test: skip unused compiler setup in routing fixtures (#147194) test: reuse LINE webhook runtime fixture (#146710) fix(code-mode): check automation and process result types (#147143) ...
Related: #145679
What Problem This Solves
Toast actions, removal, and reduced-motion dismissal perform browser measurements that their immediate completion paths do not use.
Why This Change Was Made
Share the existing connected, positive-width anchor check and evaluate layout and media queries only when dismissal needs them. Animated dismissals still use live geometry and the current motion preference.
User Impact
Toast dismissal avoids unnecessary browser work while preserving placement, Undo callbacks, focus/hover pauses, queued outcomes, and animation completion. No configuration or visual behavior changes.
Evidence
5541c3d, the ordinary UI build/comparison measured 355,723 startup gzip bytes versus 355,744 for unchanged source. That local gate failed by 4 bytes against its then-current 355,719-byte limit. The failed result is retained. This PR changes no baseline, allowance, or comparison setting.8baed117and preserves the same two tested toast files; its first hosted UI gate passed at 355,103 startup gzip bytes against the inherited 356,316-byte limit. This integrated result includes newer main code and is not an isolated toast-size comparison. It does not claim credit for the independent budget repair.