Skip to content

MenuItem: migrate GL code, 2FA disable, and accounting connection rows - #106639

Merged
roryabraham merged 2 commits into
mainfrom
claude-composableFourRows
Nov 11, 2026
Merged

roryabraham merged 2 commits into
mainfrom
claude-composableFourRows

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Migrate only the four requested rows away from the legacy configuration API, without changing their existing Sentry labels or adding presets/props:

  • Tag GL code uses the field preset, with a plain trailing lock when accounting manages the code. Preserve write-access visibility and keep the locked row noninteractive.
  • Enabled 2FA's Disable action uses composed primitives and a plain danger-colored icon, so hover/press cannot recolor it. Preserve the Xero-required warning and authentication gate.
  • Campfire and DualEntry's Create new connection actions use the navigation preset; remove the ineffective icon-container border radius.
  • Remove the four corresponding deprecated-component lint baseline entries.

AI Tests

  • Check-failure follow-up (2026-11-11): corrected Oxfmt import ordering only. npm run fmt is idempotent; lint, lint-changed, spell-changed, explicit React Compiler checks for all four changed pages, Storybook smoke test, and 3 targeted Jest suites / 278 tests passed. Code-standards review found no violations.
  • Follow-up full Jest run reached the 5-minute timeout with no reported test failures. Typecheck reproduced the three pre-existing missing allTransactionViolations arguments; the affected action and test files are byte-identical at the PR parent and head. Compiler check-changed still lacks its CI base ref; explicit checks passed. No browser QA was rerun for the import-only fix.
  • Passed: npm run lint; explicit React Compiler checks for all four changed pages; 9 targeted Jest suites / 253 tests (menu fields, accessibility, read-only rules, session, policy tags); Storybook smoke test.
  • Full Jest run exceeded the 5-minute limit after 56 passing suites; no failing suite was reported before timeout.
  • App TypeScript passed. Overall typecheck fails in existing report-workflow tests due to missing allTransactionViolations arguments (untouched by this PR).
  • lint-changed / spelling wrapper checks were blocked by fetch/merge-base failures in this shallow checkout. Compiler check-changed could not resolve its empty CI base ref; explicit per-file compiler checks passed instead.
  • The requested Prettier command is unavailable (the repo has no prettier script); standalone formatter/spelling invocations were denied by the execution policy.
  • Browser QA could not execute: the handed-off dev web session was blank, with zero accessible nodes. The steps below remain unverified.

Fixed Issues

$ #100159
PROPOSAL: #100159 (comment)

Tests

// TODO: The human co-author must fill out the tests they ran. Automated checks and the blocked browser attempt are recorded under AI Tests above.

  • Verify that no errors appear in the JS console

Offline tests

With the relevant screens already loaded, go offline and repeat the editable/locked GL-code and 2FA navigation checks below. Confirm rows retain their icons, permissions, and existing offline feedback. Do not submit external accounting credentials. These steps have not been executed.

QA Steps

Run on wide and narrow web layouts, in light and dark themes:

  1. As a workspace admin with tag write access and no accounting connection, open Tags → a tag. Verify the GL code field with both an empty and populated value. It has a chevron and opens the GL-code editor on Control; on Collect it opens the existing upgrade flow. Save a value and verify it displays correctly.
  2. In an accounting-connected workspace, open a tag whose GL code is managed by accounting. Verify the lock replaces the chevron and mouse/keyboard interaction cannot open the editor. With no tag write access, verify there is no trailing lock/chevron and the field cannot be edited. Confirm pending/offline feedback is unchanged.
  3. With 2FA enabled and no admin-owned Xero connection, open Settings → Security → Two-factor authentication. Verify Disable has the same spacing and red close icon, which stays red while hovering/pressing. Activate using mouse and keyboard; verify it opens the existing disable verification flow. Do not complete disabling unless using a disposable test account.
  4. Repeat with an admin-owned Xero connection. Verify Disable opens the existing cannot-disable warning instead of navigating, and dismiss the warning.
  5. With another reusable Campfire connection available, start connecting Campfire from a different workspace. Verify Create new connection retains its link-copy icon and trailing chevron, and opens Campfire setup. Go back and verify existing connection entries are unchanged. Do not create a real connection.
  6. Repeat the previous step for DualEntry and verify it opens DualEntry setup.
  7. Verify existing Sentry labels are unchanged for all four rows, no extra labels are introduced, and signed-out/anonymous sessions cannot execute the migrated actions. Verify no JS console errors during these flows.
  • 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 verified any copy / text that was added to the app 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 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 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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

Web verification was blocked before reaching any changed row:
Blank dev NewDot web page

Contributor branch access

This PR uses an upstream branch because Melvin cannot push to the requester's fork. To copy it to your fork:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-composableFourRows
git checkout -b claude-composableFourRows upstream/claude-composableFourRows
git push -u origin claude-composableFourRows

You can then close this PR and open one from your fork if needed.

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

Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
@MelvinBot
MelvinBot requested review from a team as code owners November 11, 2026 16:34
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Nov 11, 2026
@melvin-bot
melvin-bot Bot requested review from Pujan92 and removed request for a team November 11, 2026 16:35
@melvin-bot

melvin-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

@Pujan92 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested a review from heyjennahay November 11, 2026 16:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T16:41:06.726728Z 6682d84 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@melvin-bot
melvin-bot Bot removed the request for review from a team November 11, 2026 16:35
@MelvinBot
MelvinBot requested a review from a team November 11, 2026 16:35
@melvin-bot
melvin-bot Bot requested review from roryabraham and removed request for a team November 11, 2026 16:35
@melvin-bot

melvin-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

@roryabraham Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
...nting/campfire/CampfireExistingConnectionsPage.tsx 0.00% <0.00%> (ø)
...ing/dualentry/DualEntryExistingConnectionsPage.tsx 0.00% <0.00%> (ø)
...rc/pages/workspace/tags/DynamicTagSettingsPage.tsx 0.00% <0.00%> (ø)
...es/settings/Security/TwoFactorAuth/EnabledPage.tsx 0.00% <0.00%> (ø)
... and 30 files with indirect coverage changes

@MelvinBot

MelvinBot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Recovered sign-in and completed onboarding on Android. Verified that the empty GL-code row has a chevron and opens the Control-plan upgrade screen; remaining checks are unverified due to missing fixtures and the testing limit. Light/dark coverage was not completed.

GL-code feature opens the Control-plan upgrade screen

Step Status
1: Editable tag GL codeVerified empty GL-code chevron and native press opening the Control upgrade screen. Populated values, editor, and save/display remain untested.
GL-code feature opens the Control-plan upgrade screen
⚠️
2: Accounting-managed and read-only tagsBlocked: accounting-managed tags and a user without write access were unavailable. Lock, permissions, and pending feedback remain unverified.
⚠️
3: Enabled 2FA Disable actionBlocked: enabled-2FA fixture unavailable. Appearance, pressed color, and disable verification flow remain unverified. No 2FA changes made.
⚠️
4: Xero cannot-disable warningBlocked: no admin-owned Xero connection available.
⚠️
5: Campfire connection navigationBlocked: no reusable Campfire connection available. No external connection created.
⚠️
6: DualEntry connection navigationBlocked: no reusable DualEntry connection available. No external connection created.
⚠️
7: Sentry labels and anonymous guardsNot tested. Account remained signed in; labels and anonymous execution guards were not inspected.
⚠️
8: Offline behaviorNot tested. Locked-tag and enabled-2FA fixtures were missing.
⚠️
9: JavaScript console errorsLogs were not inspected; absence of JavaScript errors cannot be confirmed.
⚠️

view run · view recording

@Pujan92

Pujan92 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • 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 verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari Screenshot 2026-11-11 at 21 27 39 Screenshot 2026-11-11 at 21 14 55 Screenshot 2026-11-11 at 21 14 24

@Pujan92 Pujan92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MelvinBot

MelvinBot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Partial QA completed on Web before an emailed account-validation code blocked further testing; no product regression was established. Wide/narrow light layouts were exercised; dark theme was not tested.

Narrow light layout: account validation blocks access to 2FA settings

Step Status
1: Editable tag GL codeEmpty GL-code row displayed a chevron and opened the Control upgrade dialog. Dismissed without purchase; populated value, Control editor, and saving remain unverified.
Wide light layout: empty GL-code row with chevron
⚠️
2: Accounting-managed and read-only tagsBlocked: required accounting-managed and read-only fixtures unavailable. Lock, mouse/keyboard restrictions, and pending feedback remain unverified.
⚠️
3: Enabled 2FA Disable actionAccount validation requested an emailed six-digit code. Disable appearance, hover/press color, and mouse/keyboard navigation could not be reached. No 2FA changes made.
Narrow light layout: account validation blocks access to 2FA settings
⚠️
4: Xero cannot-disable warningBlocked: no admin-owned Xero fixture; account validation also prevented 2FA access.
⚠️
5: Campfire connection navigationBlocked: no reusable Campfire connection in another workspace. No external connection created.
⚠️
6: DualEntry connection navigationBlocked: no reusable DualEntry connection in another workspace. No external connection created.
⚠️
7: Sentry labels and anonymous guardsUnverified: all four rows were not reachable, and anonymous session state was unavailable. Did not sign out.
⚠️
8: Offline behaviorBlocked: offline simulation was unavailable through the supported testing tools; required fixtures were also missing.
⚠️
9: JavaScript console errorsConsole inspection was unavailable through the supported testing tools. Absence of JavaScript errors cannot be confirmed.
⚠️

view run · no recording available

Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Pushed eddc3346 to fix Oxfmt’s import-order failure.

  • Passed locally: formatting, lint, spelling, React Compiler checks, Storybook smoke test, and 278 targeted Jest tests.
  • Full Jest run timed out without reported failures.
  • Typecheck’s three missing allTransactionViolations arguments are pre-existing in untouched tests; left unchanged.
  • Independent approval remains a human-review requirement.

CI is rerunning; its results are not yet confirmed.


view run

@MelvinBot

This comment has been minimized.

@MelvinBot

This comment has been minimized.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: no need to tighten the seatbelt manually. It happens automatically on merge

@roryabraham
roryabraham merged commit fdb4f2c into main Nov 11, 2026
45 of 46 checks passed
@roryabraham
roryabraham deleted the claude-composableFourRows branch November 11, 2026 20:13
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.37-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed — this PR migrates existing menu components without adding features, changing documented workflows or labels, removing beta gates, or making existing article text incorrect.


view run

@izarutskaya

Copy link
Copy Markdown

@Pujan92 @heyjennahay We will verify only steps 1-6, as don't have access to Sentry

  1. Verify existing Sentry labels are unchanged for all four rows, no extra labels are introduced, and signed-out/anonymous sessions cannot execute the migrated actions. Verify no JS console errors during these flows.

@Pujan92

Pujan92 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@izarutskaya yes, ignore that step

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.37-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 failure ❌

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants