Conversation
…rkspaces Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
A preview of your ExpensifyHelp changes have been deployed to https://d311299e.helpdot.pages.dev ⚡️ Updated articles: |
|
@MelvinBot Mark this pR as ready |
Concierge reviewer checklist:
For more detailed instructions on completing this checklist, see How do I review a HelpDot PR as a Concierge Team member? |
|
🤖 Done — this PR is now ready for review. Two things still need your edit before a reviewer signs off:
Checks are green except |
|
@truph01 @brianlee-expensify One of you needs to 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] |
|
HelpDot Documentation Review Overall Assessment Scores Summary
Key Findings
Recommendations
Files Reviewed
Note: Detailed line-by-line feedback has been provided as inline comments. |
Explanation of Change
Help site follow-up to [No QA] Add getRateForPolicyChange to select a distance rate when the policy changes. Reviewing that PR surfaced that the FAQ in
Distance-Expenses.mddescribes distance-rate behavior that the app does not have — and has not had for some time. These inaccuracies are pre-existing and are not caused by that PR, which added an unwired helper.Two corrections, both verified against code on
main:1. "What happens if a Distance expense is moved to a different Workspace?" was wrong for expense-level moves.
The article said a moved expense always "keeps its original unit and rate." That is only true for one of the two move flows:
getChangeTransactionsReportOnyxDataauto-selects the destination policy's default rate when the current rate is missing, absent from the destination, or disabled — then converts the unit and quantity and recomputes amount, merchant, and currency (src/libs/actions/Transaction.ts:1267-1366). A committed test asserts exactly this: a 10-mile USD expense adopts the destination's GBP rate (tests/actions/TransactionTest.ts:453-540).changeReportPolicy/moveIOUReportToPolicynever touchcustomUnitRateID— there are no rate orDistanceRequestUtilsreferences anywhere insrc/libs/actions/Report/.The rewritten answer separates the two flows and keeps the
Rate not valid for this workspaceviolation on the case that actually produces it client-side: a destination workspace with no enabled distance rates (src/libs/Violations/ViolationsUtils.ts:644-682).2. "Can I update the Distance expense unit or rate?" contradicted itself.
It claimed "It is not possible to adjust the distance rate or unit at the expense level," while the next FAQ answer told users to select a valid rate on the expense. The rate is editable:
DISTANCE_RATEis editable on expense reports and unreported distance expenses (src/libs/ReportUtils.ts:5461-5464), and the Rate row renders interactive (src/components/ReportActionItem/MoneyRequestView.tsx:1041-1045). Only the unit is admin-controlled. The answer now says that.I also added move- and rate-editing keywords to the front matter for retrieval, per section 6 of the authoring spec.
Scope note. This documents behavior shipping on
maintoday. When F3 and F4 of [Tracking] Auto-select distance rate on workspace change (frontend) wire upgetRateForPolicyChange, the expense-level paragraph will need a further update, because selection becomes date-aware and prefers an equivalent rate before falling back to the default.Guidelines applied
docs/HELP_AUTHORING_GUIDELINES.md— no new headings added, so the existing task-based##FAQ headings and the single#title are untouched. Added keywords per section 6.docs/HELPSITE_NAMING_CONVENTIONS.md— Rate is bolded and unquoted, matching the UI label exactly.docs/TEMPLATE.md— no structural change; this edits FAQ answers in an existing article rather than creating one.UI label verification. The live-UI check could not run: the browser session handed to this run was dead (0 accessibility nodes, no network activity), which is an infrastructure failure rather than an app bug. I verified every label against
src/languages/en.tsinstead, which is the source of the rendered strings:en.ts:382(common.rate)MoneyRequestView.tsx:1041Rate not valid for this workspaceen.ts:10414(violations.customUnitOutOfPolicy)MoneyRequestView.tsx:1222Please re-confirm the Rate row label in the product when you review, since I could not see it rendered.
Fixed Issues
$ #100557
PROPOSAL:
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".
// Note: this PR changes help site markdown only, so there is no app behavior to test. What needs confirming is that the two rewritten FAQ answers match what the product actually does — see the checks below.
Suggested verification:
Rate not valid for this workspaceviolation.Offline tests
Not applicable — this PR changes help site markdown only and has no runtime or network behavior.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review", or add "[No QA]" to the PR title.
// Note: help site markdown only — no app surface changes, so this is a likely "[No QA]" candidate.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.AI Tests
npm run spell-changed(cspell — CI merge gate)./.github/scripts/createDocsRoutes.shdocs/routes.ymlalready up to datenpm run lint/npm run typecheck/npm testnpm run storybook -- --smoke-test --cisrc/languages/en.tsinstead; see the collapsed section aboveScreenshots/Videos
This PR changes help site markdown only, so there is no UI change to capture.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
@truph01, please review the files changed and confirm they reflect the current behavior. Then post a new comment saying
@MelvinBot mark this PR as ready for review.