feat(web+api): logs & troubleshooting screens for SPA parity (#145) #165

Merged
timothy merged 4 commits from feat/145-logs-troubleshooting into main 2026-07-07 14:00:29 +02:00
Owner

Implements the buildable-now scope of #145 (SPA parity: logs & troubleshooting) and items 1–3 of API gap #158.

Backend

  • New GET /api/logs (LogsController) wrapping GetRecentLogEntries — paged + free-text filter, pageSize clamped 1–100, Level as string. DTOs in ErsatzTV.Core/Api/Logs/ with #nullable enable.
  • New GET /api/troubleshoot/info wrapping GetTroubleshootingInfo — generalJson (same payload the Blazor Troubleshooting page builds) + per-platform capability strings.
  • Exposed the 3 existing playback troubleshooting endpoints in the OpenAPI spec ([EndpointGroupName("general")]).
  • Regenerated v1.json + web/src/api/generated/v1.d.ts.

Frontend

  • LogsScreen — paged table, level badges, debounced server-side filter, page-size select.
  • TroubleshootingScreen — General tab (pretty JSON + copy) + platform capability tabs when present.
  • New "System" nav group (Settings, Logs, Troubleshooting); Settings Classic-UI help text updated.

Verification

  • dotnet build clean; ErsatzTV.Tests 533 green; Core.Tests 493 green (+1 skipped); web typecheck/vitest (353)/build/eslint clean.
  • Live E2E: app run from worktree, waited for search-index migration, curl localhost:8409 — /api/logs returns real paged entries (104 total), filter works, /api/troubleshoot/info returns real version/env/CPU payload, /app/logs + /app/troubleshooting serve.

Deferred (tracked in #158): playback-troubleshooting SPA player, block-playout history screens, YAML validator contract change.

Refs #145, #158 (partial for both).

🤖 Generated with Claude Code

Implements the buildable-now scope of #145 (SPA parity: logs & troubleshooting) and items 1–3 of API gap #158. **Backend** - New `GET /api/logs` (LogsController) wrapping `GetRecentLogEntries` — paged + free-text filter, pageSize clamped 1–100, `Level` as string. DTOs in `ErsatzTV.Core/Api/Logs/` with `#nullable enable`. - New `GET /api/troubleshoot/info` wrapping `GetTroubleshootingInfo` — `generalJson` (same payload the Blazor Troubleshooting page builds) + per-platform capability strings. - Exposed the 3 existing playback troubleshooting endpoints in the OpenAPI spec (`[EndpointGroupName("general")]`). - Regenerated `v1.json` + `web/src/api/generated/v1.d.ts`. **Frontend** - `LogsScreen` — paged table, level badges, debounced server-side filter, page-size select. - `TroubleshootingScreen` — General tab (pretty JSON + copy) + platform capability tabs when present. - New "System" nav group (Settings, Logs, Troubleshooting); Settings Classic-UI help text updated. **Verification** - `dotnet build` clean; ErsatzTV.Tests 533 green; Core.Tests 493 green (+1 skipped); web typecheck/vitest (353)/build/eslint clean. - Live E2E: app run from worktree, waited for search-index migration, `curl localhost:8409` — `/api/logs` returns real paged entries (104 total), filter works, `/api/troubleshoot/info` returns real version/env/CPU payload, `/app/logs` + `/app/troubleshooting` serve. **Deferred (tracked in #158)**: playback-troubleshooting SPA player, block-playout history screens, YAML validator contract change. Refs #145, #158 (partial for both). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timothy added 3 commits 2026-07-07 13:48:49 +02:00
Add GET /api/logs (thin wrapper over GetRecentLogEntries; paged, filtered,
clamped pageSize like LibraryBrowseController) and GET /api/troubleshoot/info
(wraps GetTroubleshootingInfo; General section serialized to the same JSON
shape the legacy Blazor Troubleshooting page renders, plus per-platform
capability dumps). Also adds [EndpointGroupName("general")] to the existing
troubleshoot playback endpoints so they surface in the OpenAPI spec (#158
item 3).
feat(web): logs and troubleshooting screens for SPA parity (#145)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m26s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 4m39s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
5530db7089
Add typed API wrappers (api/logs.ts, api/troubleshoot.ts) and two new
screens: LogsScreen (paged, level-badged, server-side filtered log table)
and TroubleshootingScreen (General JSON viewer with copy, plus per-platform
NVIDIA/QSV/VAAPI/VideoToolbox capability tabs when populated). Both are
registered under a new "System" nav group in App.tsx alongside Settings.
Settings' Classic UI help text and About card now point at the new screens
instead of the Blazor logs/troubleshooting pages.
timothy added 1 commit 2026-07-07 13:55:09 +02:00
fix: address #165 review findings (stale-response guard, security-test coverage, route/help-text nits)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m14s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 4m37s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
24a26cbe34
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timothy merged commit e0a860e577 into main 2026-07-07 14:00:29 +02:00
timothy deleted branch feat/145-logs-troubleshooting 2026-07-07 14:00:29 +02:00
Sign in to join this conversation.