Skip to content

Docs updates for E/A#99747 signed Amount sorting and Total spend netting - #100900

Open
MelvinBot wants to merge 1 commit into
mainfrom
claude-docsSpendPageSignedAmounts
Open

Docs updates for E/A#99747 signed Amount sorting and Total spend netting#100900
MelvinBot wants to merge 1 commit into
mainfrom
claude-docsSpendPageSignedAmounts

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

Documents the two user-visible behaviors that #99747 fixed on the Spend page, in docs/articles/new-expensify/reports-and-expenses/Getting-Started-with-the-Spend-Page.md:

  1. Amount column sorting. Before that PR, the Amount column's sort key dropped the sign for credits and refunds, so a -$4,000 credit sorted among the +$4,000 expenses. It now sorts by the signed value each row displays. Two new sections cover how to sort the column and where negative amounts land in the order, because "why is this credit in the middle of my positive expenses" is a natural search and the article had no sorting content at all.

  2. Total spend netting. Before that PR, the selection footer summed magnitudes, so selecting a +$100 expense and a -$100 credit reported $200. It now nets them to $0.00. The existing "What the total spend footer shows" section described what the total covers but not how credits behave in it, so one clarifying sentence with a worked example was added there.

No existing sentence was factually wrong before this change, so this is a gap-filling clarification rather than a correction. Nothing else in docs/articles referenced Amount-column sorting or the footer's handling of negative amounts.

Authoring notes:

  • Written against docs/HELP_AUTHORING_GUIDELINES.md, docs/HELPSITE_NAMING_CONVENTIONS.md, and docs/TEMPLATE.md: task-based ## headings starting with a question word, bolded UI labels in Sentence case, no new ### or # headings, no screenshot placeholders (the surrounding text is sufficient and a screenshot would just mirror it).
  • UI labels were verified rather than assumed. Spend, Expenses, and Reports were confirmed on dev NewDot web. Total spend is common.totalSpend and renders in the footer via SearchPageFooter. The Amount column header resolves to iou.amount (Amount), and to common.total (Total) when results are grouped — that fallback is called out in the article. Click-to-sort and click-again-to-reverse match SortableHeaderText, where the first press sets descending order.
  • The article already contains pre-existing deviations from the guidelines (multiple # headings, ### subheadings, no internalScope). I left those alone to keep this diff scoped to the behavior change; restructuring the article is separate work.
  • npm run spell-changed passes on the changed file.

Fixed Issues

$ #99918
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

N/A — this PR only changes help site markdown under docs/articles.

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 followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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 followed the guidelines as stated in the Review Guidelines
  • 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 a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • 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.
  • 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

@BartekObudzinski, 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.

…pend page

Co-authored-by: Bartłomiej Obudziński <BartekObudzinski@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team September 10, 2026 23:00
@MelvinBot MelvinBot added the HelpDot Apply this label if the issue relates to ExpensifyHelp label Sep 10, 2026
@BartekObudzinski

Copy link
Copy Markdown
Contributor

@MelvinBot mark this PR as ready for review

@MelvinBot
MelvinBot marked this pull request as ready for review September 11, 2026 09:24
@melvin-bot

melvin-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

Concierge reviewer checklist:

  • I have verified the accuracy of the article
    • The article is within a hub that makes sense, and the navigation is correct
    • All processes, screenshots, and examples align with current product behavior.
    • All links within the doc have been verified for correct destination and functionality.
  • I have verified the readability of the article
    • The article's language is clear, concise, and free of jargon.
    • The grammar, spelling, and punctuation are correct.
    • The article contains at least one image, or that an image is not necessary
  • I have verified the formatting of the article
    • The article has consistent formatting (headings, bullet points, etc.) with other HelpDot articles and that aligns with the HelpDot formatting standards.
    • The article has proper text spacing and breaks for readability.
  • I have verified the article has the appropriate tone and style
    • The article's tone is professional, friendly, and suitable for the target audience.
    • The article's tone, terminology, and voice are consistent throughout.
  • I have verified the overall quality of the article
    • The article is not missing any information, nor does it contain redundant information.
    • The article fully addresses user needs.
  • I have verified that all requested improvements have been addressed

For more detailed instructions on completing this checklist, see How do I review a HelpDot PR as a Concierge Team member?

cc @twisterdotcom

@melvin-bot
melvin-bot Bot requested review from twisterdotcom and removed request for a team September 11, 2026 09:24
@melvin-bot

melvin-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

@twisterdotcom 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

Done — this PR is now Ready for review. PullerBear picked it up and requested stephanieelliott as reviewer.

⚠️ Two things still need you before a reviewer can sign off:

  1. The Tests and QA Steps sections still contain the // TODO: **The human co-author** must fill out... placeholders. I can't fill those in on your behalf — they have to reflect what a person actually ran. Since this is a docs-only change to docs/articles/new-expensify/reports-and-expenses/Getting-Started-with-the-Spend-Page.md, "N/A — help site markdown only" is likely all that's needed, but that's your call to write.
  2. The PR Author Checklist boxes are unchecked apart from the linked-issue one.

I could not verify anything in a browser on this run — the web test environment failed to come up — so the article's claims rest on the static analysis recorded in the PR description, not a live check of the Spend page.

Checks are green except Check independent approval, which is expected to resolve once a reviewer approves.


view run

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

Copy link
Copy Markdown

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: b55322d7bf

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

Comment on lines +132 to +133
2. Click the **Amount** column header to sort from largest to smallest.
3. Click the **Amount** column header again to reverse the order.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the mobile and narrow-layout sorting path

On mobile and medium-width layouts, these steps cannot be followed because SearchTableHeader returns without rendering any column headers (src/components/Search/SearchTableHeader.tsx:573-619). Sorting remains available through the Display menu's Sort by and Sort order controls, so label the current instructions as the large-screen web flow and add the distinct narrow/mobile flow; otherwise those users are told to click an Amount header that does not exist.

Useful? React with 👍 / 👎.

@twisterdotcom

Copy link
Copy Markdown
Contributor

please address the codex comments @BartekObudzinski

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.

Run details

@BartekObudzinski

Copy link
Copy Markdown
Contributor

@MelvinBot please apply this to docs/articles/new-expensify/reports-and-expenses/Getting-Started-with-the-Spend-Page.md. I can't push to this branch myself, it lives on Expensify/App and I only have read access there.

Codex is right about the sorting steps. SearchTableHeader returns early when isMediumScreenWidth || isSmallScreenWidth (src/components/Search/SearchTableHeader.tsx:617-619), so there is no Amount column header to click on mobile or in a narrow browser window. Note it is width based, not web versus mobile, since a narrow browser window has no headers either.

On narrow layouts the sort lives behind the Display icon. SearchActionsBarNarrow renders SearchDisplayDropdownButton, which on small and medium widths is an Eye icon with the accessibility label Display. DisplayPopup shows a Sort by row that opens SortByPopup, and that screen holds both the Sort order field and the column list, each with its own Reset and Apply buttons.

One thing worth getting right in the steps: Sort by and Sort order apply separately. SortOrderPopup builds its query from {...queryJSON, sortOrder} and then calls closeOverlay, so if you pick Amount and walk into Sort order without tapping Apply first, the Amount choice is dropped. So the steps apply Amount first and change the direction in a second pass.

Replace this block:

## How to sort the Amount column on the Spend page

1. On the **Spend** page, select **Expenses**.
2. Click the **Amount** column header to sort from largest to smallest.
3. Click the **Amount** column header again to reverse the order.

The **Amount** column header is only available when your results are shown as a table. When you group your results, this column header reads **Total** instead of **Amount**.

with this:

## How to sort the Amount column on the Spend page

On a wide screen:

1. On the **Spend** page, select **Expenses**.
2. Click the **Amount** column header to sort from largest to smallest.
3. Click the **Amount** column header again to reverse the order.

On mobile, or in a narrow browser window, the column headers aren't shown, so sort from the **Display** menu instead:

1. On the **Spend** page, select **Expenses**.
2. Tap the **Display** icon.
3. Tap **Sort by**, select **Amount**, then tap **Apply**.
4. To change the direction, tap the **Display** icon again, tap **Sort by**, tap **Sort order**, select **Descending** (largest to smallest) or **Ascending** (smallest to largest), then tap **Apply**.

The **Amount** column is only sortable when your results are shown as a table. When you group your results, this column reads **Total** instead of **Amount**.

The last paragraph changes from "column header is only available" to "column is only sortable", because the narrow path has no header but the column is still sortable there.

npm run spell-changed passes on the file with this text.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ A setup step failed before I could start. This is usually a temporary issue — try again in a few minutes, and if it persists post in #melvinbot-ai.

Run details

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

Labels

HelpDot Apply this label if the issue relates to ExpensifyHelp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants