Explore session card

One saved forecast scenario in the conversation, with a metric selector, a year scrubber and today's-money figures.

Retire at 60

£1.8m

Net worth in 2056 · +£512.9k

Today's money

Year 2056

Readily available

£790.9k

Pension

£377.5k

Property

£521.2k

<ExploreSessionCard data={session} />

Usage

import { ExploreSessionCard, type ExploreSessionCardData } from "@reva/ui";

Renders an explore session: one named forecast scenario the household keeps. data.years carries a row per period with every metric the selector switches between, so changing metric or scrubbing to a year needs no further request.

Only the display calls render this card in a transcript (explore_baseline, show_explore_session). The writes return the same payload and update the workspace beside the conversation, but do not draw a chart per edit.

Today's money

Figures default to the cursor year's purchasing power, matching the Explore workspace. Each row carries a deflator the toggle multiplies by, rather than a second series, so the card can never disagree with the figures the agent is reading.

Examples

With milestones

Dated milestones become dashed vertical markers. A diagnostics count badges the header when the engine raised warnings the scenario has not accounted for.

Retire at 60

£1.8m

Net worth in 2056 · +£512.9k

2 to check

Today's money

In this scenario

Buy holiday home 2033retirement (Eleanor) 2044

Year 2056

Readily available

£790.9k

Pension

£377.5k

Property

£521.2k

<ExploreSessionCard data={{ ...session, milestones, diagnostics: 2 }} />

Near term

A session with a horizon of two years or fewer is sampled by month rather than year: annual points on an eighteen month plan give two of them. granularity drives the axis and the scrubber's label.

Next 18 months

£628.7k

Net worth in 2027-07 · +£16.7k

Today's money

Month 2027-07

Readily available

£251.5k

Pension

£138.3k

Property

£188.6k

Cash runs out

March 2027

<ExploreSessionCard data={{ ...session, granularity: "month", horizon_years: 2 }} />

Props

PropTypeDescription
dataExploreSessionCardDataThe session payload: name, currency, horizon, per-period rows, milestones and summary.
onOpen(sessionId: string) => voidOptional. Renders an "Open in the workspace" action; omitted, the action is hidden.

ExploreSessionCardData

FieldTypeDescription
session_idstring?Absent on a baseline run, which belongs to no session.
namestringThe scenario's name, shown as the card's eyebrow.
currencystringReporting currency, e.g. "GBP".
horizon_yearsnumberHow far the run looks ahead.
granularity"year" | "month"Optional. "month" for a near term run.
yearsExploreSessionYear[]One row per period, carrying every metric.
milestonesExploreSessionMilestone[]Optional. Dated markers on the chart.
diagnosticsnumberOptional. Engine warnings to check, badged in the header.
summaryExploreSessionSummaryHeadline figures, including any cash-exhausted date.

On this page