Skip to content

Add Claude Code configuration for web/cloud sessions - #1115

Draft
fellmirr wants to merge 5 commits into
mainfrom
claude-code-web-setup
Draft

fellmirr wants to merge 5 commits into
mainfrom
claude-code-web-setup

Conversation

@fellmirr

@fellmirr fellmirr commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

Sets up the repo so Claude Code on the web can work with it out of the box:

  • CLAUDE.md — project instructions loaded at session start: commands, the custom .page.tsx routing, the main/profile layout split, Sanity/Auth0 architecture, conventions, and a Playwright-based UI verification workflow for cloud sessions (screenshot affected pages, embed them in PR descriptions).
  • .claude/settings.json — shared team settings with a SessionStart hook that runs the setup script (10 min timeout for npm install).
  • scripts/claude-code-setup.sh — runs only in the Claude cloud sandbox (guarded by $CLAUDE_CODE_REMOTE): copies .env.example to .env.local, installs dependencies, and installs @playwright/test + Chromium (--no-save, so package.json is untouched for regular development).
  • .gitignore — previously the whole .claude/ directory was ignored, so shared config never reached the cloud sandbox. Now only .claude/settings.json is tracked; personal files (settings.local.json, mcp.json) stay ignored.

.env.example contains only test-dataset IDs and public Auth0 client config, so copying it in the sandbox is safe.

Remaining manual steps (claude.ai/code UI)

  • Install the Claude GitHub App on this repo.
  • Set the cloud environment's network access to Custom (including the default allowlist) and add:
    • cdn.playwright.dev, playwright.azureedge.net, playwright.download.prss.microsoft.com — Chromium download for Playwright
    • *.sanity.io, *.apicdn.sanity.io — CMS content when running the dev server
    • dev-api.giveffektivt.dk — dev backend API

🤖 Generated with Claude Code

Adds CLAUDE.md project instructions, a shared .claude/settings.json with
a SessionStart hook, and a setup script that installs dependencies and
creates .env.local when running in the Claude Code cloud sandbox.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ge-effektivt Ready Ready Preview, Comment Jul 24, 2026 10:12pm
giv-effektivt Ready Ready Preview, Comment Jul 24, 2026 10:12pm
main-site Ready Ready Preview, Comment Jul 24, 2026 10:12pm

Request Review

Cloud setup now installs @playwright/test (--no-save) and Chromium, and
CLAUDE.md instructs cloud sessions to screenshot affected pages and embed
them in PR descriptions via raw.githubusercontent.com URLs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Verification in a fresh cloud sandbox showed npm install aborting on the
Cypress postinstall binary download (download.cypress.io is not on the
network allowlist), which left node_modules empty and prevented the
Playwright install step from running. Setting CYPRESS_INSTALL_BINARY=0
makes the install complete cleanly.

Also caps screenshot dimensions in the CLAUDE.md verification workflow
(very tall full-page captures fail to upload) and notes expected
package-lock.json churn on fresh installs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fellmirr

Copy link
Copy Markdown
Member Author

Applied fixes from a fresh-sandbox verification run: CYPRESS_INSTALL_BINARY=0 in the setup script (the Cypress binary download from download.cypress.io isn't on the allowlist and was aborting npm install, which also prevented the Playwright install step from running), viewport-sized screenshots instead of unbounded full-page captures in the CLAUDE.md workflow, and a note about incidental package-lock.json churn on fresh installs.

A verification run showed Chromium in the cloud sandbox can't load
cdn.sanity.io assets: it ignores the sandbox's HTTPS proxy by default,
doesn't trust its CA, attempts QUIC, and connections to the Sanity CDN
get reset even when the proxy is configured — while curl succeeds.

scripts/claude-pw-sandbox.js bakes in the working configuration (proxy
from env, ignoreHTTPSErrors, QUIC disabled) and fulfills GET requests to
cdn.sanity.io via curl. CLAUDE.md now points the verification workflow
at it. Smoke-tested: images load through the curl route at full size.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cypress

cypress Bot commented Jul 24, 2026

Copy link
Copy Markdown

Main site    Run #10732

Run Properties:  status check passed Passed #10732  •  git commit fdd8c8d25c: Merge branch 'main' into claude-code-web-setup
Project Main site
Run status status check passed Passed #10732
Run duration 01m 04s
Commit git commit fdd8c8d25c: Merge branch 'main' into claude-code-web-setup
Committer Håkon Harnes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 1
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant