Skip to content

fix(control-ui): show recovery for ChatGPT usage limits - #177530

Merged
stevenlee-oai merged 3 commits into
mainfrom
dev/stevenlee/siwc-business-usage-limit
Oct 19, 2026
Merged

stevenlee-oai merged 3 commits into
mainfrom
dev/stevenlee/siwc-business-usage-limit

Conversation

@stevenlee-oai

@stevenlee-oai stevenlee-oai commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

ChatGPT sharing-limit errors reach the Control UI as generic failures, leaving users without the appropriate recovery action.

User Impact

For OpenAI HTTP 429 responses, consumers can open Manage usage, while Business users can Copy request for admin and receive confirmation or a manual-copy fallback. Copying does not send the request or change a limit.

Why This Change Was Made

Preserve the bounded provider error code through the existing terminal-event path and select one shared modal for the two subscription-sharing errors. Other 429s retain their existing behavior. Modal dismissal stays scoped to the session/run and respects background panes.

Evidence

Before is the unmodified main notice renderer at ca7bc36af: a generic error notice with no modal. After captures use this PR's renderer at 22ae9cc2b, showing the Business or consumer recovery modal. The usage-limit feature patch remains unchanged at ac212d8f4, after main integration and a formatting-only CI repair. Both use the same viewport and synthetic error scenario; these are controlled component captures, not live Gateway/provider 429 captures.

Before: main — no modal After: Business After: consumer
Main: generic error notice, no usage-limit modal Business usage-limit modal Consumer usage-limit modal
Light appearance
Business Consumer
Business modal in light appearance Consumer modal in light appearance
  • Applied the same patch to older main commit 155bcecacc1ec80c89d55399973e47c4817eb4bc for validation, preserving its dependency pins. Frozen install and supply-chain checks passed.
  • 112 focused tests passed (81 UI, 31 backend), covering error propagation/classification, generic 429 preservation, copy success/failure, consumer navigation, and modal lifecycle. Affected suites were rerun after the final type/lint fixes.
  • Targeted lint, styles, formatting, localization verification checks passed. Independent correctness and maintainability review found no remaining actionable issues.
  • Reflowed one expression in nodes-tool-media.ts to repair an inherited main formatting failure. CI's oxfmt 0.72.0 accepts the repaired file; behavior is unchanged.
  • Core and UI typechecks on the validation base report only a verified pre-existing TS2554 at src/snapshot/local-repository.ts:1101 (an unchanged call supplies two arguments to a one-argument helper). This older-base evidence is separate from PR CI.

The shared autoreview CLI could not start because its isolated bootstrap could not resolve a cached executable; no automated autoreview verdict is claimed. Separate independent code/design reviews completed with no remaining actionable findings.

@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@stevenlee-oai
stevenlee-oai marked this pull request as ready for review October 19, 2026 17:25
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: openai size: M labels Oct 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves ChatGPT sharing-limit error codes and shows consumer or Business recovery actions in the Control UI.

Example: OpenAI returns HTTP 429 with subscription_sharing_workplace_individual_usage_limit_exceeded.

  • Before: The Control UI shows a generic failed-reply notice.
  • After: A ChatGPT usage-limit dialog offers Copy request for admin, with confirmation or manual-copy fallback.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused implementation with no actionable finding; component captures and in-process coverage provide limited end-to-end confidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected component screenshots establish presentation, while the supplied production-handler tests support propagation without demonstrating a running Gateway/provider recovery flow.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users encountering ChatGPT sharing limits receive a generic failure without the appropriate usage-management or workspace-admin recovery action.
Reason: The focused recovery has clear user value, and the maintainer-authored direction supplies the owner decision.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: current main lacks the targeted recovery actions, and no actionable correctness or security defect was found; the formatting check now passes while broader CI remains pending.

Priority: P2
Reviewed head: ac212d8f48518e7584db7306c2543a6d81948ec4

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: A running Gateway-to-Control-UI capture exercising both recovery variants, an action, and dismissal is absent; base-red/head-green execution is also not documented.
Agent review details

How this fits together

Provider errors become sanitized agent lifecycle facts, pass through Gateway chat events, and reach the Control UI's existing run-error and modal owners.

flowchart LR
  A[Provider error] --> B[Agent error observation]
  B --> C[Lifecycle terminal]
  C --> D[Gateway chat event]
  D --> E[Control UI run error]
  E --> F[Usage recovery dialog]
Loading

Technical review

Best possible solution:

Keep the existing sanitized terminal-event path and shared modal owner, with recovery selected only for the two exact OpenAI HTTP 429 codes.

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

Current-main source drops the structured provider code before UI classification, explaining the generic notice; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The smallest complete fix extends the existing diagnostic projection and run-error classification, then reuses the modal and clipboard owners without competing state or configuration.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +201, Tests +240, Docs +6. Total +447 across 18 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 11 213 12 +201
Tests 6 241 1 +240
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 460 13 +447

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a focused recovery improvement for two provider quota failures, with no demonstrated broad runtime outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Optionally capture both recovery variants through a running Gateway and Control UI, including an action and dismissal, with sensitive values redacted.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-19T17:47:51.955Z sha 22ae9cc :: needs maintainer review before merge. :: none
  • reviewed 2026-10-19T18:00:59.695Z sha 1e804a8 :: needs changes before merge. :: none

Reviewed October 19, 2026, 2:23 PM ET / 18:23 UTC (Revision 3).

@stevenlee-oai

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Codex: integrated the upstream CI baseline repair. The usage-limit feature patch is unchanged, and the attached screenshots retain their original capture provenance.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@stevenlee-oai

Copy link
Copy Markdown
Contributor Author

Codex: inspected the failed check-docs job. Only the global formatting step fails, naming src/agents/tools/nodes-tool-media.ts. That untouched file has the identical blob at CI's base d6b6066d3239bd653d707f09737aa7b163252078 and tested merge ce7b6ace5fbc27135d13f73e80ec73bbb671eb40, so the failure is inherited from main.

Documentation formatting and content checks passed; glossary checking was skipped for a missing merge base. The remaining CI jobs are still running.

@stevenlee-oai

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Codex: fixed the inherited formatting failure with a single expression reflow. The usage-limit feature patch and attached screenshot provenance are unchanged.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@stevenlee-oai
stevenlee-oai merged commit dbda20f into main Oct 19, 2026
141 of 142 checks passed
@stevenlee-oai
stevenlee-oai deleted the dev/stevenlee/siwc-business-usage-limit branch October 19, 2026 18:41
@stevenlee-oai

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
)

* fix(control-ui): show recovery for ChatGPT usage limits

* style(agents): fix inherited node media formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: openai gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant