Skip to content

feat: unify Cloudflare permissions handling across onboarding and set… - #95

Merged
AnkanSaha merged 1 commit into
mainfrom
maintainer/ankan
Jul 27, 2026
Merged

feat: unify Cloudflare permissions handling across onboarding and set…#95
AnkanSaha merged 1 commit into
mainfrom
maintainer/ankan

Conversation

@AnkanSaha

Copy link
Copy Markdown
Member

This pull request updates Cloudflare API token permission handling and documentation to ensure consistency, improve user guidance, and remove outdated requirements. It centralizes the list of required permissions, updates both the onboarding and settings UI to use this shared list, and clarifies the handling of optional permissions in both code and documentation. It also removes the unnecessary Workers KV Storage permission check from the backend and tests, and improves robustness around missing permissions for listing Worker Routes.

Cloudflare Permission Handling and Documentation

  • Centralized the list of required Cloudflare API token permissions in a new shared constant CLOUDFLARE_PERMISSIONS in client/src/lib/cloudflarePermissions.ts, ensuring onboarding and settings always display the same requirements. Added a helper permissionSummary() for concise inline hints.
  • Updated onboarding (client/src/app/onboarding/page.tsx) and settings (client/src/app/settings/page.tsx) pages to use the shared permissions list and summary, eliminating hardcoded and inconsistent permission lists in the UI. [1] [2] [3] [4]
  • Revised documentation in AGENTS.md and CLAUDE.md to reflect the current required and optional permissions, removing mention of Workers KV Storage and clarifying the role of each permission. [1] [2]

Backend Logic and Testing Updates

  • Removed the check for Workers KV Storage permission from the backend (server/src/services/cloudflareClient.ts and server/src/services/credentialsService.ts), since it is no longer needed. Updated integration test mocks accordingly. [1] [2] [3] [4]
  • Improved assertHostnameAvailable logic to treat 403/404 errors when listing Worker Routes as non-fatal, logging a warning and allowing deploys to proceed, while still failing on genuine Cloudflare outages. Added unit tests for these scenarios. [1] [2]

Other

  • Bumped server package version to 2.3.2 in server/package.json and server/package-lock.json. [1] [2]

@AnkanSaha AnkanSaha self-assigned this Jul 27, 2026
@AnkanSaha
AnkanSaha merged commit 8146d38 into main Jul 27, 2026
4 checks passed
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