Skip to content

Fix submissions thread headers - #98334

Draft
stitesExpensify wants to merge 1 commit into
mainfrom
stites-fixDisabledSubmissionsThreadNameSigned
Draft

Fix submissions thread headers#98334
stitesExpensify wants to merge 1 commit into
mainfrom
stites-fixDisabledSubmissionsThreadNameSigned

Conversation

@stitesExpensify

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds the missing UPDATE_AUTO_HARVESTING report-action handler to report-name computation. Thread headers now reuse the existing localized message helper used by the in-chat message and LHN preview, so disabling Submissions displays disabled submissions consistently.

The root cause was that computeReportNameBasedOnReportAction did not handle this action type and admin-room thread names fell through to the raw backend text, turned Scheduled Submit off.

Fixed Issues

$ #98202
PROPOSAL: #98202 (comment)

Tests

  1. Run npm test -- tests/unit/ReportNameUtilsTest.ts --runInBand.
  2. As an admin, open Workspace settings > Workflows and disable Submissions.
  3. Open the workspace admins room and reply in the disabled submissions system message thread.
  4. Verify the thread header and LHN preview both show disabled submissions.
  5. Enable Submissions and verify the corresponding message and thread header show enabled submissions.

The local automated test run was attempted but was blocked by the existing shared dependency setup: the checkout's available dependencies are from an older App revision and are missing the Babel module path required by this origin/main revision.

  • Verify that no errors appear in the JS console

Offline tests

N/A. This change only computes a localized name from report-action data already available in the client and does not add network behavior.

QA Steps

  1. In staging, open Workspace settings > Workflows for a workspace where you are an admin.
  2. Disable Submissions.
  3. Open the workspace admins room and open the thread for the disabled-submissions system message.
  4. Verify the thread header, parent message, and LHN preview use the same disabled submissions wording.
  5. Re-enable Submissions and verify the corresponding enabled wording.
  6. Confirm the app remains usable when the action data is incomplete and the existing raw-message fallback is used.
  • 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 (the existing helper fallback is preserved)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior
    • I tested this PR with a High Traffic account against the staging or production API
  • 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
  • I followed proper code patterns and the review agent found no P1 or P2 issues
    • No new comments were needed for this localized handler
    • No new copy was added; the existing approved translation is reused
  • 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
  • No new CSS styles or assets were added
  • The change does not modify message editing, markdown handling, generic components, Storybook stories, or deeplinks
  • I added a unit test for this bug fix
  • The branch was created from the latest origin/main

Screenshots/Videos

Android: Native

N/A. Logic-only change.

Android: mWeb Chrome

QA steps above.

iOS: Native

N/A. Logic-only change.

iOS: mWeb Safari

N/A. Logic-only change.

MacOS: Chrome / Safari

QA steps above.

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.

1 participant