feat(front): show the decoded Passport on screen (PassportCard, WO-13) - #118
Merged
Conversation
"Download Passport" wrote the envelope to disk and rendered nothing, so the demo beat "Generate Passport -> the JSON appears" (docs/MVP.md 01:40) never happened on screen. Adds `PassportCard` (design-system §7 inventory, Sprint 2: "Mono JSON block + Download action"): - Collapsible `font-mono` block with the decoded `json_payload` (§3 Forensic). - Starts COLLAPSED: the full payload is long and would push the studio out of the viewport, breaking the demo framing (#94 regression risk). - Discriminated-union props (§7 rule 6): `ready` carries the envelope, `unavailable` covers the contract-nullable `GenerateResponse.passport`. - Tokens only (§7 rule 3): rounded-lg, border-border, bg-card, shadow-paper-sm, bg-muted/50. No raw Tailwind colors. - A11y floor (§7 rule 7): aria-expanded/aria-controls toggle, focusable scrollable region with aria-label, visible focus ring, ChevronDown (§6). The existing Download action is preserved verbatim (same handler, same i18n copy, same aria-label, same disabled-when-null behaviour) and now lives inside the card, as §7 specifies. The equivalent raw-JSON toggle in app/verify/page.tsx is NOT factored out: that file is outside this work order's allowed file set. The duplication is deliberate and documented in the component JSDoc. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7 tasks
7 tasks
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.
What
PassportCardcomponent: puts the decoded Passport on screen instead of leaving it as JSON nobody sees.Why
Closes #94
How IBM Bob helped
Claude Code agents, with
ui-ux-pro-maxrestricted to accessibility verification anddocs/design-system.mdas the styling authority.Screenshots / output
UI change: the JWS/ES256-signed Passport becomes readable on screen. This is the deliverable that carries the EU AI Act Art. 50 angle in front of the jury — until now the Passport existed but was never visible.
Checklist
make test)make lint)docs/.env.exampledocs/api_contract.yamlREADME.mdupdated