Skip to content

Commit bb09d92

Browse files
committed
fix: add optional chaining to prevent runtime errors in blueprint rendering
1 parent a25e72f commit bb09d92

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/routes/chat/components/blueprint.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ export function Blueprint({
8989
</div>
9090

9191
{/* Views */}
92-
{phasicBlueprint && phasicBlueprint.views.length > 0 && (
92+
{phasicBlueprint && phasicBlueprint.views?.length > 0 && (
9393
<div>
9494
<h3 className="text-sm font-medium mb-3 text-text-50/70 uppercase tracking-wider">
9595
Views
9696
</h3>
9797
<div className="space-y-3">
98-
{phasicBlueprint.views.map((view, index) => (
98+
{phasicBlueprint.views?.map((view, index) => (
9999
<div key={`view-${index}`} className="space-y-1">
100100
<h4 className="text-xs font-medium text-text-50/70">
101101
{view.name}
@@ -165,13 +165,13 @@ export function Blueprint({
165165
)}
166166

167167
{/* Implementation Roadmap */}
168-
{phasicBlueprint && phasicBlueprint.implementationRoadmap.length > 0 && (
168+
{phasicBlueprint && phasicBlueprint.implementationRoadmap?.length > 0 && (
169169
<div>
170170
<h3 className="text-sm font-medium mb-2 text-text-50/70 uppercase tracking-wider">
171171
Implementation Roadmap
172172
</h3>
173173
<div className="space-y-3">
174-
{phasicBlueprint.implementationRoadmap.map((roadmapItem, index) => (
174+
{phasicBlueprint.implementationRoadmap?.map((roadmapItem, index) => (
175175
<div key={`roadmap-${index}`} className="space-y-1">
176176
<h4 className="text-xs font-medium text-text-50/70">
177177
Phase {index + 1}: {roadmapItem.phase}
@@ -220,14 +220,14 @@ export function Blueprint({
220220
)}
221221

222222
{/* Pitfalls */}
223-
{phasicBlueprint && phasicBlueprint.pitfalls.length > 0 && (
223+
{phasicBlueprint && phasicBlueprint.pitfalls?.length > 0 && (
224224
<div>
225225
<h3 className="text-sm font-medium mb-2 text-text-50/70 uppercase tracking-wider">
226226
Pitfalls
227227
</h3>
228228
<div className="prose prose-sm prose-invert">
229229
<ul className="">
230-
{phasicBlueprint.pitfalls.map((pitfall, index) => (
230+
{phasicBlueprint.pitfalls?.map((pitfall, index) => (
231231
<li key={`pitfall-${index}`} className="">
232232
{pitfall}
233233
</li>

worker/agents/assistants/agenticProjectBuilder.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Build a complete, functional, polished project from the user's requirements usin
5252
- **Testing**: Sandbox/Container preview with live reload
5353
5454
## Platform Constraints
55-
- **NEVER edit wrangler.jsonc or package.json** - these are locked
5655
- **Only use dependencies from project's package.json** - no others exist
5756
- All projects run in Cloudflare Workers environment
5857
- **No Node.js APIs** (no fs, path, process, etc.)

0 commit comments

Comments
 (0)