Repository navigation
Conversation
…s allowedResources follows capabilities (#397) Every resource form passed a commitAccess that dropped the access save result, so when the sharing PATCH was refused the page still said "saved" and navigated away, losing the pending access edit. commitAccess now resolves to the access result, and every create and edit page routes the outcome through resourceSaveOutcome: edit pages stay on the form with a "saved, but access could not be updated" warning; create pages go to the new resource's edit page (creating again would duplicate it). The connection form derived a Kubernetes connection's allowedResources only when the stored list was empty, so the list derived on the first save was frozen as if it were an override. It is now derived again on every save unless the stored list differs from what the loaded capabilities derive (a deliberate Advanced override), and the form shows the list that will be saved. The helpers move to lib/kubernetes-resources.ts so node --test can load them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #397.
Summary
Every resource form passed a commitAccess that dropped the access save
result, so when the sharing PATCH was refused the page still said "saved"
and navigated away, losing the pending access edit. commitAccess now
resolves to the access result, and every create and edit page routes the
outcome through resourceSaveOutcome: edit pages stay on the form with a
"saved, but access could not be updated" warning; create pages go to the
new resource's edit page (creating again would duplicate it).
The connection form derived a Kubernetes connection's allowedResources only
when the stored list was empty, so the list derived on the first save was
frozen as if it were an override. It is now derived again on every save
unless the stored list differs from what the loaded capabilities derive (a
deliberate Advanced override), and the form shows the list that will be
saved. The helpers move to lib/kubernetes-resources.ts so node --test can
load them.
Testing
pnpm --filter @orbit/web typecheck: passedpnpm --filter @orbit/web test: 100 passed (newlib/resource-save.test.ts,lib/kubernetes-resources.test.ts)pnpm docs:check: passedNot checked in a browser. The web tests cannot render pages, so the save-outcome helper is tested instead of a mocked failing PATCH per page. On create pages a refused access save goes to the new resource's edit page with a warning; the access choice made on the create form is not kept.
🤖 Generated with Claude Code