Repository navigation
refactor(ui): use a Solid action for usage-limit copying - #179256
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces manual clipboard pending state with a Solid action and optimistic flag while retaining copy-result feedback. Example: A Business user clicks Copy request for admin, then retries after a successful copy.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR is a focused Solid lifecycle refactor with no actionable introduced defects found; required CI remains unsuccessful. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe chat notice renderer selects a session/run-scoped usage-limit dialog, whose copy button passes localized request text to the shared clipboard helper and displays its boolean outcome. flowchart TD
A[Chat run error] --> B[Chat notice renderer]
B --> C[Usage limit dialog]
C --> D[Solid copy action]
D --> E[Shared clipboard helper]
E --> F[Browser clipboard or legacy fallback]
E --> G[Success or manual copy feedback]
Technical reviewBest possible solution: Retain this small conversion using Solid for pending presentation and the existing clipboard helper for copying and fallback policy. Do we have a high-confidence way to reproduce the issue? No broken product behavior is claimed; source inspection confirms the manual pending-state implementation this refactor replaces. Is this the best way to solve the issue? The conversion follows the documented Solid action contract, preserves durable feedback, and adds no competing clipboard owner or unnecessary abstraction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 550857b891a7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +11. Total +12 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 21, 2026, 4:39 AM ET / 08:39 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…9256) * refactor(ui): use a Solid action for usage-limit copying * fix(ui): preserve action handler and HTML result contracts
What Problem This Solves
The ChatGPT business usage-limit dialog manually combines the clipboard operation's temporary copying state with its durable success/failure feedback. This adopts Solid 2's native action lifecycle for that operation while preserving the current UI behavior.
User Impact
Copy request for admin remains disabled while the clipboard write is pending. A retry hides the previous result until it finishes. Successful copies keep their confirmation; denied copies keep the manual request fallback. Consumer links, modal dismissal, and parked-session behavior are unchanged.
Why This Change Was Made
A generator action co-writes
createOptimistic(false)for the temporary copying affordance and commits the clipboard owner's boolean result to the existing feedback signal. The optimistic flag resets when the action settles.copyToClipboardremains the sole owner of secure-context copying, legacy fallback, and cross-control attempt ordering. There is no server-owned read to refresh or affected server slot to declare.This uses the shared action-runtime split from #179084. The native button keeps its void-returning handler contract while invoking the action. No chunking policy, startup import, dependency, component tag, class, or style is added here.
Evidence
pnpm tsgo:uipassed again with tsrs after the rc.16 integrationpnpm deadcode:knippassed in 7m 4.3sci:fullThe unchanged base already fails the strict 325,476-byte startup ratchet. The candidate adds 3 gzip bytes, within the existing 64-byte build-variance allowance, with identical raw startup bytes. The shared runtime split keeps the action consumer out of startup; no budget is changed and no absolute pass is claimed. The unit run emits an existing diagnostic for the unchanged
presentedread in the modal's open-change callback; no diagnostic is suppressed.No appearance or layout changes are intended: markup, classes, content, controls, and observable pending/result states are preserved. The focused test exercises those existing states; there is no new visual state to screenshot.
Solid 2 Audit
Counts cover the touched production component. The full top-level chat audit and its retained synchronous owner contracts are recorded in #179073.
onCleanupcreateComponentEffects, untrack, direct native listeners, DOM queries, flush, and owner escapes remain zero. The one production line adds the native optimistic affordance; no wrapper or new owner is introduced. The durable result signal is retained because the user must see the copy outcome after the transaction ends. The Solid skill, refactor checklist, installed rc.14/rc.16 cheatsheets and action types, and upstream action RFC informed the change.
The CI repair batch restores the void-returning native click wrapper and waits for the HTML preview counter's existing expected value after clicking it. Sandbox, final-byte, and exact-download assertions are unchanged. Main supplies the solo-widget resize/setup repair.
CI run
39574108500on25cce0aabf8dproves the repaired HTML-publication case (12.24 s) and solo-widget case (5.129 s). Full type-aware lint and performance pass: startup 329,236 B gzip, 986,759 raw bytes, 8 JS / 1 CSS request; chat boot 1,497,985 → 1,498,057 B gzip (+72 B). These are prior-head results, not proof of the replacement main integration.That run also fails the pane-header case already repaired on main in #179221, the Markdown containment case, and the cross-channel automation case at its first
create:reply wait. The then-latest completed scheduled main39578067192reproduces both the exact Markdown test and line-214 assertion, and the exact automation test and line-308 timeout (final bus-event kinds=[inbound-message,outbound-message]). The local automation baseline was stopped during worker compilation once this matching main evidence arrived; it produced no test verdict. Source attribution alone is not used as inherited-failure proof.The main integration retains #179221’s exact pane-activation repair. Frozen installation and
pnpm tsgo:uipass, and the unchanged three-file authored delta is independently reviewed clean through P2. The confirmed-cancelled auto request remains retired; the replacement head will use native recovery after its full CI run.Final candidate CI 39585793366 (
adf32da240a8) passes all UI-unit shards, eight of nine UI E2E shards, performance, and security-fast. The HTML-publication case passes in 12.040 s, folding in 21.726 s, and real-Gateway chat loading performance in 27.161 s. The only failed jobs contain the exact Markdown containment assertion (line 214) and automationcreate:timeout (line 308) also failing on latest completed scheduled main 39585413125. The run has 35 successful, 26 intentionally skipped, and those two failed jobs plus their aggregate gate; no cancelled or timed-out job is omitted.Current-head startup is 330,965 B gzip, 990,059 raw bytes, 8 JS / 1 CSS request. Chat boot is 1,499,590 → 1,499,584 B gzip (−6 B). Performance passes. Native inherited-failure evidence pins tested merge
794eec7cb2dawith ordered parentsb79c32a97f88and this exact head, verifies unchanged named failure inputs, and retains hashed PR/latest-main logs. Landing uses explicit replacement recovery of the confirmed-cancelled auto request; failed CI is not relabeled green.