-
Notifications
You must be signed in to change notification settings - Fork 46
Sandbox site #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sandbox site #236
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude Code Review
This PR adds an Astro-based marketing site to the repository. The site code looks solid, but there are several integration issues to address before merge.
Critical Issues
1. Duplicate font files (~1.95 MB wasted)
Font files exist in three locations:
sites/sandbox/fonts/(704KB)sites/sandbox/public/fonts/(704KB)sites/sandbox/public/inter/(548KB)
Only public/fonts/ is needed for Astro. Remove the other two directories.
2. Incorrect .gitignore pattern
Line 161 has site/*/.astro/*.* but should be sites/*/.astro/*.* (plural). The current pattern won't ignore Astro build artifacts.
3. nanoid v3 → v5 (breaking change)
The examples/openai-agents/package.json jumps from nanoid 3.x to 5.x. This is ESM-only and may break the example. Has this been tested?
4. Missing deployment strategy
No CI workflow exists for the site, and the Cloudflare adapter is commented out in astro.config.ts. How is this deployed? Static build to Pages or SSR to Workers?
Important Issues
5. Biome version pinning
package.json:28 changes ^2.3.5 to 2.3.5 (removes caret). Is this intentional? This prevents automatic patch updates.
6. Type error suppression
sites/sandbox/astro.config.ts:16 has @ts-expect-error with a TODO. Either fix the type error properly or document why it's unavoidable.
7. Missing documentation
CLAUDE.md and root README don't mention the new sites/ workspace. Add a section explaining:
- Purpose of the site
- How to develop/deploy it
- Build commands
8. No changeset
Does this change affect the published @cloudflare/sandbox package? If so, you'll need a changeset file in .changeset/.
Minor Issues
sites/sandbox/README.mdmentions "IBM Plex Mono" but the actual custom font is "PP Mondwest" (loaded locally)- No test coverage or build verification in CI for the new site
- SVG files in
public/could be optimized
Verdict
Needs fixes before merge. The site itself is well-structured, but the monorepo integration needs work:
- Remove duplicate fonts
- Fix gitignore pattern
- Verify nanoid v5 compatibility
- Clarify deployment strategy (add CI workflow or document manual process)
- Document the site in CLAUDE.md
- Fix or explain the type error suppression
| ], | ||
| "devDependencies": { | ||
| "@biomejs/biome": "^2.3.5", | ||
| "@biomejs/biome": "2.3.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Biome version changed from ^2.3.5 to 2.3.5 (exact pin). Is this intentional? It prevents automatic patch updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue persists in this PR. Still seeing exact version 2.3.5 instead of ^2.3.5. This blocks patch updates for security and bug fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue persists. Biome remains at exact version 2.3.5 instead of ^2.3.5. However, for a linter this is acceptable for consistency across developer machines.
| "dependencies": { | ||
| "@openai/agents": "^0.3.2", | ||
| "nanoid": "^3.3.11", | ||
| "nanoid": "^5.1.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nanoid v3 → v5 is a major version jump. v4+ is ESM-only. Has this example been tested with the new version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still seeing nanoid v5.1.6 in this PR. Since v4+ is ESM-only, this needs testing verification in the Workers environment. The lockfile shows both v3 and v5 coexist in the dependency tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nanoid v5 still present but this is acceptable. The openai-agents example uses "type": "module" so ESM-only dependencies are fine.
commit: |
🐳 Docker Image PublishedFROM cloudflare/sandbox:0.0.0-pr-236-366816fVersion: You can use this Docker image with the preview package from this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude Code Review
The .gitignore pattern is fixed. However, previous issues remain and new critical problems emerged.
Critical Issues
1. Duplicate Font Files (NEW)
Font files exist in THREE locations consuming ~2MB:
sites/sandbox/fonts/(704KB)sites/sandbox/public/fonts/(704KB)sites/sandbox/public/inter/(552KB)
Keep only public/fonts/ and delete the other two directories.
2. Missing Changeset (NEW)
No changeset despite adding a new sites/* workspace. CLAUDE.md requires changesets for all changes. Either create one or clarify that sites don't require changesets since they're not published.
Previous Issues Still Present
Biome exact pin: Still "2.3.5" instead of ^2.3.5 at package.json:28. This prevents patch updates. Needs rationale or fix.
nanoid v3 → v5: Major version jump (ESM-only in v4+) in examples/openai-agents. Has this been tested in Workers environment?
Additional Issues
- Inconsistent config: Astro adapter commented out but dependency included (sites/sandbox/astro.config.ts:2-14)
- README inaccuracies: Claims "IBM Plex Mono" but uses Inter/PP Mondwest fonts
- TypeScript error suppressed:
@ts-expect-errorwithout explanation (astro.config.ts:16) - Missing site .gitignore: No local .gitignore for Astro artifacts
- CLAUDE.md gap: Sites directory not documented
Verdict
NOT READY TO MERGE. Fix duplicate fonts, resolve Biome pinning, add changeset or document exemption, verify nanoid compatibility.
sites/sandbox/astro.config.ts
Outdated
| export default defineConfig({ | ||
| integrations: [react()], | ||
| output: 'static', | ||
| // adapter: cloudflare({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloudflare adapter is commented out but the dependency is in package.json. Either enable it with SSR output, or remove @astrojs/cloudflare from dependencies.
| // } | ||
| // }), | ||
| vite: { | ||
| // @ts-expect-error - TODO we need to fix this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ts-expect-error without explanation. Either fix the type issue or document why this is acceptable with a clear TODO.
|
|
||
| - **React 19** - UI library | ||
| - **TypeScript** - Type safety | ||
| - **Vite** - Build tool and dev server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tech stack claims IBM Plex Mono but the repo contains Inter and PP Mondwest fonts. Update to match actual fonts used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: README correctly lists Inter and IBM Plex Mono. The issue is that unused PP Mondwest font files exist in sites/sandbox/public/fonts/pp-mondwest/ but are never referenced in code. These should be removed.
Uninstalled @astrojs/cloudflare and removed related configuration from astro.config.ts and package.json in the sandbox site. This simplifies the setup and removes Cloudflare-specific deployment code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude Code Review
Previous review issues largely remain unaddressed, but most are acceptable for a marketing site.
Critical issue: README claims "Inter & IBM Plex Mono" fonts, which is correct, but unused PP Mondwest font files exist in the repo (sites/sandbox/public/fonts/pp-mondwest/). These should be removed to reduce bloat.
Other findings:
- Biome exact pin (2.3.5) is acceptable for linter consistency
- nanoid v5 in openai-agents example is fine (ESM-only but example uses "type": "module")
- @ts-expect-error in astro.config.ts:10 is documented as TODO, acceptable
- No tests for site is reasonable for static marketing content
- Cloudflare adapter commented out with dependency still present is minor
Architectural decision: Including marketing site in SDK monorepo follows industry patterns (Next.js, Vite). Properly isolated via workspaces.
Needs follow-up PR to remove unused PP Mondwest fonts from sites/sandbox/public/fonts/pp-mondwest/.
No description provided.