Skip to content

fix: prevent chat source citation clipping#2442

Open
vibhor-aggr wants to merge 1 commit into
expressjs:mainfrom
vibhor-aggr:fix/chat-source-citation-overflow
Open

fix: prevent chat source citation clipping#2442
vibhor-aggr wants to merge 1 commit into
expressjs:mainfrom
vibhor-aggr:fix/chat-source-citation-overflow

Conversation

@vibhor-aggr

Copy link
Copy Markdown

Summary

Closes #2408.

Prevents AI answer source/citation cards from being clipped horizontally by:

  • allowing the source list to show a thin horizontal scrollbar instead of hiding the scroll affordance
  • preventing individual source cards from shrinking in the flex row
  • reserving right-side padding so the final card is not obscured by the fade overlay
  • allowing long citation text or URLs to wrap inside the card

Verification

  • npx prettier --check src/components/patterns/Searchbox/ChatSources.css
  • npm run lint -- src/components/patterns/Searchbox/ChatSources.css (exits 0; CSS is ignored by the current ESLint config)
  • git diff --check
  • npm run build

@vibhor-aggr
vibhor-aggr requested a review from a team as a code owner July 11, 2026 07:03
@netlify

netlify Bot commented Jul 11, 2026

Copy link
Copy Markdown

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit ecc7c4d
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a51eadfcc96ed0008cc036f
😎 Deploy Preview https://deploy-preview-2442--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@ShubhamOulkar ShubhamOulkar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @vibhor-aggr, thank you for bringing up and fixing this issue.

Please add the ::before sudo element for chat-sources-scroll-container so that the gradient will appear on the left. @krzysdz pointed it out in the issue comment.

Adjust padding for chat-sources so that it will produce a non-overlapping scroller UI. As shown below.

2026-07-22.14-49-17.mp4

You can refer to the Web Content Accessibility Guidelines at https://www.w3.org/WAI/WCAG22/Techniques/general/G206

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.

Display of citations in AI question responses is broken

2 participants