Skip to content

[No QA] Show a spinner below the DynamicForm header and drop redundant shouldUseGoBackButton props - #104053

Merged
Julesssss merged 3 commits into
mainfrom
claude-dynamicFormLoaderBelowHeader
Oct 16, 2026
Merged

Julesssss merged 3 commits into
mainfrom
claude-dynamicFormLoaderBelowHeader

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

Follow-up to the shouldUseGoBackButton default flip (#99786).

DynamicForm loader no longer covers its own header. DynamicFormShell always renders a header (HeaderWithBackButtonAndTitle, or InteractiveStepWrapper when the step indicator shows), and the loading state is rendered inside it. Since FullScreenLoadingIndicator is absolutely positioned and now shows a "Go Back" button by default, it drew over the header and stacked a second back button on top of the header's own back button. The loader is now a plain ActivityIndicator in a flex1 + fullScreenLoading view, the same pattern the earlier sibling-of-header refactors used, so the spinner sits below the header and the header's back button stays the only way back. No screen renders DynamicForm yet, so this has no in-app repro.

Cleanup. Removed the now-redundant explicit shouldUseGoBackButton (which is true by default) from ReportOrNotFoundGuard, ConnectionsMergePageBase, and ConnectionsReceiptPartnersPage. Behavior at these sites is unchanged.

Added a DynamicFormFlow unit test that checks the header is drawn with a plain spinner under it, and not a FullScreenLoadingIndicator, while the flow loads. It fails without the fix.

Fixed Issues

$ #96098
PROPOSAL:

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.

  • 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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
AI tests run locally by MelvinBot
Check Result
npm test on DynamicFormFlowTest, withReportOrNotFound.test, ConnectionsPanelGatesTest, FullScreenLoadingIndicatorTest, and all tests/unit/components/DynamicForm suites 19 suites, 207 tests passed
New test fails without the DynamicForm change Confirmed
npm run lint-changed Passed
npm run typecheck Passed
npm run fmt (oxfmt) No changes beyond the 5 intended files
npm run spell-changed 0 issues in 5 files
npm run react-compiler-compliance-check check <changed components> Passed (check-changed could not resolve the base ref in this environment, so the 4 changed components were checked by path)
Web app test Not run: no screen renders DynamicForm yet, and the other 3 files only drop a prop equal to its default

…UseGoBackButton props

Co-authored-by: Situ Chandra Shil <[email protected]>
@MelvinBot
MelvinBot requested a review from a team October 14, 2026 23:00
@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 Oct 14, 2026
@melvin-bot

melvin-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

⚠️ MelvinBot didn't finish that one — the run was killed before I could reply (usually a Cloudflare CPU limit on a long investigation). Please retry with a more specific question, and if this keeps happening post in #melvinbot-ai.

@situchan

Copy link
Copy Markdown
Contributor

@MelvinBot add [No QA] prefix to the title and mark as ready for review

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing test (job 2) check by merging main into this branch (041f4ff). No code in this PR changed.

Details
  • Failure: tests/ui/SearchColumnsPageTest.tsx threw Cannot read properties of undefined (reading 'status'). The cause was a useOnyx mock with no metadata, read by usePolicyForMovingExpenses. None of those files are in this PR.
  • Fix: [NoQA] Fix SearchColumnsPageTest already fixed the mock on main. This branch didn't have it yet. The merge was clean.
  • Verification: After the merge, this branch differs from main only in the PR's 5 files. I couldn't run Jest locally here, so the new CI run is the confirmation.
  • Check independent approval is also failing. It is a review-gate check, not a code failure.

@MelvinBot

MelvinBot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

The PR documents only one test step ("Verify that no errors appear in the JS console"), so I also ran regression checks on the screens it touches. On Android, the Concierge chat, workspace Accounting page, and Receipt partners page all loaded with no stuck loaders or errors. The tester could not run the not-found deep link or scan logcat for JS errors because its tools don't allow either.
Workspace Receipt partners page rendered with Uber for Business connection

Step Status
Open a report/chat (Concierge): it loads with no not-found page and no stuck loaderThe Concierge chat opened from the Inbox. The header, welcome message, and composer all rendered.
Concierge chat open and loaded normally
✅
Deep link to a report that doesn't exist (new-expensify://r/999999999999): a not-found screen appears with a working back buttonNot run. The tester can't open deep links in this session, so the not-found screen from ReportOrNotFoundGuard wasn't tested.
⚠️
Workspace Accounting page renders without a stuck loader or errorAfter I turned on Accounting under More features, the page listed every connection (QuickBooks Online, Xero, NetSuite, Sage Intacct, and others) with Connect buttons.
Workspace Accounting page rendered with connection options
✅
Workspace Receipt partners page renders without a stuck loader or errorAfter I turned on Receipt partners under More features, the page showed the Uber for Business card with a Connect button.
Workspace Receipt partners page rendered with Uber for Business connection
✅
No red-box errors or JS console errors during the steps aboveNo red-box error appeared, the app never crashed, and every captured API call returned 200. The tester couldn't read logcat, so the JS console itself wasn't checked.
⚠️

view run · view recording

@MelvinBot MelvinBot changed the title Show a spinner below the DynamicForm header and drop redundant shouldUseGoBackButton props [No QA] Show a spinner below the DynamicForm header and drop redundant shouldUseGoBackButton props Oct 14, 2026
@MelvinBot
MelvinBot marked this pull request as ready for review October 14, 2026 23:20
@MelvinBot
MelvinBot requested a review from a team as a code owner October 14, 2026 23:20
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Done. I added the [No QA] prefix to the title and marked this PR as ready for review.

The Tests and QA Steps sections still contain the TODO placeholders. A human co-author needs to fill them in.


view run

@melvin-bot
melvin-bot Bot requested review from situchan and removed request for a team October 14, 2026 23:20
@melvin-bot

melvin-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

@situchan 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 trjExpensify October 14, 2026 23:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T08:00:41.566521Z 041f4ff Manual request
ℹ️ 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 October 14, 2026 23:20

if (decision === 'loading') {
return <FullscreenLoadingIndicator shouldUseGoBackButton />;
return <FullscreenLoadingIndicator />;

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.

❌ UI-1 (docs)

This FullscreenLoadingIndicator is returned as the sole content for the 'loading' decision, with no navigation (header/back button) rendered in this branch. Removing shouldUseGoBackButton means that if loading hangs, the user has no escape route and is trapped on the screen. Since this prop is being migrated to become the default, it must be set explicitly for now.

Restore the prop:

if (decision === 'loading') {
    return <FullscreenLoadingIndicator shouldUseGoBackButton />;
}

Reviewed at: 041f4ff | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@situchan situchan Oct 15, 2026 •

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.

This doc is no longer valid.
shouldUseGoBackButton is now set to true default when omitted.
@MelvinBot create followup PR to update this doc so that claude no longer reports as bug. Instead, they should catch the bug of {shouldUseGoBackButton=false} being omitted when it doesn't make sense to go back.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 I couldn't open the follow-up PR. My environment blocks edits to files under .claude/, so I can't change .claude/skills/app-coding-standards/rules/ui-1-correct-loading-indicator.md. An engineer needs to apply the change. The full replacement file is below.

The new rule makes 3 changes:

  1. It stops flagging a missing shouldUseGoBackButton, because the prop defaults to true (src/components/FullscreenLoadingIndicator.tsx:39). It also stops flagging removal of an explicit shouldUseGoBackButton, like the 3 comments on this PR did.
  2. It flags a FullscreenLoadingIndicator without shouldUseGoBackButton={false} when a header with a back button renders in the same tree. Otherwise the loader stacks a second "Go Back" button over the header's back button.
  3. It flags the same omission where going back makes no sense, such as global overlays and sign-in or sign-out pages. Main already does this in FullScreenLoaderContext, LogOutPreviousUserPage, and ValidateLoginPage. The old "correct" example that used ValidateLoginPage with shouldUseGoBackButton was out of date.
Proposed ui-1-correct-loading-indicator.md
---
ruleId: UI-1
title: Use the correct loading indicator based on navigation context
---

## [UI-1] Use the correct loading indicator based on navigation context

### Reasoning

If loading hangs, users need an escape route. `FullscreenLoadingIndicator` provides one by default: `shouldUseGoBackButton` defaults to `true`, so it shows an emergency "Go Back" button after a timeout. Omitting the prop is correct when no navigation is visible.

The default is wrong when going back doesn't make sense:
- **Navigation is already visible.** If a header with a back button (or a close button) renders alongside the loader, the default "Go Back" button duplicates it. Prefer `ActivityIndicator` below the header, since `FullscreenLoadingIndicator` is absolutely positioned and draws over the header. If `FullscreenLoadingIndicator` stays, pass `shouldUseGoBackButton={false}`.
- **Going back is dead or harmful.** Global overlays, sign-in/sign-out transitions, and auth or session handoff pages have nowhere safe to go back to. Pass `shouldUseGoBackButton={false}`.

### Incorrect

```tsx
// Header and FullscreenLoadingIndicator in SAME return without shouldUseGoBackButton={false} - stacks a second "Go Back" button over the header's back button
<ScreenWrapper>
    <HeaderWithBackButton title="Settings" />
    <FullscreenLoadingIndicator />
</ScreenWrapper>

// Sign-in transition page - going back mid-transition is dead or harmful, so the default "Go Back" button must be turned off
function LogInWithShortLivedAuthTokenPage() {
    return <FullscreenLoadingIndicator />;
}

// ActivityIndicator as sole content without navigation - use FullscreenLoadingIndicator
function AuthLoadingPage() {
    return (
        <View style={[styles.flex1, styles.justifyContentCenter, styles.alignItemsCenter]}>
            <ActivityIndicator size="large" />
        </View>
    );
}
```

### Correct

```tsx
// No navigation in return - FullscreenLoadingIndicator shows the "Go Back" button by default
function ReportLoadingPage() {
    return <FullscreenLoadingIndicator />;
}

// Loader and navigation in DIFFERENT returns - OK to use FullscreenLoadingIndicator with the default "Go Back" button
function SettingsPage() {
    if (isLoading) {
        return <FullscreenLoadingIndicator />;
    }
    return (
        <ScreenWrapper>
            <HeaderWithBackButton title="Settings" />
            <Content />
        </ScreenWrapper>
    );
}

// Header visible during loading - use ActivityIndicator
function SettingsPage() {
    return (
        <ScreenWrapper>
            <HeaderWithBackButton title="Settings" />
            {isLoading ? (
                <View style={[styles.flex1, styles.justifyContentCenter, styles.alignItemsCenter]}>
                    <ActivityIndicator size="large" />
                </View>
            ) : (
                <Content />
            )}
        </ScreenWrapper>
    );
}

// Going back is dead or harmful - turn the "Go Back" button off
function LogInWithShortLivedAuthTokenPage() {
    return <FullscreenLoadingIndicator shouldUseGoBackButton={false} />;
}
```

---

### Review Metadata

Flag ONLY when ANY of these patterns is found:

- `FullscreenLoadingIndicator` without `shouldUseGoBackButton={false}` when `HeaderWithBackButton` (or other navigation like a close button) is rendered **in the same JSX tree** (not separated by conditionals into different returns). Suggest `ActivityIndicator` below the header, or at minimum `shouldUseGoBackButton={false}`
- `FullscreenLoadingIndicator` without `shouldUseGoBackButton={false}` where **going back is dead or harmful**: global overlays, sign-in/sign-out transitions, auth or session handoff pages
- `ActivityIndicator` as the **sole/main screen content** (flex:1 container, early return) without any navigation component (e.g., `HeaderWithBackButton`, close button) **in the same return statement or conditional branch**

**DO NOT flag if:**

**For `FullscreenLoadingIndicator`:**
- `shouldUseGoBackButton` is omitted and no navigation is rendered in the same return statement or conditional branch. The prop defaults to `true`, so do not ask to add `shouldUseGoBackButton` or `shouldUseGoBackButton={true}`
- An explicit `shouldUseGoBackButton` (or `={true}`) is removed. This does not change behavior
- Visibility is controlled by `FullScreenLoaderContext`

**For `ActivityIndicator`:**
- Used within interactive UI elements (buttons, list items, cards) where user can still interact with surrounding navigation

**Search Patterns** (hints for reviewers):
- `FullscreenLoadingIndicator`
- `FullScreenLoadingIndicator`
- `shouldUseGoBackButton`
- `ActivityIndicator`

view run

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.

It flags a FullscreenLoadingIndicator without shouldUseGoBackButton={false} when a header with a back button renders in the same tree. Otherwise the loader stacks a second "Go Back" button over the header's back button.

@MelvinBot I corrected sentence:

when it doesn't make sense to go back

As FullScreenLoadingIndicator should not be used in the first place when the page already has header back button

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I changed the proposed rule to match your correction:

  • Header with a back button in the same tree: flag the FullscreenLoadingIndicator itself and suggest ActivityIndicator. The rule no longer offers shouldUseGoBackButton={false} as a fix for this case. This matches the current rule on main.
  • shouldUseGoBackButton={false}: flag a missing ={false} only when it doesn't make sense to go back, such as global overlays, sign-in or sign-out transitions, and auth handoff pages.
  • Unchanged: the rule still doesn't flag a missing or removed shouldUseGoBackButton, because the prop defaults to true.

I still can't edit files under .claude/, so I couldn't open the PR. An engineer needs to replace .claude/skills/app-coding-standards/rules/ui-1-correct-loading-indicator.md with the file below. The ={false} example is LogOutPreviousUserPage.tsx:105, which already does this on main.

Revised ui-1-correct-loading-indicator.md
---
ruleId: UI-1
title: Use the correct loading indicator based on navigation context
---

## [UI-1] Use the correct loading indicator based on navigation context

### Reasoning

If loading hangs, users need an escape route. When navigation (back button, close) is visible alongside the loader, users can escape - use `ActivityIndicator`. `FullscreenLoadingIndicator` doesn't belong there: it is absolutely positioned, draws over the header, and adds a second "Go Back" button. When no navigation is visible, users are trapped - use `FullscreenLoadingIndicator`, which shows an emergency "Go Back" button after a timeout. `shouldUseGoBackButton` defaults to `true`, so omit it. Pass `shouldUseGoBackButton={false}` only when it doesn't make sense to go back, such as global overlays, sign-in/sign-out transitions, and auth or session handoff pages.

### Incorrect

```tsx
// Header and FullscreenLoadingIndicator in SAME return - use ActivityIndicator
<ScreenWrapper>
    <HeaderWithBackButton title="Settings" />
    <FullscreenLoadingIndicator />
</ScreenWrapper>

// Sign-out transition page - going back makes no sense, so turn the "Go Back" button off
function LogOutPreviousUserPage() {
    return <FullscreenLoadingIndicator />;
}

// ActivityIndicator as sole content without navigation - use FullscreenLoadingIndicator
function AuthLoadingPage() {
    return (
        <View style={[styles.flex1, styles.justifyContentCenter, styles.alignItemsCenter]}>
            <ActivityIndicator size="large" />
        </View>
    );
}
```

### Correct

```tsx
// No navigation in return - FullscreenLoadingIndicator shows the "Go Back" button by default
function ReportLoadingPage() {
    return <FullscreenLoadingIndicator />;
}

// Loader and navigation in DIFFERENT returns - OK to use FullscreenLoadingIndicator
function SettingsPage() {
    if (isLoading) {
        return <FullscreenLoadingIndicator />;
    }
    return (
        <ScreenWrapper>
            <HeaderWithBackButton title="Settings" />
            <Content />
        </ScreenWrapper>
    );
}

// Header visible during loading - use ActivityIndicator
function SettingsPage() {
    return (
        <ScreenWrapper>
            <HeaderWithBackButton title="Settings" />
            {isLoading ? (
                <View style={[styles.flex1, styles.justifyContentCenter, styles.alignItemsCenter]}>
                    <ActivityIndicator size="large" />
                </View>
            ) : (
                <Content />
            )}
        </ScreenWrapper>
    );
}

// Going back makes no sense - turn the "Go Back" button off
function LogOutPreviousUserPage() {
    return <FullscreenLoadingIndicator shouldUseGoBackButton={false} />;
}
```

---

### Review Metadata

Flag ONLY when ANY of these patterns is found:

- `FullscreenLoadingIndicator` and `HeaderWithBackButton` (or other navigation like close button) are **both under the same JSX tree** (not separated by conditionals). Suggest `ActivityIndicator` instead
- `FullscreenLoadingIndicator` without `shouldUseGoBackButton={false}` when **it doesn't make sense to go back**: global overlays, sign-in/sign-out transitions, auth or session handoff pages
- `ActivityIndicator` as the **sole/main screen content** (flex:1 container, early return) without any navigation component (e.g., `HeaderWithBackButton`, close button) **in the same return statement or conditional branch**

**DO NOT flag if:**

**For `FullscreenLoadingIndicator`:**
- `shouldUseGoBackButton` is omitted and no navigation is rendered in the same return statement or conditional branch. The prop defaults to `true`, so do not ask to add `shouldUseGoBackButton`
- An explicit `shouldUseGoBackButton` (or `={true}`) is removed. This does not change behavior
- Visibility is controlled by `FullScreenLoaderContext`

**For `ActivityIndicator`:**
- Used within interactive UI elements (buttons, list items, cards) where user can still interact with surrounding navigation

**Search Patterns** (hints for reviewers):
- `FullscreenLoadingIndicator`
- `FullScreenLoadingIndicator`
- `shouldUseGoBackButton`
- `ActivityIndicator`

view run

shouldUseGoBackButton
style={styles.flex1}
/>
<FullScreenLoadingIndicator style={styles.flex1} />

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.

❌ UI-1 (docs)

This FullScreenLoadingIndicator is rendered inside AccessOrNotFoundWrapper, which renders its children without any surrounding navigation (header/back button). In the isFetchingConnections branch the loader is the only visible content, so removing shouldUseGoBackButton leaves the user with no escape route if the connections fetch hangs. The prop is being migrated to become the default and must be set explicitly for now.

Restore the prop:

<FullScreenLoadingIndicator
    shouldUseGoBackButton
    style={styles.flex1}
/>

Reviewed at: 041f4ff | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

shouldUseGoBackButton
style={styles.flex1}
/>
<FullScreenLoadingIndicator style={styles.flex1} />

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.

❌ UI-1 (docs)

This FullScreenLoadingIndicator is rendered inside AccessOrNotFoundWrapper, which renders its children with no surrounding navigation. The header/back button only appears in the non-loading (ScreenWrapper) branch, so during the isLoading branch there is no navigation visible. Removing shouldUseGoBackButton traps the user with no escape route if loading hangs. The prop is being migrated to become the default and must be set explicitly for now.

Restore the prop:

<FullScreenLoadingIndicator
    shouldUseGoBackButton
    style={styles.flex1}
/>

Reviewed at: 041f4ff | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@situchan

Copy link
Copy Markdown
Contributor

@codex review

@situchan

Copy link
Copy Markdown
Contributor

@MelvinBot review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 041f4ff314

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@situchan

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 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 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
    • 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
    • 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 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).
  • 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

@melvin-bot
melvin-bot Bot requested a review from Julesssss October 15, 2026 08:01
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Code review

I found no issues. This PR is ready to merge.

  • DynamicForm loader: The new spinner in src/components/DynamicForm/index.tsx:226-228 stays below the header. It no longer adds a second Go Back button. It uses the same flex1 + fullScreenLoading view as LoadingPage, AddressPage, and the BusinessInfo steps. The old loader had no extraLoadingContext or testID, so the swap drops nothing.
  • Prop cleanup: shouldUseGoBackButton already defaults to true in src/components/FullscreenLoadingIndicator.tsx:39. Removing it from the 3 call sites doesn't change their behavior.
  • Test: The new DynamicFormFlow test checks that the header and the plain spinner render and that FullscreenLoadingIndicator doesn't. That covers the fix.

view run

@Julesssss

Copy link
Copy Markdown
Contributor

@situchan conflicts to resolve.

@situchan

Copy link
Copy Markdown
Contributor

@MelvinBot pull main and fix conflict

…derBelowHeader

Co-authored-by: Situ Chandra Shil <[email protected]>

# Conflicts:
#	tests/unit/components/DynamicForm/DynamicFormFlowTest.tsx
@MelvinBot
MelvinBot requested a review from a team as a code owner October 15, 2026 15:52
@melvin-bot
melvin-bot Bot requested review from situchan and removed request for a team October 15, 2026 15:53
@melvin-bot

melvin-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

@situchan 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]

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I merged main into this branch and fixed the conflict. The PR is mergeable again (c716c8d).

The only conflict was the import block in tests/unit/components/DynamicForm/DynamicFormFlowTest.tsx. I kept the imports from both sides: this PR's FullscreenLoadingIndicator and HeaderWithBackButtonAndTitle, and main's new list-field imports. src/components/DynamicForm/index.tsx merged cleanly.

I couldn't run Jest, typecheck, or lint here because this environment blocks the install scripts they need. CI on the new commit will check them.


view run

@trjExpensify

Copy link
Copy Markdown
Contributor

PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself.

@trjExpensify
trjExpensify removed their request for review October 15, 2026 17:01
@Julesssss
Julesssss merged commit 3292d94 into main Oct 16, 2026
43 of 45 checks passed
@Julesssss
Julesssss deleted the claude-dynamicFormLoaderBelowHeader branch October 16, 2026 19:52
@github-actions

Copy link
Copy Markdown
Contributor

🚧 Julesssss has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/Julesssss in version: 9.5.14-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed: this PR changes a loading spinner in a form component no screen uses yet and removes props that matched their defaults, so users see no change.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.5.14-3 🚀

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

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