Surface failed policy and OAuth app mutations#1417
Open
morluto wants to merge 1 commit into
Open
Conversation
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.
Fixes #1412
Summary
Policy writes and OAuth app removal used effect-atom's promise mode, which rejects when a mutation returns a failed Exit. Their UI callers discarded those rejected promises, leaving users without failure feedback.
This change uses
promiseExitand handles failed Exits explicitly in both workflows.Changes
Successful mutation behavior, optimistic rollback behavior, API contracts, and persistence contracts remain unchanged.
Regression proof
The browser tests were applied to a detached checkout of
origin/mainwithout the implementation changes:Before the fix, both tests timed out waiting for their expected failure messages. After the fix, both tests passed.
The policy scenario also verifies that rejected policy removal keeps the policy blocked and persisted. The OAuth scenario verifies that the registered app and confirmation dialog remain present after rejection.
Review the rejected policy create and remove steps in this recording:
Review the rejected OAuth app removal step and retained confirmation dialog in this recording:
Validation
bun run bootstrapcd packages/react && bun run test: 32 files and 229 tests passed.cd packages/react && bun run typecheckcd e2e && bun run typecheckbun run lint: 0 warnings and 0 errors.bun run formatgit diff --checkorigin/mainreturned no actionable findings.Review order