Skip to content

Set up Cursor Cloud dev environment for agent-render - #83

Merged
baanish merged 1 commit into
mainfrom
cursor/setup-dev-environment-3f44
Jun 23, 2026
Merged

baanish merged 1 commit into
mainfrom
cursor/setup-dev-environment-3f44

Conversation

@baanish

@baanish baanish commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Sets up and verifies the development environment for agent-render (a static, fragment-based artifact viewer built on Next.js). The only code change is a new ## Cursor Cloud specific instructions section in AGENTS.md capturing non-obvious startup caveats for future cloud agents.

The startup update script (dependency refresh) is configured separately as:

npm install
npx playwright install chromium

Validation

All standard checks pass against the current setup:

  • npm run lint — eslint + public export docs check
  • npm run typechecktsc --noEmit
  • npm run test — 240 Vitest tests pass
  • npm run build — Next.js static export succeeds
  • npm run dev — dev server serves on port 3000
  • CI=1 npm run test:e2e — 28 Playwright browser tests pass (visual snapshots skipped to avoid platform rendering diffs)

Hello-world demo

Created a Markdown artifact via the in-browser "Create a link" form, generated a fragment link, and confirmed it renders in the viewer (heading, bold, list, code block).

agent_render_link_creator_demo.mp4

Link creator form filled
Rendered Hello World markdown artifact

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Documentation
    • Updated developer guidance documentation with environment-specific instructions for cloud-based agent setups, including configuration best practices and dependency clarifications.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 81138b42-b273-4701-9c40-9e4e4298e91a

📥 Commits

Reviewing files that changed from the base of the PR and between acb08e0 and 84978a7.

📒 Files selected for processing (1)
  • AGENTS.md

📝 Walkthrough

Walkthrough

A new "Cursor Cloud specific instructions" section is appended to AGENTS.md, documenting how cloud agents should run the Playwright/e2e suite (no manual dev server needed), when to set CI=1 to bypass visual snapshot failures, the frontend-only hello-world flow, and that better-sqlite3 is only required for the self-hosted UUID server variant.

Changes

Cursor Cloud Documentation

Layer / File(s) Summary
Cursor Cloud section in AGENTS.md
AGENTS.md
Adds nine lines describing cloud-agent environment assumptions: automatic dev server handling for npm run test:e2e, CI=1 flag to skip visual snapshot failures on cloud VMs, the frontend-only URL-fragment rendering flow, and the optional nature of better-sqlite3 for the self-hosted UUID server variant.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A cloud has arrived with its note,
"No dev server needed," it wrote.
Set CI to one,
And the snapshots won't run —
Just fragments and SQLite remote!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/setup-dev-environment-3f44

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agent-render with  Cloudflare Pages  Cloudflare Pages

Latest commit: 84978a7
Status: ✅  Deploy successful!
Preview URL: https://33f77cda.agent-render.pages.dev
Branch Preview URL: https://cursor-setup-dev-environment.agent-render.pages.dev

View logs

@baanish
baanish marked this pull request as ready for review June 23, 2026 08:14
@baanish
baanish merged commit 4a5a6c4 into main Jun 23, 2026
10 checks passed
@kilo-code-bot

kilo-code-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • AGENTS.md

This PR is documentation-only, adding a ## Cursor Cloud specific instructions section to AGENTS.md. No code, config, or protocol changes are introduced. The added notes are accurate and consistent with the project's documented dev environment (port 3000 dev server, separate Playwright build/preview on 4401 with NEXT_PUBLIC_BASE_PATH=/agent-render, CI=1 to skip visual snapshots, better-sqlite3 only for the self-hosted UUID variant). Safe to merge.


Reviewed by glm-5.2-short · Input: 15.8K · Output: 864 · Cached: 89.2K

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a ## Cursor Cloud specific instructions section to AGENTS.md with operational notes for cloud agents, covering the Playwright port/build setup, CI=1 visual-snapshot skip, the frontend-only architecture, and the optional better-sqlite3 native module. The single changed file is purely documentation.

  • The Playwright port (4401), the CI=1 visual-snapshot suppression behaviour, and the tests/e2e/visual.spec.ts path were all verified against playwright.config.ts and are accurate.
  • The webServer command description slightly simplifies the actual invocation (the real command also sets NEXT_PUBLIC_BASE_PATH on the npm run preview step, not only on npm run build), but the simplified form is sufficient to convey the intent to a cloud agent.

Confidence Score: 5/5

Documentation-only change with no runtime code modified; safe to merge.

The only change is four bullet points in AGENTS.md. All factual claims — the Playwright port, the CI=1 skip behaviour, the visual spec path, and the optional nature of better-sqlite3 — were verified against the actual config and source files and are accurate. There is nothing here that can affect runtime behaviour.

No files require special attention.

Important Files Changed

Filename Overview
AGENTS.md Adds a "Cursor Cloud specific instructions" section documenting non-obvious dev-environment caveats; all factual claims (port, CI skip, visual spec path) were verified against playwright.config.ts and are correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Cloud Agent starts] --> B{Startup script ran?}
    B -- Yes --> C[npm install done\nChromium installed]
    C --> D[npm run dev\nport 3000 - shell preview]
    C --> E[npm run test:e2e]
    E --> F{CI=1 set?}
    F -- Yes --> G[Build + preview on port 4401\nSkip visual.spec.ts\nRun behavioral tests only]
    F -- No --> H[Build + preview on port 4401\nRun ALL tests incl. visual snapshots\nMay fail on cloud VMs]
    D --> I[Open localhost:3000\nFill Create-a-link form\nClick Generate link\nClick Preview here]
    I --> J[Artifact rendered from URL fragment]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Cloud Agent starts] --> B{Startup script ran?}
    B -- Yes --> C[npm install done\nChromium installed]
    C --> D[npm run dev\nport 3000 - shell preview]
    C --> E[npm run test:e2e]
    E --> F{CI=1 set?}
    F -- Yes --> G[Build + preview on port 4401\nSkip visual.spec.ts\nRun behavioral tests only]
    F -- No --> H[Build + preview on port 4401\nRun ALL tests incl. visual snapshots\nMay fail on cloud VMs]
    D --> I[Open localhost:3000\nFill Create-a-link form\nClick Generate link\nClick Preview here]
    I --> J[Artifact rendered from URL fragment]
Loading

Reviews (1): Last reviewed commit: "docs: add Cursor Cloud specific instruct..." | Re-trigger Greptile

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.

2 participants