# Segment Validation block

> Segment validation workspace with health metrics, review calendar, and weekly rule coverage grid

Analytics segment-validation dashboard with health metric cards and sparklines, a review schedule calendar, and a filterable weekly rule coverage grid. ReUI Frame, DataGrid, Badge; shadcn Tabs, Calendar, Select. For segment management, reporting.

- Type: Pro block
- Category: [Analytics](https://web.dev.reui.io/blocks/solutions/analytics.md)
- Page: https://web.dev.reui.io/blocks/solutions/analytics/solution-analytics-6
- MCP: `get_block("solution-analytics-6")`
- Built with: Avatar, Badge, Breadcrumb, Button, Button Group, Calendar, Data Grid, Dropdown Menu, Frame, Item, Popover, Scroll Area, Select, Separator, Tabs
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Per day rule event counts on include, exclude, cohort or metric bars, a week stepper, and the reviews of a picked calendar day

## Agent notes

- The `SEGMENT_RULES` counts are keyed to the `DEFAULT_WEEK_START` week, so stepping to any other week shows empty cells
- The calendar opens on the fixed `DEMO_REFERENCE_DATE`, and `SEGMENT_REVIEW_EVENTS` and `segmentHealthMetrics` are sample data in data.tsx
- The `SegmentNavbar` actions, New Rule, the Review button and each `DayCell` have no `onClick`, so wire them to your own flows

## When not to use

- A month calendar beside a day agenda with no rule grid: use [Appointment Planner](https://web.dev.reui.io/blocks/application/schedule/schedule-1.md) (`get_block("schedule-1")`)
- Weekly hours per person logged against a billable target: use [Weekly Timesheet](https://web.dev.reui.io/blocks/data-grid/base/data-grid-base-4.md) (`get_block("data-grid-base-4")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- date-fns v4: [docs](https://date-fns.org/v4.1.0/docs/Getting-Started)
- React DayPicker v9: [API reference](https://daypicker.dev/v9/api), [docs](https://daypicker.dev/v9/start), through shadcn Calendar

## Install

```bash
npx shadcn@latest add @reui/solution-analytics-6
```

## About Analytics blocks

### When to use

- Product usage reports: overall health, feature adoption, activation funnel, cohort retention or an A/B test
- Analyst workspaces for an event catalog, weekly segment rule coverage or the detail page of one metric
- Alert rule settings for product metrics: thresholds, delivery per rule and channel, and quiet hours

### When not to use

- A team home for operations work such as fulfillment, staffing, calls or payouts: use the [Dashboard blocks](https://web.dev.reui.io/blocks/application/dashboard.md)
- A single trend card placed inside a page you already built: use the [Line Chart blocks](https://web.dev.reui.io/blocks/chart/line-chart.md)
- A plain table of your own records with sorting and filters and no report around it: use [Data Grid](https://web.dev.reui.io/components/data-grid.md) (`get_component("data-grid")`)

### Agent notes

- Every block sets a `min-h-svh` wrapper plus its own max width and padding in page.tsx or its root; remove them inside your app shell
- Filters and edits live in `useState` and reset on reload; no block requests or persists data, so connect each to your analytics backend

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
