Skip to content

Replace Streamlit dashboard with B1 HTMX front-end - #12

Merged
kevrez merged 2 commits into
mainfrom
b1-frontend-overhaul
Jun 18, 2026
Merged

kevrez merged 2 commits into
mainfrom
b1-frontend-overhaul

Conversation

@kevrez

@kevrez kevrez commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What & why

The operator dashboard was Streamlit, which can't reproduce the B1 "Concrete · Amber Dark" design (brutalist, 0-radius, ink borders, hard offset shadows, single vermilion accent, pixel-precise master/detail), isn't responsive, and is expensive to restyle. This rebuilds the front-end as server-rendered Jinja2 + HTMX on the existing FastAPI app — in-process, no Node build, no second deployment — defaulting to light with a working dark/light toggle.

Approach

  • New src/ecommerce_agent/web/: shell (250px sidebar + 74px topbar), b1.css design system encoding both palettes as data-theme tokens plus every component, vendored htmx.min.js, minimal app.js (theme toggle, dropdowns, master/detail selection, removable tags, aspect→size). Web handlers reuse the same service/session layer as the JSON API (no self-HTTP).
  • Icons are the prototype's exact 20×20 SVG paths.

Designed screens (pixel-faithful, real data)

  • Trend Inbox — signal list + detail; momentum derived from apparel_score, real evidence/risks/sources, functional Refresh.
  • Research Reports — list + reading pane; TOC + section heads derived from report markdown (minimal renderer, no new dep); opportunity score derived from the linked trend.
  • Etsy Posting — pipeline (stages mapped from real item statuses) + listing editor with live removable tags, readiness row, save/validate/publish.
  • Design Studio — composer + version-tracked lineage library + focus detail; per-line delete, real meta chips.

Group B (restyled in B1)

Product Drafts, Printful Workshop, Analytics, Agent Runs · Logs (with polling). Approval Queue dropped per product decision; standalone Etsy Listings folded into the 8-item nav.

Reconciliation

Elements with no backing data render as honest placeholders (Workshop Score → n/a, sparklines/model dropdowns cosmetic) rather than fabricated numbers — see the inventory in the planning notes.

Cutover

Deletes dashboard/, drops the streamlit dependency, removes the dashboard compose service, and updates Makefile/Dockerfile. The UI is now served by the api service at http://localhost:8000/.

Verification

  • 122 tests pass (3 integration deselected), including 16 new DB-backed web smoke tests covering every screen's route → DB → render path.
  • ruff, ruff format --check, and mypy --strict all clean.
  • Not yet pixel-diffed in a browser — run make up and compare against assets/design_handoff_b1_workshop/screenshots/.

🤖 Generated with Claude Code

kevrez and others added 2 commits June 17, 2026 09:37
Rebuild the operator UI as server-rendered Jinja2 + HTMX served by the
existing FastAPI app, implementing the B1 "Concrete · Amber Dark" design
(light default + working dark/light toggle). Removes Streamlit entirely.

- web/: shell (sidebar + topbar), b1.css design system (both palettes as
  data-theme tokens), vendored htmx, app.js (toggle, dropdowns, master/detail,
  removable tags, aspect->size).
- Four designed screens wired to real data: Trend Inbox, Research Reports
  (markdown TOC + trend-derived score), Etsy Posting (pipeline + listing
  editor + readiness), Design Studio (composer + lineage library + focus).
- Group B screens restyled in B1: Product Drafts, Printful Workshop,
  Analytics, Agent Runs - Logs. Approval Queue dropped; Etsy Listings folded
  into the 8-item nav.
- Cutover: delete dashboard/, drop streamlit dep, remove the dashboard compose
  service, update Makefile/Dockerfile (UI now served by api at :8000).
- 16 DB-backed web smoke tests; ruff + mypy --strict clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kevrez
kevrez merged commit 5c7b266 into main Jun 18, 2026
4 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