Skip to content

feat(wallets): bind a legacy wallet to a keycloak account - #1253

Merged
dadiorchen merged 1 commit into
Greenstand:keycloakfrom
samwel141:feat-bind-keycloak-account-1241
Oct 10, 2026
Merged

dadiorchen merged 1 commit into
Greenstand:keycloakfrom
samwel141:feat-bind-keycloak-account-1241

Conversation

@samwel141

@samwel141 samwel141 commented Oct 7, 2026 •

Copy link
Copy Markdown

Closes #1241

Problem

Wallets created before Keycloak carry no keycloak_account_id, and the panel had no way to set one. The issue also asked us to define how an admin finds that id before coding; we agreed on search rather than pasting a uuid, since a pasted id is unverifiable and the acceptance criteria already ask the page to show the account's name or email.

Change

A wallet detail page at /wallets/:walletId, reached by clicking a wallet name in the list. It shows the name, the keycloak id (empty when unbound) and, once bound, the account behind it. A "Bind keycloak account" button opens a dialog that searches by email or username, lists the matches, and binds the one the admin picks.

The route sits behind the same wallet-admin gate as the Wallets page, so /wallets/:id renders Unauthorized for anyone else.

Verification

4 unit tests in src/views/WalletDetailView.test.js cover the unbound state, the bound state with account info, the full search-and-bind flow, and a load failure. 202 unit tests pass, eslint and prettier clean, production build succeeds.

The BDD scenario was run against a local wallet-api on the Greenstand/treetracker-wallet-api#612 branch, so the detail page and the empty keycloak id are verified against the real endpoints:

✓ And I click the name of the wallet "wallet-legacy-01"
✓ Then I should see the wallet detail page for "wallet-legacy-01"
✓ And the keycloak id is empty
✓ When I open the bind keycloak account dialog
✖ And I search for a keycloak account and pick the first match

Video in reports/video/wallet-admin/run.mp4.

Blocker

The scenario's last two steps stay red until the APIs they call are merged and deployed to dev:

Wallets made before keycloak carry no account id, and the panel had no
way to set one. Adds a wallet detail page behind the wallet-admin gate,
reached from the list, with a dialog that finds the account by email or
user name so nobody has to paste a uuid.
@samwel141
samwel141 requested a review from a team as a code owner October 7, 2026 04:46
@dadiorchen
dadiorchen merged commit cc83cb8 into Greenstand:keycloak Oct 10, 2026
1 check passed
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.

2 participants