You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-07-28] Top Employees by Spend chart height should adapt to the number of results #95434
Version Number: v9.4.28-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@shawnborton Slack conversation (hyperlinked to channel name): #Concierge AI
Action Performed:
Prerequisite: Workspace with two employees and each have approved expenses
Navigate to Concierge chat
Ask a question "Top Employees by Spend"
Observe the chart height and spacing in Concierge response
Expected Result:
The chart height adjusts dynamically based on the number of employees displayed.
The spacing between rows remains consistent with charts containing more employees.
The labels on the left axis are positioned closer to the chart for better readability.
The chart maintains a balanced appearance regardless of the number of results.
Actual Result:
The chart uses a fixed height even when only two employees are displayed.
Excessive empty space makes the chart feel oversized.
The employee names on the left axis are farther from the bars than necessary.
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Root Cause: The chart's height is a fixed value baked into the HTML that the backend (Concierge) generates, not something App computes from the number of employees. App's VictoryChartRenderer reads the height straight off the incoming <victorychart> HTML attribute at parseStyles.ts:16 and renders at that height. The only dynamic adjustment App makes is a width‑based uniform scale (computeChartScale.ts:9) that shrinks the whole chart to fit the container width while preserving aspect ratio — it never adapts height to the number of bars. So with only 2 employees, the backend's constant height is rendered unchanged, leaving the excess empty space and the far‑apart axis labels shown in the screenshots.
Where the fix belongs: This is an internal/backend fix — the App repo is not the source of the height value. The service that authors the Concierge "Top Employees by Spend" chart HTML needs to emit a height (and padding/domain) proportional to the number of rows, rather than a fixed value. This matches the issue's existing Internal label. An internal engineer with access to the backend that generates these charts should own the change; there is no code change to make in Expensify/App for this.
Investigation details & evidence
Data flow (all confirmed in App):
Backend/Concierge emits report‑action HTML containing <victorychart height="…" width="…">…</victorychart> (App never generates these tags — they appear only in the renderer/parser directory and the one renderer registration in HTMLRenderers/index.ts).
parseStyles.ts:16 reads tnode.attributes.height → nodeStyles.height (verbatim, no computation involving data/categories).
computeChartScale.ts:9: Math.min(availableWidth / designWidth, 1) — horizontal fit, capped at 1. Final container height = designHeight × scale.
Alternative considered (frontend override): App could be changed to derive height from the parsed category count (processedResult.categories.length is available to the renderer) and override the backend value. However, that would fight the backend's intended width/height aspect‑ratio contract and duplicate sizing logic that the chart‑authoring service already owns — so the backend is the correct place to fix the root cause. There is currently no per‑category height logic anywhere in the App renderer.
Confidence: High. Two independent code investigations agree: the height is backend‑supplied via the HTML attribute, and App only scales uniformly by width. Optional confirmation would be to pull the raw report‑action HTML for an affected message and verify a constant height= value regardless of row count.
Related issues (not duplicates):Expensify/App#94613 — "Top categories donut chart labels overlap" is a separate Concierge/Insights chart‑layout bug worth tracking alongside this one.
Next Steps: This requires a backend change by an internal engineer (keeping the Internal label). Reply with @MelvinBot <your feedback> to refine this analysis.
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: new feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
@situchan paid, summary updated above. Thx. By default, reviewing multiple PRs doesn't necessarily raise the job amount. Will document something about this before too long
Activity
MelvinBot commentedon Jul 6, 2026
Issue Analysis
Root Cause: The chart's height is a fixed value baked into the HTML that the backend (Concierge) generates, not something App computes from the number of employees. App's
VictoryChartRendererreads theheightstraight off the incoming<victorychart>HTML attribute atparseStyles.ts:16and renders at that height. The only dynamic adjustment App makes is a width‑based uniform scale (computeChartScale.ts:9) that shrinks the whole chart to fit the container width while preserving aspect ratio — it never adapts height to the number of bars. So with only 2 employees, the backend's constant height is rendered unchanged, leaving the excess empty space and the far‑apart axis labels shown in the screenshots.Where the fix belongs: This is an internal/backend fix — the App repo is not the source of the height value. The service that authors the Concierge "Top Employees by Spend" chart HTML needs to emit a
height(and padding/domain) proportional to the number of rows, rather than a fixed value. This matches the issue's existingInternallabel. An internal engineer with access to the backend that generates these charts should own the change; there is no code change to make inExpensify/Appfor this.Investigation details & evidence
Data flow (all confirmed in App):
<victorychart height="…" width="…">…</victorychart>(App never generates these tags — they appear only in the renderer/parser directory and the one renderer registration inHTMLRenderers/index.ts).parseStyles.ts:16readstnode.attributes.height→nodeStyles.height(verbatim, no computation involving data/categories).VictoryChartContainerResponsive.tsxuses that value asdesignHeightand computes ascalefrom width only.computeChartScale.ts:9:Math.min(availableWidth / designWidth, 1)— horizontal fit, capped at 1. Final container height =designHeight × scale.Alternative considered (frontend override): App could be changed to derive height from the parsed category count (
processedResult.categories.lengthis available to the renderer) and override the backend value. However, that would fight the backend's intended width/height aspect‑ratio contract and duplicate sizing logic that the chart‑authoring service already owns — so the backend is the correct place to fix the root cause. There is currently no per‑category height logic anywhere in the App renderer.Confidence: High. Two independent code investigations agree: the height is backend‑supplied via the HTML attribute, and App only scales uniformly by width. Optional confirmation would be to pull the raw report‑action HTML for an affected message and verify a constant
height=value regardless of row count.Related issues (not duplicates):
Expensify/App#94613— "Top categories donut chart labels overlap" is a separate Concierge/Insights chart‑layout bug worth tracking alongside this one.Next Steps: This requires a backend change by an internal engineer (keeping the
Internallabel). Reply with@MelvinBot <your feedback>to refine this analysis.18 remaining items
situchan commentedon Jul 30, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: new feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/666507
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-f2be-a5a6-7c2f-684dae8f00f4situchan commentedon Jul 30, 2026
I reviewed 2 different PRs linked to this issue so $500
cc: @luacmartins
mallenexpensify commentedon Jul 30, 2026
@luacmartins 👀 above to confirm that the PRs warrant $250/each. Thx
^ Test case created. Thx
melvin-bot commentedon Aug 4, 2026
@mallenexpensify Eep! 4 days overdue now. Issues have feelings too...
mallenexpensify commentedon Aug 5, 2026
@luacmartins 👀 above plzz
luacmartins commentedon Aug 6, 2026
Sorry, I was OOO for the past couple of weeks. Yes, those look correct.
mallenexpensify commentedon Aug 7, 2026
@situchan paid, summary updated above. Thx. By default, reviewing multiple PRs doesn't necessarily raise the job amount. Will document something about this before too long
laurenreidexpensify commentedon Aug 24, 2026
$500 approved @situchan New Expensify