feat: unify Cloudflare permissions handling across onboarding and set… - #95
Merged
Conversation
…tings, remove unused KV permission checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
CLOUDFLARE_PERMISSIONSinclient/src/lib/cloudflarePermissions.ts, ensuring onboarding and settings always display the same requirements. Added a helperpermissionSummary()for concise inline hints.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]AGENTS.mdandCLAUDE.mdto 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
server/src/services/cloudflareClient.tsandserver/src/services/credentialsService.ts), since it is no longer needed. Updated integration test mocks accordingly. [1] [2] [3] [4]assertHostnameAvailablelogic 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
2.3.2inserver/package.jsonandserver/package-lock.json. [1] [2]