Skip to content

Add native support for HTML tables in responses - #94926

Merged
mountiny merged 24 commits into
Expensify:mainfrom
dukenv0307:fix/94612
Jul 30, 2026
Merged

mountiny merged 24 commits into
Expensify:mainfrom
dukenv0307:fix/94612

Conversation

@dukenv0307

@dukenv0307 dukenv0307 commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ #94612
PROPOSAL:

Tests

  1. Go to Concierge chat
  2. Ask the question Show my June 2026 expenses sorted by amount
  3. Wait until the concierge responds
  4. Verify the table is shown in this response
  • Verify that no errors appear in the JS console

Offline tests

Same as above

QA Steps

Same as above

  • 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 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 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 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 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 Screenshot 2026-07-14 at 11 19 17 AM

@dukenv0307
dukenv0307 requested a review from luacmartins July 1, 2026 03:35
@dukenv0307

Copy link
Copy Markdown
Contributor Author

it's still on hold

@dukenv0307
dukenv0307 marked this pull request as ready for review July 14, 2026 04:19
@dukenv0307
dukenv0307 requested review from a team as code owners July 14, 2026 04:19
@melvin-bot
melvin-bot Bot requested review from dannymcclain, flaviadefaria and thesahindia and removed request for a team, dannymcclain and thesahindia July 14, 2026 04:20
@melvin-bot

melvin-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

@dannymcclain @thesahindia 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]

@dukenv0307
dukenv0307 requested a review from a team July 14, 2026 04:21
@melvin-bot
melvin-bot Bot requested review from daledah and dannymcclain and removed request for a team July 14, 2026 04:21
@melvin-bot

melvin-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

@dannymcclain @daledah 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]

@codecov

codecov Bot commented Jul 14, 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 Δ
...ents/HTMLEngineProvider/BaseHTMLEngineProvider.tsx 83.11% <100.00%> (+1.42%) ⬆️
...vider/HTMLRenderers/TableColumnAlignmentContext.ts 100.00% <100.00%> (ø)
...Provider/HTMLRenderers/TableContentWidthContext.ts 100.00% <100.00%> (ø)
...mponents/HTMLEngineProvider/HTMLRenderers/index.ts 100.00% <ø> (ø)
src/styles/index.ts 63.00% <ø> (ø)
src/styles/variables.ts 100.00% <ø> (ø)
...ineProvider/HTMLRenderers/TableSectionRenderer.tsx 0.00% <0.00%> (ø)
...c/pages/inbox/report/comment/RenderCommentHTML.tsx 54.54% <44.44%> (-45.46%) ⬇️
...neProvider/HTMLRenderers/HTMLTableScroll/index.tsx 0.00% <0.00%> (ø)
...neProvider/HTMLRenderers/TableChildrenRenderer.tsx 0.00% <0.00%> (ø)
... and 4 more
... and 9 files with indirect coverage changes

@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: 41c8167f3a

ℹ️ 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 thread src/components/HTMLEngineProvider/HTMLRenderers/TableCellRenderer.tsx Outdated
Comment thread src/components/HTMLEngineProvider/HTMLRenderers/TableCellRenderer.tsx Outdated
@dannymcclain

Copy link
Copy Markdown
Contributor

Just don't know of other tables we do this so sticks out a bit to me and wonder if it teaches them that other "non-link" tables are not interactable.

Yeah that's is totally fair. Do you think we should try to do something more like this?
image

cc @shawnborton for thoughts too. I don't think I feel super strongly one way or the other. But this version does feel a bit more in line with our other tables, and even our "simpler" tables like Recently added on Home.

@dukenv0307 is styling the table like that and making the whole row clickable here feasible? Just want to know about any potential technical limitations before committing to something like that.

@shawnborton

Copy link
Copy Markdown
Contributor

I think that looks great and it would be awesome if we could pull it off.

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@shawnborton @dannymcclain it's quite complex to update the behavior above, I think we should merge this one first since it'll fix the issue here. I'll create a new issue and work on it

@dannymcclain

Copy link
Copy Markdown
Contributor

I think we should merge this one first since it'll fix the issue #94926 (comment). I'll create a new issue and work on it

Sounds good to me. We can improve this iteratively.

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@MelvinBot Please create a new issue to fix #94926 (comment) and assign me

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Created the follow-up issue and assigned you: #97247

It tracks styling the Concierge HTML table more in line with our other tables and making the whole row clickable (per this discussion), to be done iteratively after this PR merges.

@dukenv0307

Copy link
Copy Markdown
Contributor Author

All yours @luacmartins

@rushatgabhane

Copy link
Copy Markdown
Member

@dukenv0307 please add qa steps and merge main

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@rushatgabhane Done

@mountiny
mountiny requested review from Copilot and mountiny July 30, 2026 16:50

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mountiny

Copy link
Copy Markdown
Contributor

@dannymcclain Does this look good from design perspective?

@dannymcclain

Copy link
Copy Markdown
Contributor

Yes, looking good here 👍

And we'll follow up to make it even better

@mountiny mountiny 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.

Code looks good to me, though it would be great to consider adding unit tests for these as well, can you explore that please and create a follow up as well @dukenv0307 ? thanks

@mountiny
mountiny merged commit 2d2ebf4 into Expensify:main Jul 30, 2026
34 checks passed
@OSBotify

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.

@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify OSBotify mentioned this pull request Jul 31, 2026
67 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.47-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 I reviewed the changes in this PR against Expensify's help site content under docs/articles.

No help site changes are required.

This PR adds native rendering support for HTML tables in chat/Concierge responses (issue #94612) — tabular content now displays as a properly formatted, styled table instead of raw/unstyled markup. All changes are frontend rendering components (HTMLEngineProvider table renderers, styles, and variables).

This is a purely visual/presentational improvement:

  • It doesn't add or change any user-facing feature, setting, tab, button, or workflow that a user acts on.
  • There's no new feature name, capitalization, or UI label to document.
  • No existing help article documents how tables render inside chat/Concierge responses, so there's nothing to update.

Because there's no user-facing behavior change to document, I did not create a draft help site PR. If you believe a specific article should be updated (e.g., to mention table-formatted responses somewhere), let me know which one and I'll draft it.

@OSBotify

OSBotify commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.47-7 🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.