Skip to content

Replace Streamlit UI with Material 3 web dashboard - #27

Draft
DavidSeyserGit wants to merge 8 commits into
mainfrom
cursor/material3-ui-ca4b
Draft

Replace Streamlit UI with Material 3 web dashboard#27
DavidSeyserGit wants to merge 8 commits into
mainfrom
cursor/material3-ui-ca4b

Conversation

@DavidSeyserGit

@DavidSeyserGit DavidSeyserGit commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Performance and simplification update

  • Lazy-loads each tab so Chart.js, vision, and assistant code are fetched only when opened
  • Replaces @material/web/all.js with imports for only the components used
  • Loads Markdown + DOMPurify only with the Assistant tab
  • Streams assistant text without reparsing/sanitizing the full reply per token
  • Avoids recreating Overview charts on unrelated position/health updates
  • Consolidates recurring timers and removes unused compatibility helpers/CSS
  • Adds static JS/CSS cache headers and replaces deprecated FastAPI shutdown hooks with lifespan handling
  • Includes the refined Material 3 Expressive indigo/blue/coral theme and shape system

Verification

  • Full suite: 154 passed, 1 skipped
  • UI-focused suite after rebase: 19 passed
  • JavaScript syntax checks pass for every module
  • Ruff lint and format checks pass
Open in Web Open in Cursor 

- Serve a Material Web Components SPA via FastAPI (twfarmbot_ui/server.py)
- Proxy /api and /resireg to upstream services; persist sessions and
  garden YAML edits through /ui endpoints
- Add shared layout primitives (page, section, card, metric grid) and an
  8px spacing system for consistent typography and padding across tabs
- Fix FARMBOT_REQUIRED=0 so the API boots without a live FarmBot
- Update docs, systemd unit, and tests (including test_ui_server.py)

Co-authored-by: David Seyser <DavidSeyserGit@users.noreply.github.com>
Comment thread tests/test_ui_server.py Fixed
DavidSeyserGit and others added 7 commits July 9, 2026 20:58
…e-effect'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
- Reduce sidebar nav padding; use rounded rects instead of full-width pills
- Shrink page header/title gaps; move Camera actions into title row
- Add compact top-aligned empty-panel variant (replaces centered void)
- Normalize MWC button height and card body padding
- Cache-bust static assets so CSS/JS updates load reliably

Co-authored-by: David Seyser <DavidSeyserGit@users.noreply.github.com>
Co-authored-by: David Seyser <DavidSeyserGit@users.noreply.github.com>
Vendors Material Web components, Chart.js, Marked, and DOMPurify to
local storage to enable offline functionality and improve reliability.

- Updates importmap in `index.html` to point to local `/vendor/` paths.
- Configures FastAPI server to cache `/vendor/` assets.
- Adds new test cases to verify importmap integrity, SHA256 pinning,
  and local asset availability.
- Adds `vendor/` directory containing pinned assets.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Add functionality to toggle the navigation rail visibility, allowing users to collapse the sidebar. This includes:
- A new toggle button in the top app bar.
- CSS styles for the collapsed state to adjust layout and sidebar positioning.
- JavaScript logic to manage the toggle state and persist the user's preference in localStorage.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
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.

2 participants