Skip to content

Commit c46e20b

Browse files
committed
🤖 fix: ignore Codex rate limit errors in CI check
_Generated with `mux`_
1 parent d2132e3 commit c46e20b

File tree

9 files changed

+55
-17
lines changed

9 files changed

+55
-17
lines changed

scripts/check_codex_comments.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ RESULT=$(gh api graphql \
5555
-F repo="$REPO" \
5656
-F pr="$PR_NUMBER")
5757

58-
# Filter regular comments from bot that aren't minimized and don't say "Didn't find any major issues"
59-
REGULAR_COMMENTS=$(echo "$RESULT" | jq "[.data.repository.pullRequest.comments.nodes[] | select(.author.login == \"${BOT_LOGIN_GRAPHQL}\" and .isMinimized == false and (.body | test(\"Didn't find any major issues\") | not))]")
58+
# Filter regular comments from bot that aren't minimized, excluding:
59+
# - "Didn't find any major issues" (no issues found)
60+
# - "usage limits have been reached" (rate limit error, not a real review)
61+
REGULAR_COMMENTS=$(echo "$RESULT" | jq "[.data.repository.pullRequest.comments.nodes[] | select(.author.login == \"${BOT_LOGIN_GRAPHQL}\" and .isMinimized == false and (.body | test(\"Didn't find any major issues|usage limits have been reached\") | not))]")
6062
REGULAR_COUNT=$(echo "$REGULAR_COMMENTS" | jq 'length')
6163

6264
# Filter unresolved review threads from bot

src/browser/components/GitStatusIndicatorView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ export const GitStatusIndicatorView: React.FC<GitStatusIndicatorViewProps> = ({
206206
);
207207

208208
// Dynamic color based on working state
209-
const statusColor = isWorking ? "text-blue-400 animate-pulse" : "text-muted";
210-
const dirtyColor = isWorking ? "text-blue-400" : "text-git-dirty";
209+
// Idle: muted/grayscale, Working: original accent colors
210+
const statusColor = isWorking ? "text-accent" : "text-muted";
211+
const dirtyColor = isWorking ? "text-git-dirty" : "text-muted";
211212

212213
return (
213214
<>

src/browser/components/ProjectSidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createPortal } from "react-dom";
33
import { cn } from "@/common/lib/utils";
44
import type { FrontendWorkspaceMetadata } from "@/common/types/workspace";
55
import { usePersistedState } from "@/browser/hooks/usePersistedState";
6+
import { EXPANDED_PROJECTS_KEY } from "@/common/constants/storage";
67
import { DndProvider } from "react-dnd";
78
import { HTML5Backend, getEmptyImage } from "react-dnd-html5-backend";
89
import { useDrag, useDrop, useDragLayer } from "react-dnd";
@@ -197,7 +198,7 @@ const ProjectSidebarInner: React.FC<ProjectSidebarProps> = ({
197198

198199
// Store as array in localStorage, convert to Set for usage
199200
const [expandedProjectsArray, setExpandedProjectsArray] = usePersistedState<string[]>(
200-
"expandedProjects",
201+
EXPANDED_PROJECTS_KEY,
201202
[]
202203
);
203204
// Handle corrupted localStorage data (old Set stored as {})

src/browser/components/RuntimeBadge.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,20 @@ function LocalIcon() {
7979
}
8080

8181
// Runtime-specific color schemes - each type has consistent colors in idle/working states
82+
// Idle: subtle with visible colored border for discrimination
83+
// Working: brighter colors with pulse animation
8284
const RUNTIME_STYLES = {
8385
ssh: {
84-
idle: "bg-blue-500/10 text-blue-400/70 border-blue-500/40",
85-
working: "bg-blue-500/20 text-blue-400 border-blue-500/50 animate-pulse",
86+
idle: "bg-transparent text-muted border-blue-500/50",
87+
working: "bg-blue-500/20 text-blue-400 border-blue-500/60 animate-pulse",
8688
},
8789
worktree: {
88-
idle: "bg-purple-500/10 text-purple-400/70 border-purple-500/40",
89-
working: "bg-purple-500/20 text-purple-400 border-purple-500/50 animate-pulse",
90+
idle: "bg-transparent text-muted border-purple-500/50",
91+
working: "bg-purple-500/20 text-purple-400 border-purple-500/60 animate-pulse",
9092
},
9193
local: {
92-
idle: "bg-muted/20 text-muted/70 border-muted/40",
93-
working: "bg-muted/30 text-muted border-muted/50 animate-pulse",
94+
idle: "bg-transparent text-muted border-muted/50",
95+
working: "bg-muted/30 text-muted border-muted/60 animate-pulse",
9496
},
9597
} as const;
9698

src/browser/contexts/WorkspaceContext.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type { WorkspaceContext } from "./WorkspaceContext";
1111
import { WorkspaceProvider, useWorkspaceContext } from "./WorkspaceContext";
1212
import { ProjectProvider } from "@/browser/contexts/ProjectContext";
1313
import { useWorkspaceStoreRaw } from "@/browser/stores/WorkspaceStore";
14+
import { SELECTED_WORKSPACE_KEY } from "@/common/constants/storage";
1415

1516
// Helper to create test workspace metadata with default runtime config
1617
const createWorkspaceMetadata = (
@@ -649,7 +650,7 @@ describe("WorkspaceContext", () => {
649650
// Verify it's set and persisted to localStorage
650651
await waitFor(() => {
651652
expect(ctx().selectedWorkspace?.workspaceId).toBe("ws-1");
652-
const stored = globalThis.localStorage.getItem("selectedWorkspace");
653+
const stored = globalThis.localStorage.getItem(SELECTED_WORKSPACE_KEY);
653654
expect(stored).toBeTruthy();
654655
const parsed = JSON.parse(stored!) as { workspaceId?: string };
655656
expect(parsed.workspaceId).toBe("ws-1");

src/browser/contexts/WorkspaceContext.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import {
1111
import type { FrontendWorkspaceMetadata } from "@/common/types/workspace";
1212
import type { WorkspaceSelection } from "@/browser/components/ProjectSidebar";
1313
import type { RuntimeConfig } from "@/common/types/runtime";
14-
import { deleteWorkspaceStorage, migrateWorkspaceStorage } from "@/common/constants/storage";
14+
import {
15+
deleteWorkspaceStorage,
16+
migrateWorkspaceStorage,
17+
SELECTED_WORKSPACE_KEY,
18+
} from "@/common/constants/storage";
1519
import { usePersistedState } from "@/browser/hooks/usePersistedState";
1620
import { useProjectContext } from "@/browser/contexts/ProjectContext";
1721
import { useWorkspaceStoreRaw } from "@/browser/stores/WorkspaceStore";
@@ -107,7 +111,7 @@ export function WorkspaceProvider(props: WorkspaceProviderProps) {
107111

108112
// Manage selected workspace internally with localStorage persistence
109113
const [selectedWorkspace, setSelectedWorkspace] = usePersistedState<WorkspaceSelection | null>(
110-
"selectedWorkspace",
114+
SELECTED_WORKSPACE_KEY,
111115
null
112116
);
113117

src/browser/stories/App.sidebar.stories.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
installMockAPI,
1717
type GitStatusFixture,
1818
} from "./mockFactory";
19+
import { expandProjects } from "./storyHelpers";
1920

2021
export default {
2122
...appMeta,
@@ -290,6 +291,9 @@ export const RuntimeBadgeVariations: AppStory = {
290291
chatHandlers,
291292
})
292293
);
294+
295+
// Expand the project so badges are visible
296+
expandProjects(["/home/user/projects/runtime-demo"]);
293297
}}
294298
/>
295299
),

src/browser/stories/storyHelpers.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
import type { FrontendWorkspaceMetadata } from "@/common/types/workspace";
99
import type { MuxMessage } from "@/common/types/message";
1010
import type { WorkspaceChatMessage } from "@/common/types/ipc";
11+
import {
12+
SELECTED_WORKSPACE_KEY,
13+
EXPANDED_PROJECTS_KEY,
14+
getInputKey,
15+
getModelKey,
16+
} from "@/common/constants/storage";
1117
import {
1218
createWorkspace,
1319
createMockAPI,
@@ -25,7 +31,7 @@ import {
2531
/** Set localStorage to select a workspace */
2632
export function selectWorkspace(workspace: FrontendWorkspaceMetadata): void {
2733
localStorage.setItem(
28-
"selectedWorkspace",
34+
SELECTED_WORKSPACE_KEY,
2935
JSON.stringify({
3036
workspaceId: workspace.id,
3137
projectPath: workspace.projectPath,
@@ -37,12 +43,17 @@ export function selectWorkspace(workspace: FrontendWorkspaceMetadata): void {
3743

3844
/** Set input text for a workspace */
3945
export function setWorkspaceInput(workspaceId: string, text: string): void {
40-
localStorage.setItem(`input:${workspaceId}`, text);
46+
localStorage.setItem(getInputKey(workspaceId), text);
4147
}
4248

4349
/** Set model for a workspace */
4450
export function setWorkspaceModel(workspaceId: string, model: string): void {
45-
localStorage.setItem(`model:${workspaceId}`, model);
51+
localStorage.setItem(getModelKey(workspaceId), model);
52+
}
53+
54+
/** Expand projects in the sidebar */
55+
export function expandProjects(projectPaths: string[]): void {
56+
localStorage.setItem(EXPANDED_PROJECTS_KEY, JSON.stringify(projectPaths));
4657
}
4758

4859
// ═══════════════════════════════════════════════════════════════════════════════

src/common/constants/storage.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ export const GLOBAL_SCOPE_ID = "__global__";
3636
*/
3737
export const UI_THEME_KEY = "uiTheme";
3838

39+
/**
40+
* Get the localStorage key for the currently selected workspace (global)
41+
* Format: "selectedWorkspace"
42+
*/
43+
export const SELECTED_WORKSPACE_KEY = "selectedWorkspace";
44+
45+
/**
46+
* Get the localStorage key for expanded projects in sidebar (global)
47+
* Format: "expandedProjects"
48+
*/
49+
export const EXPANDED_PROJECTS_KEY = "expandedProjects";
50+
3951
/**
4052
* Helper to create a thinking level storage key for a workspace
4153
* Format: "thinkingLevel:{workspaceId}"

0 commit comments

Comments
 (0)