Skip to content

migrate to cloudflare deployment - #334

Draft
SillyCoon wants to merge 8 commits into
masterfrom
migrate-to-cloudflare
Draft

migrate to cloudflare deployment#334
SillyCoon wants to merge 8 commits into
masterfrom
migrate-to-cloudflare

Conversation

@SillyCoon

@SillyCoon SillyCoon commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added Cloudflare deployment support for the web application.
    • Added Wrangler-based preview, type generation, and deployment commands.
    • Configured static asset serving and server-side rendering for Cloudflare.
  • Chores

    • Updated package manager and workspace settings for the new deployment workflow.
    • Added deployment configuration and asset exclusions.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
📝 Walkthrough

Walkthrough

The web package now targets Cloudflare Workers through the Astro Cloudflare adapter. Wrangler provides preview, type generation, deployment configuration, worker entrypoint settings, asset handling, and workspace support.

Changes

Cloudflare deployment

Layer / File(s) Summary
Cloudflare runtime adapter
packages/web/astro.config.mjs, packages/web/tsconfig.json
Astro now uses @astrojs/cloudflare, resolves the workerd condition, and includes worker-configuration.d.ts.
Wrangler build and deployment wiring
packages/web/package.json, packages/web/wrangler.jsonc, packages/web/.wrangler/deploy/config.json, packages/web/public/.assetsignore, pnpm-workspace.yaml
Wrangler now provides preview, type generation, and deployment commands. Wrangler config defines the worker entrypoint, assets, compatibility settings, and observability. Workspace settings allow required build scripts and package versions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: 🟡 Moderate · up to f5aaa

The migration can fail during clean deployments because its tracked deployment configuration references missing files, and full request logging may retain sensitive URL data. These issues should be fixed or explicitly accepted before merging.

Sequence Diagram(s)

sequenceDiagram
  participant PackageScripts
  participant Astro
  participant Wrangler
  participant WorkerAssets
  PackageScripts->>Astro: build the web package
  Astro->>Wrangler: provide the server entrypoint and dist output
  Wrangler->>WorkerAssets: serve configured static assets
  PackageScripts->>Wrangler: run preview and deployment commands
Loading

Possibly related PRs

  • SillyCoon/grumma#314: Shares pnpm migration changes in the web package and workspace configuration.

Poem

A rabbit hops through Cloudflare skies,
Wrangler guides the build as it flies.
Astro shapes the worker bright,
Assets hide from serving sight.
workerd keeps the burrow tight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: migrating the web deployment to Cloudflare.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch migrate-to-cloudflare
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch migrate-to-cloudflare

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.

@SillyCoon
SillyCoon marked this pull request as draft August 12, 2026 23:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/web/.wrangler/deploy/config.json`:
- Line 1: Remove the generated packages/web/.wrangler/deploy/config.json file
and add the .wrangler/ directory pattern to the applicable gitignore file so
Wrangler-generated artifacts are not tracked.

In `@packages/web/wrangler.jsonc`:
- Around line 11-14: Before production deployment, validate that enabling
invocation_logs in the observability configuration complies with the URL-data
privacy policy and log-retention requirements. If URLs may contain identifiers
or tokens, configure an approved sampling or privacy-control setting, or disable
invocation_logs, while preserving the intended observability behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d2d39e9c-d484-491a-8c7a-33f11112dde5

📥 Commits

Reviewing files that changed from the base of the PR and between c5702d9 and f5aaab7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • packages/web/.wrangler/deploy/config.json
  • packages/web/astro.config.mjs
  • packages/web/package.json
  • packages/web/public/.assetsignore
  • packages/web/tsconfig.json
  • packages/web/wrangler.jsonc
  • pnpm-workspace.yaml

Comment thread packages/web/.wrangler/deploy/config.json Outdated
Comment thread packages/web/wrangler.jsonc Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
web 9ae7211 Aug 24 2026, 11:50 PM

@SillyCoon
SillyCoon force-pushed the migrate-to-cloudflare branch from 136750f to 31da3f4 Compare August 23, 2026 04:28
@SillyCoon

Copy link
Copy Markdown
Owner Author

@SillyCoon
SillyCoon force-pushed the migrate-to-cloudflare branch from 52086fd to 6b6d9f3 Compare August 23, 2026 23:23
@sonarqubecloud

Copy link
Copy Markdown

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