Skip to content

Replace user-facing "Magic code" copy with "Security code"#96181

Draft
MelvinBot wants to merge 2 commits into
mainfrom
claude-magicCodeToSecurityCopy
Draft

Replace user-facing "Magic code" copy with "Security code"#96181
MelvinBot wants to merge 2 commits into
mainfrom
claude-magicCodeToSecurityCopy

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

This is a front-end copy-only change: it renames every user-facing "Magic code" reference to "Security code" across NewDot (sign-in, onboarding, one-time verification gates, per-action confirmations, and error messages).

Per the internationalization workflow, src/languages/en.ts is the single source of truth and every other locale file is auto-generated. So this PR edits only src/languages/en.ts (26 string values). The Generate static translations workflow runs automatically on PRs that touch en.ts and will regenerate de/es/fr/it/ja/nl/pl/pt-BR/zh-hans from the updated English source.

Only string values were changed — translation keys (magicCode, enterMagicCode, etc.), routes (.../confirm-magic-code), component names (MagicCodeInput), and code identifiers are intentionally left unchanged, since those are not user-facing and changing them would be a behavior change (out of scope).

Fixed Issues

$ #96180
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: Lauren <laurenreidexpensify@users.noreply.github.com>
@OSBotify

This comment has been minimized.

Co-authored-by: Lauren <laurenreidexpensify@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing Oxfmt check and pushed to the branch.

What was failing: oxfmt --write . produced a diff on src/languages/en.ts, so the "Verify there's no Oxfmt diff" step failed. Renaming "Magic code""Security code" pushed the revoke.explanation string from 188 to 191 characters, crossing the 190 printWidth. Oxfmt then wraps the value onto its own line:

explanation:
    'Face/fingerprint or passkey verification are enabled on one or more devices. Revoking access will require a security code for the next verification on that device.',

I ran oxfmt 0.55.0 (the pinned version) locally, committed only that reformat, and pushed — the check should pass on the next run.

Still red — but not code-related: the checklist failure is the PR Author Checklist, which just needs a human to tick the boxes in the PR description. I can't complete that on your behalf.

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

The diff is too large to include in this comment (137KB), so I've created a gist for you:

📋 View the translation diff here 📋

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply, or directly by running gh gist view --raw b4e2fafd30fb541ce70b0f571b864cea | git apply 😉

View workflow run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

👋 I looked into the failing checks. The only check that's actually failing is PR Author Checklist / checklist, and it's failing for a non-code reason — there's nothing in the diff to fix.

Why it fails: the check reports You completed 0 out of 38 checklist items with 38 unfinished items. The author checklist boxes in the PR description just aren't ticked. It's a known non-blocking check that always fails on MelvinBot-authored PRs.

Why there's no code fix: this PR only changes src/languages/en.ts — pure English copy (Magic codeSecurity code). Every substantive check passes (Bun tests, all 8 Jest test shards, ESLint, Oxfmt, generateTranslations, spellcheck, Storybook, knip, etc.), and no test asserts on the changed strings. typecheck and the perf-test jobs were still running when I checked, but a copy-only change can't affect typing or render performance.

To make it green: the author checklist is meant to be completed by a human author, so I didn't auto-tick it. Please review and check the boxes in the PR description (or confirm you'd like me to). It won't block review or merge either way.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Following up — the status is unchanged, and there's still no code fix to push.

The single red check is PR Author Checklist / checklist (You completed 0 out of 38 checklist items). It's failing purely because the author-checklist boxes in the PR description are unticked — not because of anything in the diff. This PR only changes English copy in src/languages/en.ts, and every substantive check passes (Bun tests, all 8 Jest test shards, ESLint, Oxfmt, generateTranslations, spellcheck, Storybook, knip). typecheck and the perf-test jobs were still running, but a copy-only change can't affect typing or performance.

To turn it green: the author checklist is a human-author responsibility (it attests to manual testing/QA), so I can't complete it on your behalf. Please review and tick the boxes in the PR description. Once they're checked, the checklist job will re-run and pass — it won't block review or merge in the meantime.

@laurenreidexpensify

Copy link
Copy Markdown
Contributor

@NikkiWines @chuckdries could you take a look here when you have a moment?

This PR is now just focused on the front end copy, but it feels like we should probably also change the constants - eg

magicCode: 'Security code',

do you see any reason why we couldn't update magicCode to securityCode for example?

@NikkiWines

NikkiWines commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@laurenreidexpensify yeah securityCode works there since that is specifically for the copy "Security code" 👍

@NikkiWines

NikkiWines commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Noting here that we have a bunch of components and files that use MagicCode in them (E.g. MagicCodeInput.tsx, ChooseSSOOrMagicCodeProps and variable names like setIsUsingMagicCode etc.

Those should all use our internal term, validateCode (you can see we already have a mix of terminology in the front end). "Magic Code" was always just supposed to be a marketing term, but things have diverged 😵‍💫

However, to keep things simpler, let's update the user-facing copy to use security code (and update the language/ consts as well to use that term), and then after that's updated, we can do a find and replace for magicCode in the App to update files, components, and variable names to use validateCode accordingly.

thoughts cc: @laurenreidexpensify @chuckdries

@chuckdries

Copy link
Copy Markdown
Contributor

I agree, let's tackle the user facing localization strings separately from renaming all the source code files and constants, since doing that refactor is riskier and has no user-visible benefit

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.

5 participants