feat(db): add passkey wrap security event names - #21022
Open
vpomerleau wants to merge 1 commit into
Open
Conversation
Because: * The passkey wrap lifecycle has no audit trail. * Recent Activity shows "Other account activity" for any unrecognized name, so names and strings have to land together. This commit: * Adds six securityEventNames rows with a commented-out reverse patch, mapped in EVENT_NAMES. * Renders creation, creation failure and invalidation; hides the two unlock events and the deletion cascade, which restate rows the user already has. * Puts which step failed in additionalInfo.reason, so a new failure mode needs no migration. * Adds a test that every non-hidden event name renders a real string. * Brings the securityEventNames test fixture current -- stale since id 50. Nothing emits these events yet. Closes #FXA-13139
Contributor
There was a problem hiding this comment.
Pull request overview
Adds passkey-wrap lifecycle security event definitions and Recent Activity presentation support. Event emission remains future work.
Changes:
- Adds six database event names and shared ID mappings.
- Displays three user-relevant events while hiding duplicate/internal events.
- Adds localization and complete-label regression coverage.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/fxa-shared/test/db/models/auth/security-event-names.sql |
Updates the test fixture with recent event names. |
packages/fxa-shared/db/models/auth/security-event.ts |
Maps passkey-wrap names to IDs 61–66. |
packages/fxa-settings/src/components/Settings/PageRecentActivity/SecurityEvent.tsx |
Maps visible labels and hides redundant events. |
packages/fxa-settings/src/components/Settings/PageRecentActivity/index.test.tsx |
Tests labels beyond the initial 20 rows. |
packages/fxa-settings/src/components/Settings/PageRecentActivity/en.ftl |
Adds English localized strings. |
packages/db-migrations/databases/fxa/target-patch.json |
Advances the target schema to 196. |
packages/db-migrations/databases/fxa/patches/patch-196-195.sql |
Documents the disabled reverse migration. |
packages/db-migrations/databases/fxa/patches/patch-195-196.sql |
Adds the six event names. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bcolsson
approved these changes
Aug 14, 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.
Because
This pull request
account.passkey.wrap_*names inpatch-195-196.sqlwith a commented-out reverse patch, mapped insecurity-event.ts.wrap_created,wrap_creation_failureandwrap_invalidatedin Recent Activity; hides the other three, which restate rows the user already has.additionalInfo.reason, so a new failure mode needs no migration.Nothing emits these events yet.
Issue that this pull request solves
Closes: FXA-13139
Checklist
Put an
xin the boxes that applyHow to review (Optional)
patch-195-196.sqlandEVENT_NAMESmust agree exactly. The migration is immutable once published.Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)