Draft
Conversation
When NEXT_PUBLIC_PROTOTYPE_MODE=true the PageHeader switches to an amber colour scheme (#f59e0b) with dark text, a PROTOTYPE badge replacing PREVIEW, and a centered 'NOT FOR PRODUCTION USE' label. All buttons, progress bar and logo adapt. Zero impact when the env var is unset.
Add core infrastructure for report builder feature: - Report types (Report, ReportBlock, InsightBlock, TextBlock, TitleBlock) - Zustand report store with localStorage persistence - Dependencies: @dnd-kit/react, @react-pdf/renderer, idb-keyval - Update .gitignore for PRD.md and PLAN.md Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…, and UI polish - Report canvas with block rendering and layout - Block components: title, text, insight blocks - Pin-to-report popover - App routes: report-builder listing, detail, layout - Block toolbar, sortable blocks with drag-and-drop - Block management actions (move, delete, duplicate)
Wire up existing components to report builder: - Add PinToReportPopover to WidgetMessage for pinning charts - Update MessageBubble to support report block rendering - Add report-builder link to sidebar navigation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add metadata, generatedByAi fields to report types - Add insertBlockAfter store action - Wire generateInsights chat tool to report store - Add sidecar host and report generation endpoint config
…widget chat - Add GenerativeTextBlock component with input/generating/error/done phases - Add ReportPromptBar for report-level AI text generation - Upgrade ReportTextBlock with markdown rendering (react-markdown), AI badge, click-to-edit workflow - Add generateText utility calling sidecar API with report context - Add mockGenerateText for local development - Update ReportCanvas with prompt bar, per-widget chat flow, generation state - Thread isGenerating, onGenerate, onChat props through SortableBlock, ReportBlock, and BlockToolbar - Add Chat button to BlockToolbar for insight blocks
- Add generateReportPdf orchestrator: rasterise → render → download - Add rasteriseReportCharts: off-screen Recharts → SVG → PNG per block - Add svgToImage: clone SVG, inline styles, canvas rasterisation at 2x - Add inlineSvgStyles: resolve computed CSS into inline attrs for portability - Add @react-pdf/renderer document components: - ReportPdfDocument with title, block layout (full/half pairing), footer - PdfTextBlock with paragraph splitting - PdfInsightBlock with chart images, table rendering, placeholders - pdfStyles with hardcoded theme colours for PDF reconciler - registerFonts for IBM Plex Sans/Mono from Google Fonts - Wire Export PDF button into ReportCanvas with progress phases
- Fall back to mock text generation when sidecar is not configured - Make mock mode visually obvious with badges and styling - Always use mock AI summaries, remove DEVELOPER_MODE gating
…lack text - Remove absolute positioning from 'NOT FOR PRODUCTION USE' so it flows between the nav links and right-side controls instead of overlapping - Use dark prototype colour for nav button text in prototype mode
…eaming - Add Dashboard types and dashboardStore (IndexedDB-persisted, Zustand) - Add monitor app routes: list, detail, new-dashboard wizard - Add SetupWizard: dataset/area/date selection with multi-dataset streaming - Add DatasetReviewFlow and DatasetInsightReview for chart selection - Add DashboardCanvas reusing report block components - Add ChartCard, GreyedChartCard, AnalyticsTable, AddInsightDialog - Add StreamStatusBanner and SummaryPrompt components - Add AreaPicker with GADM country hierarchy - Add useMultiDatasetStream hook with parallel NDJSON streaming - Add utility modules: autoDetectChart, convertToBlocks, dateRange, extractRows, multiAreaCharts, parseNDJSONStream - Add constants: datasets, areaFixtures, gadmCountries - Add API routes: analytics, areas/[code]/children, labs-monitoring stream/summary - Add Monitor nav link to PageHeader and sidebar
- Exclude parent country from selection when sub-regions chosen - Merge per-area charts into single block with area selector - Add raw data tables with CSV download
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The features are functional but intended for internal evaluation, not production use.
Report Builder (/report-builder)
Dashboard Monitoring (/monitor)
Supporting Changes
NEXT_PUBLIC_PROTOTYPE_MODE