[DRAFT PR] : Pass Page HTML Context to Concierge from Side Panel #78625
+235
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pass Page HTML Context to Concierge from Side Panel
Summary
Implements HTML context capture for Concierge when accessed via side panel, enabling better contextual assistance by providing sanitized page structure.
Fixes #78564
Implementation
Core Files
src/libs/PageContextUtils.ts- New utility for capturing and sanitizing page HTMLsrc/libs/API/parameters/AddCommentOrAttachmentParams.ts- AddedpageHTMLparametersrc/libs/actions/Report.ts- Capture logic inaddActions()functionsrc/pages/home/ReportScreen.tsx- PassisInSidePanelpropsrc/pages/home/report/ReportFooter.tsx- WireisInSidePaneltoaddCommentKey Features
✅ Platform-specific: Only captures on web (
Platform.OS === 'web')✅ Context-aware: Only when sending from side panel to Concierge or admin rooms
✅ Secure: Excludes passwords, hidden elements, side panel content, and modals
✅ Optimized: Whitelist approach - keeps only semantic elements (
button,a,h1-h6,nav,input, etc.)✅ Lightweight: Strips classes, styles, data-*, SVG content - only essential attributes (href, aria-label, placeholder, type, for)
✅ Size-limited: Maximum 50KB payload with automatic truncation
How It Works
document.bodypageHTMLparameter to APITesting
Tested on web platform:
pageHTMLparameter in network request contains sanitized HTMLScreenshot:

Code Quality