Repository navigation
fix(portal): show why adding a Keyring administrator failed - #110
Merged
Merged
Conversation
vtafarm-api now ends a failed grant_acl request with the final status 'failed' and returns the reason in `error` (ic3software/vtafarm-api#89). The portal did not know the status, so the Keyring card fell through to "Generate a QR code when you are ready." and the user was never told the attempt had failed. Show the error instead, with a fallback when none is sent. Signed-off-by: Geoff Turk <geoff@ic3.dev>
vthwang
approved these changes
Oct 21, 2026
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.
Companion to ic3software/vtafarm-api#89.
Background
On staging, linking the existing VTA
gtto Keyring returned 409 on every "Generate new QR code" click. The investigation (see ic3software/vtafarm-api#89) found two ways a session could get permanently stuck: legacy reservation rows the API no longer recognized, and failed additional-administrator grants that never reached a final status. The API fix makes a failedgrant_aclrequest end asfailed, with the reason inerror.The portal didn't know the
failedstatus. It degraded safely: the "Generate new QR code" button still showed. But the Keyring card fell through to the generic "Generate a QR code when you are ready.", so after scanning, confirming the code and waiting, the user was never told the attempt had failed.Changes
src/lib/api.ts: add'failed'toMobileConnection['status'](also used by the pool view'sclaim_state).src/pages/portal/SessionPnmCard.tsx: for afailedreservation, show the API'serror("Unable to add this administrator. Generate a new QR code and try again."), falling back to "The administrator key could not be added. Generate a new QR code and try again." when none is sent. It sits next to therejectedbranch, ahead of the generic fallback that used to swallow it.Testing
tsc -bandeslintpass on the changed files. Not exercised in a browser: showing the message needs a failed grant against an API that includes #89. Against an API without #89, nothing changes, since it never sendsfailed.