WebClient AI pane UI
Look and behavior of the AI pane in the legacy WebClient report right-side pane (DEV-731). The design comes from a Claude Design handoff ("AI Report Assistant"). Pane structure and Insights backend: BI report generator and insights. Chat logic: WebClient AI chat.
Architecture
Views/Report/TaskPane.cshtml— pane markup and all pane styles (inline<style>block). CSS changes need no rebuild.wwwroot/Scripts/Report/AiInsights.js— renders insight cards (renderInsights,buildCard,typeInfo,toggleMore,collapseMore).wwwroot/Scripts/Report/AiReportChat.js— renders chat turns and report result cards (renderReportResult).wwwroot/Scripts/Report/ReportTabManager.js— wires#reportInsightsMoreToggletoAiInsights.toggleMore.- Localized labels reach the JS as
data-*attributes on container elements.
Visual design
- Primary green
#1f8a52. Send button#3fae49. Text on green tint#1f6b43. Surfaces#fdfdfc. - Font stack starts with
'Assistant'. - Chat/Insights segmented control: pill track, raised white active tab, count badge on Insights.
- Chat: assistant bubbles are white cards, user bubbles are green-tinted.
- Composer: pill input with a round send icon button. The arrow flips in RTL. The localized "Send" text is in
title/aria-label. - The pane's outer title bar (
.sidebar-title) is shared with Details and keeps the old style.
Chat result card
- A turn that built a report renders as a card, not a bubble.
- Green ✓ sub-header: "Report created" or "Report altered", above the LLM message.
- Turns with no report (e.g. a clarifying question) stay a plain bubble.
- Styles:
.aiReportChatResult,.aiReportChatResultHead,.aiReportChatResultBody. - Labels: resx
AiReportCreated/AiReportAltered(HE: "הדוח נוצר" / "הדוח עודכן"), passed asdata-report-created/data-report-alteredon#reportChatTranscript.
Insights display
- Loading —
#reportInsightsLoadingshows a spinner row and two pulsing skeleton cards (.aiInsightsSkeleton,.aiSkelIcon,.aiSkelBar). No JS:setState(..., "loading")toggles the block. - Key group —
warninginsights, under theInsightsKeyHeadingheading ("Here are the key insights we found in the data:"). Container#reportInsightsKeyCards. - More group —
infoandnotableinsights, behind a clickable header#reportInsightsMore("More interesting things we found in the data for you",InsightsMoreHeading) with a count badge. Container#reportInsightsMoreCards.- Collapsed by default. Collapses again on every render.
- Only warnings → the more group is hidden.
- No warnings → the other insights become the main list, expanded, no toggle.
- Cards — one row: type icon + title + "Learn more". Click expands the detail; the link becomes "Show less". No detail → no link.
- Labels:
InsightsLearnMore/InsightsShowLess(HE: "למד עוד" / "הצג פחות"), passed asdata-learn-more/data-show-lesson#ReportInsightsContainer. - No severity label on cards.
- Labels:
- Severity picks the group. Type picks the icon.
- The Insights tab badge shows the result count.
Insight type | Icon | Color class |
|---|---|---|
trend | ↗ | green |
anomaly | ! | amber |
concentration | ◎ | lavender |
comparison | ⇄ | blue |
notable_row | ★ | teal |
data_quality | ▦ | grey |
| other | ✦ | green |
Icon classes: .aiInsightsIcon--<type>.
Configuration
- New resx keys go in
Report.resx,Report.he-il.resxand by hand inGenerateEnumFromResX.cs(see WebClient AI chat gotchas). - JS changes need the gulp bundle rebuild (
npx gulpinwwwroot/).
Decisions
- 2026-07-11 — Restyle the AI pane to the Claude Design "AI Report Assistant" handoff: green palette, cards, pill composer (was: teal
#2FA97E). - 2026-07-11 — Insights loading shows skeleton cards (was: spinner line only).
- 2026-07-11 — Split insights: warnings as key insights, the rest in a collapsible "more" group.
- 2026-07-11 — Insight cards are collapsed rows with a "Learn more" expander. Icon by insight type (was: icon by severity, with type/severity/confidence tags).
- 2026-07-11 — Report-building chat replies get a "Report created" / "Report altered" sub-header card.
- 2026-07-11 — Design-mock controls with no backing behavior are not built: per-card "Show in report" / "Explain" / "Ask about this", mini bar charts, change chips, Undo / "Show in settings". Why: they would be dead controls.