feat: gather identity operations under a Manage Identity menu - #35
Merged
Conversation
The init screen had grown to seven entries, three of which were different operations on an identity you already own. Top Up, Manage Keys, Transfer a Username and Withdraw Credits now live behind a single Manage Identity button, taking the init screen down to five. Top-up and withdraw are their own BridgeModes rather than steps of manage mode, so entering them from the menu goes through setMode and records fromManageMenu. Back then returns to the menu instead of dropping the user out to the init screen. The flag is cleared by clearModeSensitiveFields, so ?mode=withdraw still deep-links straight in and its Back still exits to init — covered by a new test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 7 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Four transitions assign mode directly instead of going through setMode, so they skip clearModeSensitiveFields. None of them is reachable with fromManageMenu set today, but that relied on a reachability argument rather than the code enforcing it. Clearing the flag at each site makes the invariant -- only topup and withdraw can carry it -- hold structurally, so a future step added to those paths cannot silently send a user back to a menu they never opened. Co-Authored-By: Claude Opus 5 (1M context) <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.
The init screen had grown to seven entries, three of which were different operations on an identity you already own. Those now live behind a single Manage Identity button, taking the init screen down to five.
Before / after
The chooser step (
manage_choose_action) already existed from #34; this extends it rather than adding a new screen.The part worth reviewing
Manage Keys and Transfer are steps within
mode: 'manage'. Top Up and Withdraw are their ownBridgeModes, so entering them from the menu has to go throughsetMode, which resets mode-scoped state.That creates a back-navigation problem: Back from top-up previously meant "return to init", and it still must for anyone who arrived another way. A new
fromManageMenuflag records the entry point:setManageActionTopUp/setManageActionWithdrawdo{ ...setMode(state, …), fromManageMenu: true }.clearModeSensitiveFieldsclears it, so any mode entered from the init screen or a deep link starts without it. It is set after theclearUsernameTransferFieldsspread, which would otherwise reintroduce the old value.#back-btnand#withdraw-back-btnhandlers branch on it.This matters because
?mode=withdrawis an existing deep link — a user who lands there directly must not be sent "back" into a menu they never visited. There is a test pinning that.Testing
?mode=withdrawand asserts Back exits to init instead. Suite: 8 passing.tsc, 108 unit tests, production build and the artifact check all clean.live.testnet,live.transfer) that clicked the removed#mode-topup-btn. CI does not run those, so they would have broken silently.No behaviour changes inside any of the four flows — only how they are reached and where Back goes.
🤖 Generated with Claude Code