Skip to content

Commit 55d3859

Browse files
PR Batch Testerclaude
andcommitted
fix(web): ChatGPT limit banner stays up when the failure is a usage limit
ChatView hides the thread error banner for usage-limit failures in favor of the recovery banner. Now that ChatGPT sharing limits are usage limits, that would drop the ChatGPT banner and its "Manage usage" and "Copy request for admin" actions. Keep it for those two codes; mobile already shows both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent fa516a3 commit 55d3859

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ import { RightPanelSurfaceContent } from "./chat/RightPanelSurfaceContent";
4040
import { usePendingThreadRequests } from "./chat/usePendingThreadRequests";
4141
import { isScratchProject } from "@t3tools/client-runtime/state/projects";
4242
import { visibleThreadPullRequests } from "@t3tools/shared/threadPullRequests";
43+
import {
44+
CHATGPT_USAGE_LIMIT_CODE,
45+
CHATGPT_WORKSPACE_USAGE_LIMIT_CODE,
46+
} from "@t3tools/shared/usageLimits";
4347
import {
4448
latestExecutedRun,
4549
latestRootProviderFailure,
@@ -880,9 +884,12 @@ export default function ChatView(props: ChatViewProps) {
880884
);
881885
const browserAvailable = isPreviewSupportedInRuntime() || activeEnvironmentServerBrowser;
882886
const activeThreadShell = serverThread;
887+
// ChatGPT sharing limits keep their own banner; OpenAI's partner guidelines specify it.
883888
const timelineThreadError =
884889
serverRuntime?.status === "failed" &&
885890
serverRuntime.lastErrorClass === "usage_limit" &&
891+
serverRuntime.lastErrorCode !== CHATGPT_USAGE_LIMIT_CODE &&
892+
serverRuntime.lastErrorCode !== CHATGPT_WORKSPACE_USAGE_LIMIT_CODE &&
886893
activeThreadShell?.latestRun &&
887894
visibleThreadError === serverRuntime.lastError
888895
? null

0 commit comments

Comments
 (0)