Skip to content

feat(THI-47): modernize dashboard - #23

Merged
tdody merged 1 commit into
mainfrom
thibaultdody/thi-47-dashboard-hero-toolbar-list-view-cards-view-add-form
Apr 19, 2026
Merged

feat(THI-47): modernize dashboard#23
tdody merged 1 commit into
mainfrom
thibaultdody/thi-47-dashboard-hero-toolbar-list-view-cards-view-add-form

Conversation

@tdody

@tdody tdody commented Apr 19, 2026

Copy link
Copy Markdown
Owner

Summary

Rebuilds the Dashboard (the app's entry point) around the THI-45/46 design system. No data or API changes.

Editorial hero

  • Caps label + serif 44px headline ("N properties tracked" / "Start tracking a property") replacing the bold-slate title
  • 4-cell <MetricStrip> (Portfolio / Avg Cashflow with large serif emphasis / Best CoC / Total Invested) replacing the 4 shadowed white cards

Toolbar

  • Search input (name / city / state) — new, styled with .field
  • Portfolio filter<Segmented> (All / In portfolio / Not in) replacing the 3-button pill row
  • Sort → bottom-rule select (Default / Cashflow ↓↑ / CoC ↓↑)
  • View mode<Segmented> Cards / Rows — new
  • Compare (conditional ≥ 2 selected), Quick Test, + New Property buttons use bg-ink text-canvas / outlined

Cards view (PropertyCard rewrite)

  • <PropertyThumb> fallback per property_type (multi_family → multi-unit, townhouse → duplex, condo → cape, else default) when image_url is null; falls back to the hatched placeholder. Image tag when present.
  • <RentalBadge> primitive replaces the sky / violet pastel chip
  • Checkbox top-left, rental badge top-right — both overlaid on the thumbnail with bg-canvas/90
  • In-portfolio card highlights with border-accent (selection = border-ink, default = border-rule-strong)
  • Token-based Cashflow / CoC mini-metrics; caps View / star / Delete action row

Rows view (new)

Full data table:
checkbox | 56×40 thumbnail | serif name + city/state | price | beds·ba·sqft | cashflow | CoC | rental badge | portfolio star | View / Delete

Row hover + selection highlighted via bg-paper.

Add Property form

Restyled around the primitives:

  • <Field> for Redfin URL + Property Name
  • <CurrencyInput> for Listing Price
  • .caps divider ("Or enter manually")
  • Fetch / Create buttons use bg-ink text-canvas; close × in the header

Empty / no-match states

New EmptyState helper with dashed 2px border-rule-strong + serif 22px title + optional actions slot.

Scope note

The ticket mentions inline OccupancyGauge per row. PropertySummary doesn't yet carry an occupancy_pct field — surfacing that requires a backend schema change. Deferred; rows use the cashflow tone as the status cue for now.

Test plan

  • npm run lint — clean
  • npm run build — passes, CSS 51.25 kB (-0.8 kB), JS 453.83 kB (-1.1 kB), 118 modules
  • Dev run: hero + stat strip populate with mixed-portfolio fixture
  • Toggle Cards ↔ Rows; both render with selection + star + delete working
  • Search narrows to matching city/state/name
  • Portfolio filter segmented + sort select update the grid
  • Select 2+ properties → Compare button appears, navigates to /compare?ids=…
  • New property flow: Redfin URL fetch and manual create both still navigate to /property/:id
  • Dark mode: hero, stat strip, toolbar, cards, rows, empty states all token-driven

🤖 Generated with Claude Code

Rebuild the dashboard around the THI-45/46 design system.

Editorial hero
- Caps label + serif 44px headline ("N properties tracked" or "Start
  tracking a property") replacing the bold-slate title
- 4-cell MetricStrip (Portfolio / Avg Cashflow [large serif emphasis] /
  Best CoC / Total Invested) replacing the 4 shadowed white cards

Toolbar
- Search input (filters name / city / state) styled with .field
- Segmented portfolio filter (All / In portfolio / Not in) replacing the
  3-button pill row
- Bottom-rule select for sort order
- Segmented view-mode toggle (Cards / Rows) — new
- Compare button (conditional, >=2 selected), Quick Test, + New Property
  buttons with token-based styling (ink / canvas / paper)

Cards view (PropertyCard.tsx rewrite)
- PropertyThumb fallback (per property_type → multi-unit / duplex / cape /
  default hue) when image_url is null, plus img tag when present
- RentalBadge primitive replaces the pastel sky/violet chip
- Selection checkbox top-left, rental badge top-right both overlayed on
  the thumbnail with bg-canvas/90
- In-portfolio highlight: border-accent (vs border-rule-strong default,
  border-ink when selected)
- Token-based Cashflow / CoC mini-metrics; star / View / Delete action row

Rows view (new)
- Full data table: checkbox | 56x40 thumbnail | serif name + city / state |
  price | beds·ba·sqft | cashflow | CoC | rental badge | portfolio star |
  View / Delete
- Row hover + selection background via bg-paper
- Note: the ticket mentions inline OccupancyGauge per row; PropertySummary
  doesn't yet carry an occupancy field, so rows show cashflow tone instead.
  Adding occupancy requires a backend schema change — deferred to a
  follow-up.

Add Property form
- Restyled with Field (URL + Name) + CurrencyInput (Listing Price)
- Divider with caps "Or enter manually" label
- Fetch / Create buttons use bg-ink text-canvas
- Close × in the header; Cancel handled by the outer dashboard state

Empty / no-match states
- New EmptyState helper with dashed 2px border-rule-strong, serif 22px
  title, and optional action slot

All indigo / violet / sky / slate / emerald / red / amber classes replaced
with token utilities. No data / API changes — listProperties,
createProperty, deleteProperty, scrapeProperty, updateProperty,
compareProperties flows unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tdody
tdody merged commit ecb7f4e into main Apr 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant