Skip to content

Polish pass: edit any device, stream teardown, hardening + quiet-instrument redesign - #1

Merged
MakerViking merged 6 commits into
mainfrom
feat/polish-pass
Oct 24, 2026
Merged

MakerViking merged 6 commits into
mainfrom
feat/polish-pass

Conversation

@MakerViking

Copy link
Copy Markdown
Owner

Three commits, all deployed and verified on the live tower (2026-10-22/23).

9a54c76 — licensing

AGPL-3.0 license, third-party notices, contributor guide.

a2690eb — bugs, edit flows, hardening, perf

From a verified audit (39 confirmed findings, adversarially checked):

  • Edit any camera/printer: new GET /api/cameras/{name} / GET /api/printers/{id} (secrets never serialized), REST PUT with inline errors; Frigate-config cameras get source-URL edits applied live via go2rtc PATCH + Frigate saveonly (no restart); credential keep/clear semantics fixed; store rollback on save failure; rename cascades to printers; exec:/echo:/expr: rejected in UI sources.
  • Playback: VideoStream tears down ws + RTCPeerConnection on unmount/HQ toggle (frees NVENC sessions); native <video controls> removed (duplicate, non-working fullscreen); stall watchdog.
  • HTTP: token gates /go2rtc + /frigate; same-origin check on mutating /api and /ws; gzip; immutable hashed-asset caching; nosniff/frame/referrer headers.
  • Backend: hub pong + closed-channel panic; moonraker backoff reset, log de-spam, liveness timeout; non-fatal rules dir; exit codes; concurrent docker stats.
  • UI fixes: modal focus stealing, heater empty→0, slider keyboard commit, rules "specific name", WS dead-socket detection, camera-wall re-render storm.

58283c1 — "quiet instrument" redesign

Warm graphite + amber tokens, Instrument Sans + IBM Plex Mono, calmer camera tiles (hover controls, bottom scrim), Server tab as a dense list, single divided lists, sentence-case forms, tabs in location.hash.

Checks

gofmt, go build, go vet, go test -race ./..., npm run typecheck, npm run build all green.

Note: fix/hq-nvenc-rtsp-push (00b29b8) is a separate, older branch that touches VideoStream.tsx/CameraTile.tsx and will conflict with this PR — rebase it after this merges.

MakerViking and others added 6 commits August 14, 2026 23:43
TinkerView is now AGPL-3.0-only, matching SindriCAD, with the same
inbound-relicensable contributor grant so commercial terms stay possible.
Copyright holder is MakerViking.

NOTICE.md records attribution obligations nothing in the repo had met:

- The @fontsource packages (Archivo, JetBrains Mono, Chakra Petch) are
  OFL-1.1 and their woff2 files are bundled into dist/assets, and therefore
  into the shipped Go binary. OFL requires the copyright notice travel with
  them.
- dashboard/web/public/video-rtc.js and video-stream.js are vendored
  unmodified from go2rtc (MIT, Alexey Khit).

It also states an election rather than leaving it implicit: Eclipse Paho
(linked into the dashboard binary) and Mosquitto are dual-licensed
"EPL-2.0 OR EDL-1.0", and TinkerView takes the EDL-1.0 branch, because
EPL-2.0 is not compatible with the AGPL.

Dependency licenses were verified against upstream rather than assumed —
coder/websocket is ISC, gorilla/websocket is BSD-2-Clause, and yaml.v3 is
Apache-2.0 with eight libyaml-ported files still under MIT.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… perf pass

- Edit flows: new Edit camera/printer modals (prefilled via new GET
  /api/cameras/{name} and /api/printers/{id}, REST PUT with inline errors);
  Frigate-config cameras get source-URL edits applied live via go2rtc PATCH
  (no Frigate restart); credential keep/clear semantics fixed; store
  mutations roll back on save failure; camera rename cascades to printers;
  exec:/echo:/expr: rejected in UI sources; secrets never serialized out.
- Playback: VideoStream tears down ws+RTCPeerConnection on unmount/HQ toggle,
  native <video> controls removed (duplicate fullscreen), stall watchdog.
- HTTP: token gating for /go2rtc and /frigate proxies, same-origin checks for
  mutating /api and /ws, gzip, immutable caching for hashed assets, nosniff/
  frame/referrer headers, no SPA dir listing, quieter proxy errors.
- Backend: hub pong + closed-channel panic fix, moonraker backoff reset,
  log de-spam and liveness timeout, completion re-fire guard, non-fatal
  rules dir, proper exit codes, concurrent docker stats.
- UI: Modal focus fixes + trap, heater empty-input guard, slider keyboard
  commit, rules 'specific name', WS dead-socket detection/reconnect races,
  camera wall re-render storm, assorted empty/loading states.
- New tokens (warm graphite ink ramp, amber accent), Instrument Sans + IBM
  Plex Mono (tabular numerals); drop the cyan glow, blueprint grid, uppercase
  letter-spaced labels and per-row status pills.
- Camera tiles: video fills the tile, name + Rec on a bottom scrim, HQ /
  fullscreen / menu revealed on hover (always on touch); copy RTSP/player URL
  moved into the menu; hide go2rtc's own mode label that overlapped controls.
- Server tab as a dense list (problems first, restart on hover);
  notifications, files and history as single divided lists; sentence-case
  forms and modals; quieter detection/recognition panels.
- Tabs live in location.hash (reload/bookmark/back work).
- vite dev proxy target configurable via TV_BACKEND.
- install.sh: hardware-preset detection (nvidia/intel/amd-rocm/cpu/pi/coral),
  .env creation with random ntfy topic + token, data-dir ownership, docker or
  rootless podman / Docker Desktop socket detection, SELinux overlay, prebuilt
  image probe with build fallback, idempotent re-runs, --dry-run.
- Fresh-install test passed on a clean rootless-podman box (CPU preset, bridge
  variant, dashboard-only run); fixes from it folded in.
- Secure defaults: Mosquitto on 127.0.0.1 (password-protected LAN listener via
  compose.mqtt-lan.yml), docker-socket-proxy read-only by default
  (DOCKERPROXY_POST, restart is opt-in), explicit env lists for Frigate and the
  dashboard instead of env_file, GO2RTC_ALLOW_ARBITRARY_EXEC off by default,
  startup warning when no auth token is set, SECURITY.md.
- Dashboard: -healthcheck flag + Docker HEALTHCHECK; non-blocking MQTT connect on
  shutdown; clear message when the proxy forbids restarts.
- Build/CI: reproducible Dockerfile (npm ci, go mod download, -mod=readonly),
  ci.yml for push/PR (gofmt, vet, test -race, typecheck, build, compose config
  matrix, shellcheck, image build), all actions SHA-pinned, release provenance
  + SBOM.
- Docs: README in the house pattern, docs/ (install, configuration, cameras,
  integrations, upgrading, troubleshooting), CHANGELOG, CODE_OF_CONDUCT,
  Unraid (Compose Manager + dashboard-only CA template) and CasaOS guides,
  demo-data screenshots.
- Removed private infrastructure from tracked files; generic CLAUDE.md.

Breaking for existing installs (see docs/UPGRADING.md): DOCKER_HOST in .env is
now DASHBOARD_DOCKER_HOST; container restarts need DOCKERPROXY_POST=1; Frigate
receives only listed FRIGATE_* variables.
secure-launch review (gate PASS) follow-ups:
- The per-printer Moonraker proxy injected the printer's API key into ANY
  GET path, exposing /access/api_key and /access/oneshot_token (full
  Moonraker control) plus config files to dashboard users. It now allows only
  the read endpoints the SPA uses (files list/metadata, gcodes thumbnails,
  history list/totals); everything else is 403. Tests cover traversal.
- golang.org/x/net v0.44.0 -> v0.61.0 (16 advisories); npm audit fix for
  build-time deps (vite 6.4.4, postcss, browserslist, nanoid). Runtime deps
  had no advisories.
- SECURITY.md: printer-connection section, incl. the unverified Bambu TLS
  certificate as a known issue; CHANGELOG updated.
@MakerViking
MakerViking merged commit 65f2dcb into main Oct 24, 2026
5 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