Skip to content

fix: follow-up #100567 - #103166

Merged
JS00001 merged 17 commits into
Expensify:mainfrom
ahmedGaber93:100567-follow-up
Oct 8, 2026
Merged

JS00001 merged 17 commits into
Expensify:mainfrom
ahmedGaber93:100567-follow-up

Conversation

@ahmedGaber93

@ahmedGaber93 ahmedGaber93 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Distance rates, per diem amounts, and card limits share this cell, and the symbol was flush against the amount for formats such as "CZK 100.00".

Explanation of Change

Fixed Issues

$ #103108
$ #103110
$ #103154
$ #103150
$ #103128
$ #103127
$ #103223
PROPOSAL:

Tests

Precondition:

  • You have a workspace with a currency that has a space between the symbol and the amount, e.g. CZK or EGP
  • You have distance rates on
  1. Open the App
  2. Go to workspace settings > Distance rates
  3. Inline edit a rate
  4. Verify there is spacing between the currency and the amount
  1. Open the App
  2. Go to workspace settings > Members
  3. Invite a non-existing user
  4. Hover over the Role field
  5. Verify the Role field can be inline edited immediately
  6. Go offline
  7. Invite a non-existing user
  8. Hover over the Role field
  9. Verify the Role field can be inline edited
  1. Open the App
  2. Go to workspace settings > Categories
  3. Add a category
  4. Open the category
  5. Click Name
  6. Edit the name to </> and save it
  7. Verify an invalid character error is shown and it cannot be saved
  8. Close the RHP
  9. Inline edit the name to </>
  10. Verify the invalid character cannot be saved

Precondition:

  • You have Expensify Card enabled, and a card issued to yourself
  1. Open the App
  2. Go to workspace settings > Expensify Card
  3. Freeze any card
  4. Verify the gap between the card name and the freeze message is not bigger than on production
  5. Verify that the Expensify card name is not editable on all rows, as we temporarily removed this feature.

Precondition:

  • You have Expensify Card enabled, and a card issued to yourself
  • You have approvals disabled in Workflows > Approval
  1. Open the App
  2. Go to workspace settings > Expensify Card
  3. Inline edit the limit type
  4. Verify the limit type pop-over does not scroll down

Precondition:

  • You have Expensify Card enabled, and a card issued to yourself
  1. Open the App
  2. Go to workspace settings > Expensify Card
  3. Inline edit the card limit
  4. Enter 0 and press Enter
  5. Verify the card limit field shows 0 when the confirmation pop-up appears

Precondition:

  • Enable Distance rates.
  1. Go to workspace settings > Distance rates.
  2. Inline edit the amount.
  3. Clear the field quickly and re-enter the amount.
  4. Verify amount will not flicker when entering amount.
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests step

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

Same as Tests step

  • 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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
Screen.Recording.2026-10-06.at.1.52.36.PM.mov
Screen.Recording.2026-10-06.at.2.02.11.PM.mov
Screen.Recording.2026-10-06.at.3.18.43.PM.mov
Screen.Recording.2026-10-06.at.1.51.31.PM.mov
Screen.Recording.2026-10-06.at.3.52.20.PM.mov
Screen.Recording.2026-10-06.at.3.45.13.PM.mov
Screen.Recording.2026-10-07.at.5.11.36.AM.mov

Distance rates, per diem amounts, and card limits share this cell, and the symbol was flush against the amount for formats such as "CZK 100.00".
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/components/AmountTextInput.tsx 100.00% <ø> (ø)
src/components/EditableCell/useInlineEditState.ts 100.00% <100.00%> (ø)
src/components/NumberWithSymbolForm.tsx 94.35% <ø> (ø)
...onents/Tables/WorkspaceCompanyCardsTable/index.tsx 78.60% <ø> (ø)
...sifyCardsTable/WorkspaceExpensifyCardsTableRow.tsx 0.00% <ø> (ø)
...ents/Tables/WorkspaceExpensifyCardsTable/index.tsx 76.74% <ø> (ø)
.../components/Tables/WorkspaceMembersTable/index.tsx 54.54% <ø> (ø)
...ponents/TransactionItemRow/DataCells/TotalCell.tsx 90.76% <100.00%> (-0.28%) ⬇️
src/libs/CardUtils.ts 87.63% <100.00%> (+0.08%) ⬆️
src/libs/CategoryUtils.ts 75.59% <100.00%> (+0.39%) ⬆️
... and 14 more
... and 456 files with indirect coverage changes

@ahmedGaber93 ahmedGaber93 changed the title Pad inline number editors when the currency format includes a space. fix: follow-up #100567 Oct 6, 2026
@ahmedGaber93
ahmedGaber93 marked this pull request as ready for review October 6, 2026 13:28
@ahmedGaber93
ahmedGaber93 requested review from a team as code owners October 6, 2026 13:28
@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and Krishna2323 and removed request for a team October 6, 2026 13:28
@melvin-bot

melvin-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

@Krishna2323 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 October 6, 2026 13:28
@ahmedGaber93

Copy link
Copy Markdown
Contributor Author

@codex review

@ahmedGaber93

Copy link
Copy Markdown
Contributor Author

The Codex review doesn’t seem to be working.

@MelvinBot please review.

@MelvinBot

Copy link
Copy Markdown
Contributor

I reviewed the PR and found one UX issue worth fixing and one minor robustness nit. Everything else looks correct, and CI is green apart from the approval check.

1. If the user cancels the limit confirm, the modal comes back on every blur.
When the user cancels, changeCardLimit returns false (WorkspaceExpensifyCardListPage.tsx:224). keepEditing then resets hasEndedRef and puts focus back in the input (useInlineEditState.ts:79). If the user then clicks anywhere else, the input blurs and save runs. The value is still 0, so the same confirm modal opens again. To get out, the user has to press Escape or type the original limit back in. Touch users have no Escape key.

Expensify Card - Card limit field reverts to original amount when confirmation pop-up appears only asks for the typed value to stay visible while the modal is open, and isAwaitingConfirm already does that. Suggestion: when the user cancels, call closeEditing() so the field reverts. Keep return false only for callers that really need the editor to stay open.

2. Nit: the promise callbacks can use an out-of-date value.
closeEditing uses the value from the render where save ran (useInlineEditState.ts:40-43). Suppose value changes while the modal is open, for example from a Pusher update. After confirm, localValue is reset to the old value, and the prevValue check won't fix it. If the user then opens the editor and saves without typing, onSave gets that old value. Reading value from a ref in closeEditing avoids this.

Checked and fine
  • Categories: INVALID is already in the CategoryNameError union and handled by getCategoryNameErrorMessage, so the create and edit forms show the right error.
  • Members: updateWorkspaceMembersRole sends emails, not accountIDs. Removing the isOptimisticPersonalDetail check is safe for pending invites, and the request queues behind the invite.
  • Expensify Card: removing the name editing leaves nothing behind. updateExpensifyCardTitle is still used by DynamicExpensifyCardNamePage.
  • Currency spacing: hasSpaceBetweenSymbolAndAmount matches the old logic in TotalCell. Both cells use PREFIX, so pr1 is on the correct side.
  • Escape key: Escape is turned off while the confirm modal is open, and the second save from the modal's blur is ignored. Both behave as intended, and tests cover them.

view run

Comment thread src/libs/CategoryUtils.ts
Comment thread src/components/EditableCell/useInlineEditState.ts
result.then(
(shouldClose) => {
if (shouldClose === false) {
keepEditing();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After declining, the editor stays open with the typed value, so the next blur re-triggers save and reopens the same modal. Is Escape meant to be the only exit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed! After declining, we’ll cancel editing and revert to the current value.

Screen.Recording.2026-10-06.at.7.19.50.PM.mov

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the editor staying open after a cancelled confirm modal on d2b6e9f.

Comment thread src/pages/workspace/WorkspaceMembersPage.tsx
Comment thread src/components/WorkspaceExpensifyCardLimitTypePickerModal.tsx
Comment thread src/components/EditableCell/useInlineEditState.ts Outdated
Overwriting the buffer made the next blur read the edit as unchanged and drop it. The RHP forms already ignore defaultValue once the user types, so the table cells were the odd ones out. The cell catches up to the newer value once editing closes.
@Krishna2323

Krishna2323 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • 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 verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
part_1.mp4
part_2.mp4
part_3.mp4

Comment thread src/components/EditableCell/useInlineEditState.ts Outdated
… already bails when the callback is missing.
@ahmedGaber93

Copy link
Copy Markdown
Contributor Author

heads up, I think #100567 introduced a column-width regression in the Members table: Role renders Workspace ad….

Working on it.

@ahmedGaber93

Copy link
Copy Markdown
Contributor Author

One question: editableCellEditButton is 28px and absolutely positioned over the text on hover. Should we reserve space for it too, or is the overlap intentional?

I’d keep it as is for now. It looks the same on Spend, and we already have a follow-up for inline errors and the Expensify card name. Let’s address all of these together with the design team since they’re related design decisions.

@ahmedGaber93

Copy link
Copy Markdown
Contributor Author

Fixed!

Screen.Recording.2026-10-08.at.11.24.36.AM.mov
Screen.Recording.2026-10-08.at.11.17.17.AM.mov

@JS00001 JS00001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, @Krishna2323 do you want to d a final review of the new changes?

@Krishna2323 Krishna2323 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Still works well! :shipit:

Monosnap.screencast.2026-10-08.18-14-15.mp4

@melvin-bot
melvin-bot Bot requested a review from JS00001 October 8, 2026 12:46
@JS00001
JS00001 merged commit 37d34a0 into Expensify:main Oct 8, 2026
36 of 37 checks passed
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify OSBotify mentioned this pull request Oct 8, 2026
90 tasks done
@OSBotify

OSBotify commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.6-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. This PR fixes inline-editing bugs in workspace tables, such as currency spacing, invalid-character checks, and limit pop-ups. It also removes inline card-name editing from the Expensify Card table, but no article describes that. Set up and manage the Expensify Card says to click a card to change its Card name, and that still works.


view run

@OSBotify

OSBotify commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.6-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

6 participants