Skip to content

fix(web): refused access saves are not reported as success; Kubernetes allowedResources follows capabilities (#397) - #500

Open
mblaauw wants to merge 1 commit into
mainfrom
fix/397-access-save-and-allowed-resources
Open

mblaauw wants to merge 1 commit into
mainfrom
fix/397-access-save-and-allowed-resources

Conversation

@mblaauw

@mblaauw mblaauw commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

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: passed
  • pnpm --filter @orbit/web test: 100 passed (new lib/resource-save.test.ts, lib/kubernetes-resources.test.ts)
  • pnpm docs:check: passed

Not 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

…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>
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.

Web forms: a failed access save is reported as success, and Kubernetes allowedResources never follows capability changes

1 participant