Skip to content

Redesign the overview around scan status and honest limits - #11

Merged
sallaumen merged 6 commits into
mainfrom
claude/ui-redesign-96b23f
Nov 6, 2026
Merged

sallaumen merged 6 commits into
mainfrom
claude/ui-redesign-96b23f

Conversation

@sallaumen

@sallaumen sallaumen commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Why

The overview looked busy without saying much: a large decorative banner, scanlines and blinking LEDs on every preview, filler labels ("YOUR MACHINE, IN VIEW", "F / 01", "01 / DISCOVERED PORTS"), and a snapshot that stayed on "CAPTURING" forever when the capture failed. It also did not explain what the app cannot see.

Direction: a calm, local instrument panel for developers. Keep the dark-green rail, lime "live" accent and mono labels; spend the space on facts (scan state, timing, limits) instead of decoration.

What changed

Behavior

  • Previews remembers failed captures, exposes Previews.failed?/1 and broadcasts {:preview_failed, port}. The headless capture moves to Previews.Browser and can be swapped with the :preview_capture setting (used by the new test).
  • The first scan in progress is no longer shown as "No web apps found".

Overview

  • Scan status strip: scanner state, last scan time (local clock), how many servers answered, watched range with the excluded dashboard port, snapshot cadence.
  • Collapsible "How discovery works and what it cannot see": what appears, what is never listed, snapshot limits (remote assets blocked, timeouts, signed-in views), where process data comes from and when it is missing, what Stop does, and that settings apply on next start.

Cards (now DashboardComponents.service_card/1)

  • Labeled HTTP status (200 OK, 302 Found, 500 Internal Server Error) with tone by class, "answered in N ms", port tag, snapshot time chip.
  • Thumbnail states: capturing, snapshot unavailable (with recovery hint), ready.
  • "No page title" instead of the invented "Local app"; "Process details unavailable" explains why Stop is missing.
  • URL and Stop share one footer row.

Settings and sidebar

  • Shows running-now vs next-start values for the dashboard port and watched range, with an "Applies on next start" badge and a note that PORT overrides the saved port. The watched-range form markup and validation are unchanged.

Styling

  • Colors are tokens on :root, redefined for data-theme="dark", replacing ~80 per-component dark overrides. Reduced-motion stops all loops.

Before / after (described; captures show apps running on my machine, so they are not attached)

  • Desktop 1440, before: 240 px title block plus a 150 px dark banner before any card; each card had a scanline overlay, blinking LED and "EXPAND" label; status shown as a bare 200; response time unlabeled.
  • Desktop 1440, after: title + scan strip take ~210 px; three cards per row; each card reads title / :port, 200 OK · answered in 23 ms, labeled process metrics, URL + Stop.
  • 375 px, before: the first card started at y ≈ 640.
  • 375 px, after: compact dark top bar, 2×2 scan strip, first card at y ≈ 590; no horizontal overflow (scrollWidth == 375).
  • Snapshot failure: reproduced with a local fixture on :4450 whose page never fires DOMContentLoaded; the card switches from "Capturing snapshot…" to "Snapshot unavailable".
  • Dark theme: overview, preview dialog, stop dialog and settings checked.

Verification

  • mix test (50 tests, 0 failures), mix format --check-formatted, mix compile --warnings-as-errors (test env; the dev build dir was held by the dev server).
  • WebKit via Playwright MCP at 1440×900 and 375×812, light and dark: accessibility tree (landmarks, headings, labeled buttons), no console errors from the page, no horizontal overflow, preview opens and Escape returns focus to the thumbnail, stop confirmation tested end to end on the local fixture only.

Coordination

The range-limits session is changing the watched-range validation and adding a scan-progress indicator. This PR leaves that form and Monitor untouched; the progress indicator can drop into the strip's Scanner cell.

🤖 Generated with Claude Code

sallaumen and others added 6 commits November 6, 2026 11:06
Previews now remembers ports whose latest capture failed, exposes
Previews.failed?/1 and broadcasts {:preview_failed, port}, so the dashboard
can say a snapshot is unavailable instead of showing a capture in progress
forever. The headless capture moves to Previews.Browser and can be swapped
through the :preview_capture setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace the decorative banner with a scan status strip: scanner state,
  last scan time, watched range with the excluded dashboard port, and the
  snapshot cadence.
- Distinguish the first scan in progress from an empty result.
- Rebuild service cards as components: labeled HTTP status and response
  time, snapshot time, capturing and unavailable snapshot states, labeled
  process metrics, and an explanation when process details are missing.
- Add a collapsible note on how discovery works and what it cannot see.
- Show running versus next-start values for the dashboard port and watched
  range in Settings and the sidebar.
- Move colors to tokens so light and dark themes share one stylesheet, and
  drop scanlines, blinking LEDs and filler labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The installed-dashboard smoke test greps for "in range 4000–4500"; the
overview subtitle uses that wording again, and a LiveView test pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b23f

# Conflicts:
#	assets/css/app.css
#	lib/local_web_monitorex_web/live/dashboard_live.ex
#	test/local_web_monitorex_web/live/dashboard_live_test.exs
The scan progress total from #12 skips the dashboard's own port, so the
range caption now reports the same number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sallaumen
sallaumen merged commit d19bef5 into main Nov 6, 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