Skip to content

Fix: Join button missing in thread when parent report is loading#82608

Closed
yuzebin wants to merge 1 commit intoExpensify:mainfrom
yuzebin:fix/join-button-thread-75264
Closed

Fix: Join button missing in thread when parent report is loading#82608
yuzebin wants to merge 1 commit intoExpensify:mainfrom
yuzebin:fix/join-button-thread-75264

Conversation

@yuzebin
Copy link

@yuzebin yuzebin commented Feb 17, 2026

Problem

When User B opens a thread created by User A, the Join button doesn't appear if the parent report is still loading from Onyx.

Root Cause

The Join button display condition included !isParentReportLoading\ which blocked the button when parentReport was loading. However, the \canJoin\ check already contains all necessary logic to determine if the button should be shown.

Solution

Removed the unnecessary !isParentReportLoading

Removed unnecessary isParentReportLoading condition from Join button display logic.
The canJoin check already handles all necessary conditions for displaying the button.

Fixes Expensify#75264
@yuzebin yuzebin requested review from a team as code owners February 17, 2026 02:43
@melvin-bot melvin-bot bot requested review from joekaufmanexpensify and removed request for a team February 17, 2026 02:43
@github-actions
Copy link
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


Zebin Yu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@melvin-bot melvin-bot bot requested a review from inimaga February 17, 2026 02:43
@melvin-bot
Copy link

melvin-bot bot commented Feb 17, 2026

@inimaga 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 removed the request for review from a team February 17, 2026 02:43
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9dd9d61621

ℹ️ 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".

)}
{!shouldUseNarrowLayout && isOpenTaskReport(report, parentReportAction) && <TaskHeaderActionButton report={report} />}
{!isParentReportLoading && canJoin && !shouldUseNarrowLayout && joinButton}
{canJoin && !shouldUseNarrowLayout && joinButton}

Choose a reason for hiding this comment

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

P2 Badge Restore parent-load guard before rendering Join button

Removing the !isParentReportLoading gate makes Join visible while parent data is still unresolved, but canJoinChat() is not parent-independent: it only filters track-expense threads via isTrackExpenseReportNew(report, parentReport, parentReportAction), which returns false when parentReport is still missing, causing canJoinChat to fall through to isChatThread(report) and temporarily allow join on threads that should never be joinable. In direct-link/loading scenarios this can surface an incorrect Join action and allow users to trigger joinRoom before the parent report arrives.

Useful? React with 👍 / 👎.

@yuzebin
Copy link
Author

yuzebin commented Feb 17, 2026

I have read the CLA Document and I hereby sign the CLA

@joekaufmanexpensify
Copy link
Contributor

@yuzebin We only accept PRs when a contributor has been specifically hired for a job. Please review our contributing guidelines for more details. I don't see that you were hired for a job related to this PR, so I am going to close it. Let me know if you have any questions.

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.

2 participants