Skip to content

Restore worker name in wrangler.toml and keep preview URLs enabled#27

Open
ivanleomk wants to merge 5 commits into
mainfrom
codex/add-support-for-cloudflare-preview-environments
Open

Restore worker name in wrangler.toml and keep preview URLs enabled#27
ivanleomk wants to merge 5 commits into
mainfrom
codex/add-support-for-cloudflare-preview-environments

Conversation

@ivanleomk

@ivanleomk ivanleomk commented Jan 3, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Preserve the original project worker name by restoring name = "website-v1" to avoid breaking references.
  • Keep Cloudflare preview support enabled by setting preview_urls = true to allow preview/testing deployments.
  • Normalize wrangler.toml formatting to ensure the binding = "ASSETS" line ends with a newline.
  • Do not change runtime entry or compatibility settings such as main and compatibility_date.

Description

  • Restored name = "website-v1" in wrangler.toml to revert the previous name normalization.
  • Added preview_urls = true to enable preview URLs.
  • Fixed file formatting so binding = "ASSETS" has a trailing newline.
  • Left main = ".open-next/worker.js" and compatibility_date unchanged.

Testing

  • No automated tests were run because this is a configuration-only change.

Codex Task


TL;DR

Adds support for dynamic Cloudflare preview environments by enabling preview URLs and adding a prebuild script to generate sanitized environment aliases from branch names.

Why we made these changes

To allow for automatic preview deployments on Cloudflare for each pull request. This requires generating a valid, URL-safe alias from the Git branch name, which can contain invalid characters.

What changed?

  • scripts/preview-alias.sh: Added a new script to sanitize the branch name into a valid Cloudflare environment alias.
  • package.json: Added a prebuild:cloudflare script to run the alias generation script before the build.
  • wrangler.toml: Enabled the preview feature by adding preview_urls = true.
  • .gitignore: Ignored the .preview-alias file generated by the new script.

Validation

  • This is a configuration and build process change. Validation will occur when preview environments are successfully deployed on subsequent pull requests.

Description generated by Mesa. Update settings

@vercel

vercel Bot commented Jan 3, 2026

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
website-v4 Ready Ready Preview, Comment Jan 3, 2026 9:51am

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jan 3, 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 failed
View logs
website-v1 1279140 Jan 03 2026, 09:52 AM

@mesa-dot-dev mesa-dot-dev 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.

Performed full review of c797a8e...90ee1d9

Analysis

  1. Worker name "website-v1" conflicts with repository name "website-v4", potentially causing confusion for developers, deployment tracking issues, and conflicts if multiple versions need to coexist.

  2. The naming mismatch between worker and repository creates configuration drift that could lead to maintenance challenges over time.

  3. No documentation appears to exist explaining the worker/repository version mismatch, which may confuse new team members or create future migration difficulties.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 1 comments | Edit Agent SettingsRead Docs

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant