fix: unpublished project's env is not editable#9665
Conversation
|
@codex: review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af44520eec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export function isManaged(path: string): boolean { | ||
| if (isCloudRuntimeEditEnvironment()) { | ||
| return CLOUD_READONLY.some((m) => m(path)); | ||
| return CLOUD_READONLY.some((m) => m(path)) && !!cloudReadonlyNotice; |
There was a problem hiding this comment.
Fail closed when the primary deployment lookup is inconclusive
When the edit layout's new unscoped GetProject request completes without data (for example, a transient error while the branch-scoped project query still succeeds), it calls setCloudReadonlyNotice(undefined). Since this predicate now treats a missing notice as "not managed", a published project's .env files become editable and the rename/create guards stop blocking env paths instead of preserving the previous read-only behavior until the deployment state is known.
Useful? React with 👍 / 👎.
…ed-project-editable-env
|
merged test fixes from main, hopefully CI will pass now |
We linked published project's env editor to project's env management page. But for unpublished projects settings page is unavailable. This is a temporary fix to allow editing env for this case. The long term goal will have to be to add a thin project page for unpublished project.
Checklist: