Skip to content

Commit 60b98e0

Browse files
authored
Merge pull request #243 from cloudflare/revert-241-nightly
Revert "Nightly -> Main release"
2 parents 35486af + 2e82a97 commit 60b98e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1414
-2100
lines changed

.github/workflows/claude-issue-triage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
166166
### STAGE 3: Solution Proposal (CONDITIONAL)${{ steps.analyze.outputs.severity == 'high' && '\n\n**⚠️ REQUIRED** - Critical issue, must propose fix' || '\n\n**OPTIONAL** - Propose fix if solution is clear and straightforward' }}
167167
168-
${{ steps.analyze.outputs.severity == 'high' && '**You MUST propose a fix for this critical issue:**' || '**Propose a fix only if:**\n- Root cause is clear\n- Fix is straightforward (< 50 lines changed)\n- You''re confident it won''t introduce regressions' }}
168+
${{ steps.analyze.outputs.severity == 'high' && '**You MUST propose a fix for this critical issue:**' || '**Propose a fix only if:**\n- Root cause is clear\n- Fix is straightforward (< 50 lines changed)\n- You\'re confident it won\'t introduce regressions' }}
169169
170170
#### 3.1 Design the Fix
171171
@@ -249,7 +249,7 @@ jobs:
249249
250250
**Comment Structure** (adapt based on investigation depth):
251251
252-
${{ steps.analyze.outputs.should_investigate == 'true' && '**For investigated issues:**\n\n```markdown\n## Investigation Results\n\nThanks for reporting this, @${{ github.event.issue.user.login }}! I''ve performed a thorough analysis.\n\n### Classification\n- **Type:** [bug/feature/etc]\n- **Severity:** [P0-critical/P1-high/etc]\n- **Component:** [worker/ui/etc]\n\n### Root Cause Analysis\n[Detailed explanation of what''s causing the issue]\n\n**Location:** `path/to/file.ts:123`\n\n**Introduced in:** PR #XXX (if found) or Commit ABC123\n\n### Proposed Solution\n[Explain the fix approach]\n\n### Status\n- ✅ PR #XXX created with proposed fix (if applicable)\n- ⏳ Requires manual review and testing\n- 📋 Added to backlog for team review (if no PR)\n\n### Next Steps\n[What happens next - PR review, team discussion, etc.]\n```' || '**For standard triage:**\n\n```markdown\nThanks for reporting this, @${{ github.event.issue.user.login }}!\n\n### Classification\n- **Labels:** [list applied labels]\n- **Priority:** [explanation of priority]\n\n[Context-specific response based on issue type]\n\n### Next Steps\nThe team will review this and provide updates.\n```' }}
252+
${{ steps.analyze.outputs.should_investigate == 'true' && '**For investigated issues:**\n\n```markdown\n## Investigation Results\n\nThanks for reporting this, @${{ github.event.issue.user.login }}! I\'ve performed a thorough analysis.\n\n### Classification\n- **Type:** [bug/feature/etc]\n- **Severity:** [P0-critical/P1-high/etc]\n- **Component:** [worker/ui/etc]\n\n### Root Cause Analysis\n[Detailed explanation of what\'s causing the issue]\n\n**Location:** `path/to/file.ts:123`\n\n**Introduced in:** PR #XXX (if found) or Commit ABC123\n\n### Proposed Solution\n[Explain the fix approach]\n\n### Status\n- ✅ PR #XXX created with proposed fix (if applicable)\n- ⏳ Requires manual review and testing\n- 📋 Added to backlog for team review (if no PR)\n\n### Next Steps\n[What happens next - PR review, team discussion, etc.]\n```' || '**For standard triage:**\n\n```markdown\nThanks for reporting this, @${{ github.event.issue.user.login }}!\n\n### Classification\n- **Labels:** [list applied labels]\n- **Priority:** [explanation of priority]\n\n[Context-specific response based on issue type]\n\n### Next Steps\nThe team will review this and provide updates.\n```' }}
253253
254254
---
255255

.github/workflows/claude-reviews.yml

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,32 @@ jobs:
4545
env:
4646
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747

48+
- name: Minimize Old Review Comments
49+
run: |
50+
echo "Collapsing previous review comments from github-actions[bot]..."
51+
52+
# Get all comments from github-actions[bot] on this PR
53+
OLD_REVIEWS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
54+
--jq '[.[] | select(.user.login == "github-actions[bot]") | select(.body | contains("## Code Review") or contains("🔒 **CRITICAL PATH SECURITY REVIEW**") or contains("## 🔍 Code Quality & Security Review")) | .id]')
55+
56+
if [ -n "$OLD_REVIEWS" ] && [ "$OLD_REVIEWS" != "[]" ]; then
57+
echo "Found old review comments to collapse"
58+
echo "$OLD_REVIEWS" | jq -r '.[]' | while read comment_id; do
59+
echo "Collapsing comment $comment_id"
60+
gh api repos/${{ github.repository }}/issues/comments/$comment_id -X PATCH \
61+
-f body="<details><summary>🔒 Previous review (outdated)</summary>
62+
63+
This review has been superseded by a newer review.
64+
</details>" || echo "Failed to collapse comment $comment_id"
65+
done
66+
echo "✓ Old comments collapsed"
67+
else
68+
echo "No old review comments found"
69+
fi
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
continue-on-error: true
73+
4874
- name: Run Comprehensive Review
4975
uses: anthropics/claude-code-action@v1
5076
with:
@@ -111,8 +137,16 @@ jobs:
111137
[Overall assessment with approval/disapproval reasoning]
112138
```
113139
114-
5. Post review (MANDATORY FINAL STEP)
140+
5. Post review (MANDATORY FINAL STEP - use single efficient command)
115141
```bash
142+
# Post new review (collapse old ones first if any exist)
143+
OLD_IDS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments --jq '[.[] | select(.user.login == "github-actions[bot]") | select(.body | startswith("## Code & Security Review")) | .id] | @csv' | tr -d '"')
144+
if [ -n "$OLD_IDS" ]; then
145+
for id in ${OLD_IDS//,/ }; do
146+
gh api -X PATCH repos/${{ github.repository }}/issues/comments/$id -f body="<details><summary>Outdated</summary></details>" &
147+
done
148+
wait
149+
fi
116150
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "YOUR_REVIEW_HERE"
117151
```
118152
@@ -146,42 +180,3 @@ jobs:
146180
--allowed-tools "mcp__github_inline_comment__create_inline_comment,Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh search:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr edit:*),Bash(gh api:*)"
147181
--max-turns ${{ steps.critical_paths.outputs.is_critical == 'true' && '90' || '65' }}
148182
--model claude-sonnet-4-5-20250929
149-
150-
- name: Intelligent Comment Cleanup
151-
uses: anthropics/claude-code-action@v1
152-
if: always()
153-
with:
154-
github_token: ${{ secrets.GITHUB_TOKEN }}
155-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
156-
prompt: |
157-
Clean up stale bot comments on PR #${{ github.event.pull_request.number }}.
158-
159-
**Task:**
160-
1. Fetch all comments on this PR
161-
2. Identify bot comments (users ending in [bot]) that are stale/outdated:
162-
- Old reviews superseded by newer ones
163-
- Old PR description suggestions
164-
- Previously collapsed/outdated markers
165-
- Progress/status comments from previous workflow runs
166-
3. Keep only the most recent comment per category per bot
167-
4. DELETE all stale comments (do not collapse)
168-
169-
**Get all comments:**
170-
```bash
171-
gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments --jq '.[] | {id, user: .user.login, body, created_at}'
172-
```
173-
174-
**Delete a comment:**
175-
```bash
176-
gh api repos/${{ github.repository }}/issues/comments/COMMENT_ID -X DELETE
177-
```
178-
179-
Be intelligent:
180-
- Preserve the newest useful comment in each category
181-
- Delete everything else that's redundant or stale
182-
- If unsure, keep the comment (conservative approach)
183-
184-
claude_args: |
185-
--allowed-tools "Bash(gh api repos/*/issues/*/comments:*),Bash(gh api repos/*/issues/comments/*:*)"
186-
--max-turns 8
187-
--model claude-haiku-4-5-20251001

src/components/monaco-editor/monaco-editor.tsx

Lines changed: 38 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ self.MonacoEnvironment = {
3636
};
3737

3838
// From GitHub Dark theme
39-
monaco.editor.defineTheme('vibesdk-dark', {
39+
monaco.editor.defineTheme('v1-dev-dark', {
4040
base: 'vs-dark',
4141
inherit: true,
4242
rules: [
@@ -77,7 +77,7 @@ monaco.editor.defineTheme('vibesdk-dark', {
7777
},
7878
});
7979

80-
monaco.editor.defineTheme('vibesdk', {
80+
monaco.editor.defineTheme('v1-dev', {
8181
base: 'vs',
8282
inherit: true,
8383
rules: [
@@ -116,13 +116,43 @@ monaco.editor.defineTheme('vibesdk', {
116116
},
117117
});
118118

119-
monaco.editor.setTheme('vibesdk');
119+
monaco.editor.setTheme('v1-dev');
120+
121+
monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
122+
noSemanticValidation: true,
123+
noSyntaxValidation: true,
124+
});
125+
126+
// Configure TypeScript defaults for JSX support
127+
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
128+
jsx: monaco.languages.typescript.JsxEmit.React,
129+
allowJs: true,
130+
allowSyntheticDefaultImports: true,
131+
esModuleInterop: true,
132+
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
133+
module: monaco.languages.typescript.ModuleKind.ESNext,
134+
target: monaco.languages.typescript.ScriptTarget.ESNext,
135+
jsxFactory: 'React.createElement',
136+
jsxFragmentFactory: 'React.Fragment',
137+
});
138+
139+
// Configure JavaScript defaults for JSX support
140+
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
141+
allowJs: true,
142+
allowSyntheticDefaultImports: true,
143+
esModuleInterop: true,
144+
jsx: monaco.languages.typescript.JsxEmit.React,
145+
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
146+
module: monaco.languages.typescript.ModuleKind.ESNext,
147+
target: monaco.languages.typescript.ScriptTarget.ESNext,
148+
jsxFactory: 'React.createElement',
149+
jsxFragmentFactory: 'React.Fragment',
150+
});
120151

121152
export type MonacoEditorProps = React.ComponentProps<'div'> & {
122153
createOptions?: monaco.editor.IStandaloneEditorConstructionOptions;
123154
find?: string;
124155
replace?: string;
125-
enableTypeScriptFeatures?: 'auto' | boolean;
126156
};
127157

128158
/**
@@ -133,7 +163,6 @@ export const MonacoEditor = memo<MonacoEditorProps>(function MonacoEditor({
133163
createOptions = {},
134164
find,
135165
replace,
136-
enableTypeScriptFeatures = 'auto',
137166
...props
138167
}) {
139168
const containerRef = useRef<HTMLDivElement>(null);
@@ -142,63 +171,6 @@ export const MonacoEditor = memo<MonacoEditorProps>(function MonacoEditor({
142171
const stickyScroll = useRef(true);
143172
const { theme } = useTheme();
144173

145-
const shouldEnableTypeScript = React.useMemo(() => {
146-
if (enableTypeScriptFeatures === 'auto') {
147-
return !createOptions.readOnly;
148-
}
149-
return enableTypeScriptFeatures;
150-
}, [enableTypeScriptFeatures, createOptions.readOnly]);
151-
152-
// Configure TypeScript diagnostics based on mode
153-
useEffect(() => {
154-
const tsDefaults = monaco.languages.typescript.typescriptDefaults;
155-
const jsDefaults = monaco.languages.typescript.javascriptDefaults;
156-
157-
if (shouldEnableTypeScript) {
158-
// Enable full IntelliSense for editing
159-
tsDefaults.setDiagnosticsOptions({
160-
noSemanticValidation: false,
161-
noSyntaxValidation: false,
162-
});
163-
tsDefaults.setCompilerOptions({
164-
jsx: monaco.languages.typescript.JsxEmit.React,
165-
allowJs: true,
166-
allowSyntheticDefaultImports: true,
167-
esModuleInterop: true,
168-
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
169-
module: monaco.languages.typescript.ModuleKind.ESNext,
170-
target: monaco.languages.typescript.ScriptTarget.ESNext,
171-
jsxFactory: 'React.createElement',
172-
jsxFragmentFactory: 'React.Fragment',
173-
});
174-
jsDefaults.setCompilerOptions({
175-
allowJs: true,
176-
allowSyntheticDefaultImports: true,
177-
esModuleInterop: true,
178-
jsx: monaco.languages.typescript.JsxEmit.React,
179-
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
180-
module: monaco.languages.typescript.ModuleKind.ESNext,
181-
target: monaco.languages.typescript.ScriptTarget.ESNext,
182-
jsxFactory: 'React.createElement',
183-
jsxFragmentFactory: 'React.Fragment',
184-
});
185-
} else {
186-
// Disable expensive features for viewing
187-
tsDefaults.setDiagnosticsOptions({
188-
noSemanticValidation: true,
189-
noSyntaxValidation: true,
190-
});
191-
tsDefaults.setCompilerOptions({
192-
jsx: monaco.languages.typescript.JsxEmit.React,
193-
target: monaco.languages.typescript.ScriptTarget.ESNext,
194-
});
195-
jsDefaults.setCompilerOptions({
196-
jsx: monaco.languages.typescript.JsxEmit.React,
197-
target: monaco.languages.typescript.ScriptTarget.ESNext,
198-
});
199-
}
200-
}, [shouldEnableTypeScript]);
201-
202174

203175
useEffect(() => {
204176
let configuredTheme = theme;
@@ -208,7 +180,7 @@ export const MonacoEditor = memo<MonacoEditorProps>(function MonacoEditor({
208180
editor.current = monaco.editor.create(containerRef.current!, {
209181
language: createOptions.language || 'typescript',
210182
minimap: { enabled: false },
211-
theme: configuredTheme === 'dark' ? 'vibesdk-dark' : 'vibesdk',
183+
theme: configuredTheme === 'dark' ? 'v1-dev-dark' : 'v1-dev',
212184
automaticLayout: true,
213185
value: defaultCode,
214186
fontSize: 13,
@@ -235,10 +207,6 @@ export const MonacoEditor = memo<MonacoEditorProps>(function MonacoEditor({
235207
}
236208

237209
return () => {
238-
const model = editor.current?.getModel();
239-
if (model) {
240-
model.dispose();
241-
}
242210
editor.current?.dispose();
243211
};
244212
// eslint-disable-next-line react-hooks/exhaustive-deps
@@ -249,16 +217,10 @@ export const MonacoEditor = memo<MonacoEditorProps>(function MonacoEditor({
249217
const model = editor.current.getModel();
250218
if (!model) return;
251219

252-
model.pushEditOperations(
253-
[],
254-
[{
255-
range: model.getFullModelRange(),
256-
text: createOptions.value || ''
257-
}],
258-
() => null
259-
);
220+
editor.current.setValue(createOptions.value || '');
260221

261222
if (stickyScroll.current) {
223+
// Scroll to bottom
262224
const lineCount = model.getLineCount();
263225
editor.current.revealLine(lineCount);
264226
}
@@ -331,7 +293,7 @@ export const MonacoEditor = memo<MonacoEditorProps>(function MonacoEditor({
331293
// Update theme when app theme changes
332294
useEffect(() => {
333295
if (editor.current) {
334-
monaco.editor.setTheme(theme === 'dark' ? 'vibesdk-dark' : 'vibesdk');
296+
monaco.editor.setTheme(theme === 'dark' ? 'v1-dev-dark' : 'v1-dev');
335297
}
336298
}, [theme]);
337299

src/routes/app/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ export default function AppView() {
10001000
'on',
10011001
scrollBeyondLastLine: false,
10021002
fontSize: 13,
1003-
theme: 'vibesdk',
1003+
theme: 'v1-dev',
10041004
automaticLayout: true,
10051005
}}
10061006
/>

src/routes/chat/chat.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,28 @@ export default function Chat() {
413413
setView('editor');
414414
}
415415
}, [isGeneratingBlueprint, view]);
416-
416+
417+
useEffect(() => {
418+
// Only show bootstrap completion message for NEW chats, not when reloading existing ones
419+
if (doneStreaming && !isGeneratingBlueprint && !blueprint && urlChatId === 'new') {
420+
onCompleteBootstrap();
421+
sendAiMessage(
422+
createAIMessage(
423+
'creating-blueprint',
424+
'Bootstrapping complete, now creating a blueprint for you...',
425+
true,
426+
),
427+
);
428+
}
429+
}, [
430+
doneStreaming,
431+
isGeneratingBlueprint,
432+
sendAiMessage,
433+
blueprint,
434+
onCompleteBootstrap,
435+
urlChatId,
436+
]);
437+
417438
const isRunning = useMemo(() => {
418439
return (
419440
isBootstrapping || isGeneratingBlueprint // || codeGenState === 'active'
@@ -1162,7 +1183,7 @@ export default function Chat() {
11621183
lineNumbers: 'on',
11631184
scrollBeyondLastLine: false,
11641185
fontSize: 13,
1165-
theme: 'vibesdk',
1186+
theme: 'v1-dev',
11661187
automaticLayout: true,
11671188
}}
11681189
find={

src/routes/chat/hooks/use-chat.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ export function useChat({
294294
// Request file generation for new chats only
295295
if (!disableGenerate && urlChatId === 'new') {
296296
logger.debug('🔄 Starting code generation for new chat');
297-
setIsGenerating(true);
298297
sendWebSocketMessage(ws, 'generate_all');
299298
}
300299
});

0 commit comments

Comments
 (0)