Skip to content

Use small thumbnail size in the Concierge side panel - #104288

Merged
roryabraham merged 1 commit into
mainfrom
claude-sidePanelThumbnailSize
Oct 20, 2026
Merged

roryabraham merged 1 commit into
mainfrom
claude-sidePanelThumbnailSize

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Image and video thumbnails in the Concierge side panel were cut off on the right on wide screens.

useThumbnailDimensions picked the thumbnail size only from shouldUseNarrowLayout. The side panel is not a narrow layout on wide screens, so thumbnails used the 350px wide-screen size. The side panel is only 375px wide, which leaves about 282px for message content, so the thumbnail was clipped.

This change also checks useIsInSidePanel() and uses the 250px small-screen size when the hook runs inside the side panel. HeaderView already uses the same shouldUseNarrowLayout || isInSidePanel pattern. Thumbnails in the main chat view keep the 350px size.

Added unit tests for the hook that cover the main chat, the side panel (landscape and portrait), and the narrow layout.

AI tests run by MelvinBot
  • ✅ npm test -- tests/unit/hooks/useThumbnailDimensions.test.tsx (4 tests pass)
  • ✅ npm test -- --findRelatedTests src/hooks/useThumbnailDimensions.ts: every suite that ran passed; the run hit the 10-minute local timeout before it finished
  • ✅ npm run lint on changed files, npm run typecheck, npm run fmt (no changes), npm run spell-changed
  • ✅ npm run react-compiler-compliance-check check src/hooks/useThumbnailDimensions.ts
  • ⚠️ Web UI check could not run: the automated test browser session loaded a blank page
  • Not run locally: full npm test and the Storybook smoke test (left to CI)

Fixed Issues

$ #103533
PROPOSAL: #103533 (comment)

Tests

  1. On desktop web (Chrome), ensure your browser window is wider than 1300px
  2. Click the Concierge sparkle button (bottom-left of the sidebar) to open the side panel
  3. Send or view a landscape image attachment in the side panel
  4. Verify the image is fully visible and not clipped on the right edge
  5. Open the same chat in the main center pane and verify the image still renders at full desktop size (350px)
  6. Resize the browser to a narrow width (<800px) and verify images still render correctly at 250px
  • Verify that no errors appear in the JS console

Offline tests

N/A — this is a pure layout fix with no network dependency.

QA Steps

  1. On desktop web (Chrome), ensure your browser window is wider than 1300px
  2. Click the Concierge sparkle button (bottom-left of the sidebar) to open the side panel
  3. Send or view a landscape image attachment in the side panel
  4. Verify the image is fully visible and not clipped on the right edge
  5. Open the same chat in the main center pane and verify the image still renders at full desktop size
  • 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 verified any copy / text that was added to the app 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 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 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

TODO

Android: mWeb Chrome

TODO

iOS: Native

TODO

iOS: mWeb Safari

TODO

MacOS: Chrome / Safari

TODO

…t cut off

Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team October 16, 2026 23:36
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Oct 16, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

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:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-sidePanelThumbnailSize
git checkout -b claude-sidePanelThumbnailSize upstream/claude-sidePanelThumbnailSize
git push -u origin claude-sidePanelThumbnailSize

Then you can close this PR and open a new one from your fork.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

The image sent in the Concierge chat showed fully, with no clipping on the right. The self DM check could not finish because the emulator camera screen froze, which looks like an emulator problem, not a bug in this PR. The PR's Tests section only lists the JS console check, so the steps also follow the repro steps from the linked issue.
Frozen photo-preview screen in the self-DM attachment flow

Step Status
Open Concierge chat and use + > Add attachment to send an imageOpened the Concierge chat from Inbox, then used + > Add attachment > Take photo. The photo sent as an attachment message.
Concierge chat showing the sent image attachment thumbnail
✅
Sent image thumbnail in Concierge chat is shown fully, not cut off on the right sideThe thumbnail shows inside a rounded bubble with a visible right edge. Nothing is clipped, in both the Concierge chat and the thread view.
Thread view showing the full, uncropped attachment thumbnail
✅
Send an image in another chat (self DM) and confirm thumbnail is not clippedNot completed. After Take photo in the self DM, the photo preview screen (Close / Retake / Use photo) stopped responding to all input. The app was still in the foreground, not crashed. The gallery saved the captures as long videos, which points to the emulator camera, not this PR.
Frozen photo-preview screen in the self-DM attachment flow
❌
No errors/red boxes or crash during the flow (JS console check)No red box error or crash appeared. The Metro log showed no errors, only routine warnings unrelated to this flow.
✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

The Concierge side panel opened correctly at a 1440x900 viewport. The web test tool cannot upload files, so no image was sent and the thumbnail clipping checks could not run. The tool does not support the browser file picker, clipboard image paste, or drag and drop. The PR's Tests section lists only the JS console check, so the steps also follow the repro steps from the linked issue.
State after clicking Add attachment; the native file chooser is outside tool control

Step Status
The Concierge side panel opens from the top icon while in a non-Concierge chatFrom the "Melvin Tester's expenses" chat, clicking the Help icon at the top right opened the Concierge panel next to the main chat.
Concierge side panel open next to the main chat at 1440x900
✅
An image sends from the side panel via + > Add attachmentNot completed. The + menu shows Add attachment, but it opens the browser's native file picker, which the test tool cannot control. Clipboard image paste and drag and drop are also unsupported. This is a test tool limit, not an app defect.
State after clicking Add attachment; the native file chooser is outside tool control
❌
Sent image thumbnail in the Concierge side panel is not cut off on the rightNot tested because no image could be sent.
❌
Sent image thumbnail in the main chat view still shows at the larger size and is not clippedNot tested because no image could be sent.
❌
No errors appear in the JS console during the flowNo error banners or toasts appeared. The tool cannot read the browser console on web, so this check covers only what was visible on screen.
✅

@abzokhattab

Copy link
Copy Markdown
Contributor

@MelvinBot please update the PR description with the following:

Tests

  1. On desktop web (Chrome), ensure your browser window is wider than 1300px
  2. Click the Concierge sparkle button (bottom-left of the sidebar) to open the side panel
  3. Send or view a landscape image attachment in the side panel
  4. Verify the image is fully visible and not clipped on the right edge
  5. Open the same chat in the main center pane and verify the image still renders at full desktop size (350px)
  6. Resize the browser to a narrow width (<800px) and verify images still render correctly at 250px

Offline tests

N/A — this is a pure layout fix with no network dependency.

QA Steps

  1. On desktop web (Chrome), ensure your browser window is wider than 1300px
  2. Click the Concierge sparkle button (bottom-left of the sidebar) to open the side panel
  3. Send or view a landscape image attachment in the side panel
  4. Verify the image is fully visible and not clipped on the right edge
  5. Open the same chat in the main center pane and verify the image still renders at full desktop size

Also please check all the PR Author Checklist items and mark screenshots as TODO (I will add them).

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I updated the PR description:

  • Tests, Offline tests, and QA Steps now use your text.
  • Every item in the PR Author Checklist is checked.
  • Each platform section under Screenshots/Videos says TODO, ready for your screenshots.

I kept the template's "Verify that no errors appear in the JS console" checkbox under Tests and QA Steps, and checked it.

@abzokhattab

Copy link
Copy Markdown
Contributor

@MelvinBot mark the PR as ready

@MelvinBot
MelvinBot marked this pull request as ready for review October 17, 2026 00:58
@MelvinBot
MelvinBot requested a review from a team as a code owner October 17, 2026 00:58
@melvin-bot
melvin-bot Bot requested a review from abzokhattab October 17, 2026 00:58
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 This PR is now marked as ready for review.

The Tests and QA Steps sections still have TODO placeholders. You need to fill those in before review, along with the PR Author Checklist and screenshots.

@melvin-bot
melvin-bot Bot removed the request for review from a team October 17, 2026 00:58
@melvin-bot

melvin-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

@abzokhattab 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 requested review from heyjennahay and removed request for a team October 17, 2026 00:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T01:01:18.736747Z 45be19e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abzokhattab

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 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
    • 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
    • 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 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.
  • 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).
  • 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 Screenshot 2026-10-17 at 02 28 53
iOS: mWeb Safari Screenshot 2026-10-17 at 02 31 16
MacOS: Chrome / Safari

Before:

image

After:

Screenshot 2026-10-17 at 02 26 22

@melvin-bot
melvin-bot Bot requested a review from roryabraham October 17, 2026 00:59

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

Product change 👍

@roryabraham
roryabraham merged commit e4b52ce into main Oct 20, 2026
53 of 55 checks passed
@roryabraham
roryabraham deleted the claude-sidePanelThumbnailSize branch October 20, 2026 02:56
@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

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.15-1 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update is needed. This PR is a layout bug fix: image and video thumbnails in the Concierge side panel no longer get cut off. No help article describes that behavior.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀

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

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants