Replace Streamlit dashboard with B1 HTMX front-end - #12
Merged
Merged
Conversation
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>
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.
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
src/ecommerce_agent/web/: shell (250px sidebar + 74px topbar),b1.cssdesign system encoding both palettes asdata-themetokens plus every component, vendoredhtmx.min.js, minimalapp.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).Designed screens (pixel-faithful, real data)
apparel_score, real evidence/risks/sources, functional Refresh.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 thestreamlitdependency, removes the dashboard compose service, and updates Makefile/Dockerfile. The UI is now served by theapiservice athttp://localhost:8000/.Verification
ruff,ruff format --check, andmypy --strictall clean.make upand compare againstassets/design_handoff_b1_workshop/screenshots/.🤖 Generated with Claude Code