Skip to content

Commit ad66469

Browse files
committed
🤖 Add closed PR detection to wait_pr_checks.sh
Script now fails early if PR is closed (not merged), preventing infinite waiting on closed PRs.
1 parent 69885a4 commit ad66469

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

scripts/wait_pr_checks.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ while true; do
3030
exit 0
3131
fi
3232

33+
# Check if PR is closed without merging
34+
if [ "$PR_STATE" = "CLOSED" ]; then
35+
echo "❌ PR #$PR_NUMBER is closed (not merged)!"
36+
exit 1
37+
fi
38+
3339
MERGEABLE=$(echo "$STATUS" | jq -r '.mergeable')
3440
MERGE_STATE=$(echo "$STATUS" | jq -r '.mergeStateStatus')
3541

src/components/AIView.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,7 @@ const AIViewInner: React.FC<AIViewProps> = ({
320320
}
321321

322322
return (
323-
<ChatProvider
324-
messages={messages}
325-
cmuxMessages={cmuxMessages}
326-
model={currentModel}
327-
>
323+
<ChatProvider messages={messages} cmuxMessages={cmuxMessages} model={currentModel}>
328324
<ViewContainer className={className}>
329325
<ChatArea>
330326
<ViewHeader>

src/components/ChatInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ export const ChatInput: React.FC<ChatInputProps> = ({
763763
</EditingIndicator>
764764
)}
765765
<ModeTogglesRow>
766-
<ChatToggles workspaceId={workspaceId} modelString={preferredModel}>
766+
<ChatToggles modelString={preferredModel}>
767767
<ModelDisplayWrapper>
768768
<ModelSelector
769769
ref={modelSelectorRef}

src/components/ChatToggles.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ export const TogglesContainer = styled.div`
1010
`;
1111

1212
interface ChatTogglesProps {
13-
workspaceId: string;
1413
modelString: string;
1514
children: React.ReactNode;
1615
}
1716

18-
export const ChatToggles: React.FC<ChatTogglesProps> = ({ workspaceId, modelString, children }) => {
17+
export const ChatToggles: React.FC<ChatTogglesProps> = ({ modelString, children }) => {
1918
return (
2019
<TogglesContainer>
2120
{children}
2221
<ThinkingSliderComponent />
23-
<Context1MCheckbox workspaceId={workspaceId} modelString={modelString} />
22+
<Context1MCheckbox modelString={modelString} />
2423
</TogglesContainer>
2524
);
2625
};

src/components/Context1MCheckbox.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,10 @@ const Checkbox = styled.input`
5959
`;
6060

6161
interface Context1MCheckboxProps {
62-
workspaceId: string;
6362
modelString: string;
6463
}
6564

66-
export const Context1MCheckbox: React.FC<Context1MCheckboxProps> = ({
67-
workspaceId,
68-
modelString,
69-
}) => {
65+
export const Context1MCheckbox: React.FC<Context1MCheckboxProps> = ({ modelString }) => {
7066
const [use1M, setUse1M] = use1MContext();
7167
const isSupported = supports1MContext(modelString);
7268

src/hooks/use1MContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ import { usePersistedState } from "@/hooks/usePersistedState";
99
export function use1MContext(): [boolean, (value: boolean) => void] {
1010
return usePersistedState<boolean>("use1MContext", false);
1111
}
12-

0 commit comments

Comments
 (0)