Skip to content

[Due for payment 2026-01-21] [$125] Dev: Company Cards – Hydration error when opening the Company Cards list page #78536

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number:
Reproducible in staging?: Needs Reproduction (Reproduction blocked)
Reproducible in production?: Needs Reproduction
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @nyomanjyotisa
Slack conversation (hyperlinked to channel name): #Open source

Action Performed:

Precondition:

  • Workspace is connected with Company Cards
  • Assign at least one card to a user, then unassign the card
  1. Go to Workspace Settings → Company Cards
  2. Observe the console errors

Expected Result:

No hydration errors appear in the console

Actual Result:

Errors appear in the console

  • In HTML, cannot be a descendant of . This will cause a hydration error.
  • cannot contain a nested .

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

MacOS-Chrome.mov

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 29, 2025
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 29, 2025
  3. melvin-bot commented on Dec 29, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (External)

  4. melvin-bot commented on Dec 29, 2025

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. MelvinBot commented on Dec 29, 2025

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  6. situchan commented on Dec 29, 2025

    @situchan
    Contributor

    Reproduced in dev following repro step in OP. Can take as C+ as per https://expensify.slack.com/archives/C02NK2DQWUX/p1767022055843829

    Image
  7. mohammadjafarinejad commented on Dec 29, 2025

    @mohammadjafarinejad
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Hydration error occurs when opening the Company Cards list page due to nested buttons in the HTML.

    What is the root cause of that problem?

    React Native Web renders Pressable with role="button" as <button> elements on web. We have nested pressables creating invalid HTML:

    <PressableWithFeedback
    role={CONST.ROLE.BUTTON}

    <Button
    success
    small={shouldUseNarrowTableLayout}
    text={translate('workspace.companyCards.assign')}
    onPress={assignCard}
    isDisabled={isAssigningCardDisabled}
    />
    )}

    What changes do you think we should make in order to solve the problem?

    Add isNested prop to nested button:

    <Button
    success
    small={shouldUseNarrowTableLayout}
    text={translate('workspace.companyCards.assign')}
    onPress={assignCard}
    isDisabled={isAssigningCardDisabled}
    />
    )}

    • We can check for other places and update them as well
    • We can also use e?.stopPropagation?.(); on the nested button.

    What alternative solutions did you explore? (Optional)

    None

  8. yatin-italy commented on Dec 30, 2025

    @yatin-italy

    🚨 Edited by proposal-police: This proposal was edited at 2025-12-30 14:26:10 UTC.

    Here’s the updated proposal with the alternative solutions section added, still fully compliant with “do not post code diffs” and keeping Expensify style:


    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    In the Company Cards table, unassigned card rows are rendered as clickable rows while also containing an inner Assign button. This creates nested interactive elements, which violates HTML rules and results in validateDOMNesting and hydration errors in the console.

    What is the root cause of that problem?

    Both the table row and the Assign control are treated as interactive elements. Since the row already handles the assign action, rendering the inner button as a semantic button creates an invalid nested structure.

    What changes do you think we should make in order to solve the problem?

    Render the Assign control as semantically non-interactive when it is nested inside a clickable row, allowing the row to remain the sole interactive element while keeping the button visually intact.

    What alternative solutions did you explore? (Optional)

    • Wrapping the row in a non-interactive container instead of the button — rejected because it would break accessibility and existing click behavior.
    • Removing the inner button entirely — rejected because it would remove a clear visual cue for the user.
  9. github-actions commented on Dec 30, 2025

    @github-actions
    Contributor

    ⚠️ @yatin-italy Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  10. 41 remaining items

  11. melvin-bot commented on Jan 14, 2026

    @melvin-bot

    @situchan @mallenexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  12. mallenexpensify commented on Jan 23, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @nyomanjyotisa paid $125 via Upwork
    Contributor+: @situchan paid $125 via Upwork.

    Both, can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022014836349864139218

  13. mallenexpensify commented on Jan 26, 2026

    @mallenexpensify
    Contributor

    @nyomanjyotisa paid $125 (I originally posted $250 above and changed that)
    @situchan 👀 plz above so I can pay

  14. melvin-bot commented on Jan 30, 2026

    @melvin-bot

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  15. mallenexpensify commented on Jan 31, 2026

    @mallenexpensify
    Contributor

    @situchan paid, summary updated above.

    Thx!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNeeds ReproductionReproducible steps needed

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions