Release version 1.0.5
CI / test (push) Successful in 10m42s
CI / docker (push) Successful in 4m43s
CI / release (push) Skipped

Chat Message Admin Improvements: 3 API endpoints, 9 page HTML split, chat-log UI with delete/confirm/pagination/filter/bulk delete

CI/CD Improvements: Go cache fix, lint script, Vite env cleanup, chat start_period 30s, nginx health check, log dump on fail
This commit is contained in:
zwitschi committed 2026-08-05 11:44:46 +02:00
1 parent ee16441b79
commit 21a34a4bd5
7 files changed
+56 -35

No files matched your search

+27 -8
View File
@@ -73,23 +73,42 @@ jobs:
env:
DOCKER_HOST: tcp://192.168.88.40:2375
run: |
# Wait for playout to stabilize (it may restart during init)
# Wait for services to stabilize
sleep 20
curl -f http://192.168.88.40:3000/health || exit 1
# Check chat health
echo "Checking chat health..."
if ! curl -f http://192.168.88.40:3000/health; then
echo "Chat health check failed"
docker logs linearvoid-chat --tail 50
exit 1
fi
# Check nginx health
echo "Checking nginx health..."
if ! curl -f http://192.168.88.40:8080/; then
echo "Nginx health check failed"
docker logs linearvoid-nginx --tail 50
exit 1
fi
# Retry playout health check since it may still be initializing
echo "Checking playout health..."
for i in $(seq 1 6); do
if docker exec linearvoid-playout curl -sf http://localhost:8081/health; then
echo "Playout is healthy"
exit 0
break
fi
echo "Playout not ready yet (attempt $i/6), waiting 5s..."
sleep 5
done
echo "Playout failed to become healthy after 6 attempts"
docker logs linearvoid-playout --tail 50
exit 1
curl -f http://192.168.88.40:3000/health || exit 1
docker exec linearvoid-playout curl -sf http://localhost:8081/health || exit 1
if ! docker exec linearvoid-playout curl -sf http://localhost:8081/health; then
echo "Playout failed to become healthy after 6 attempts"
docker logs linearvoid-playout --tail 50
exit 1
fi
echo "All services healthy"
- name: Cleanup old images
env:
+3
View File
@@ -36,6 +36,9 @@ jobs:
with:
go-version: "1.22"
cache: true
cache-dependency-path: |
backend/playout/go.sum
backend/chat/go.sum
- name: Validate Playlist Normalization
run: cd backend/playout && go run src/playlist.go playlist.txt || echo "Validation script not yet complete"
+20 -22
View File
@@ -2,40 +2,38 @@
<!-- markdownlint-disable MD024 -->
## Unreleased
## [1.0.5] - 2026-08-05
### Added
- Documentation for Admin UI Media Library (arc42 updates, refined TODO, media DB model decisions per ADR-006).
- Started implementation of full Media CRUD + video duration extraction using ffprobe (Media Library - Full CRUD section).
- Added `/api/admin/media/{id}` GET/PUT/DELETE handlers for media metadata retrieval, updates, and file+record deletion.
- Extended admin schedule and dashboard data endpoints with media duration totals, runtime strings, and media counts.
- Added admin UI runtime display for schedule/dashboard plus media library edit/delete actions.
- Added a dedicated plain TypeScript admin module for tab navigation, media CRUD actions, schedule/system analytics refresh, and moderation workflows without Alpine dependencies.
- Added resumable chunked admin media upload flow with upload-session endpoints and client progress indicators.
- Expanded architecture documentation with scaling strategy, API surface reference, detailed video normalization spec, and Cloudflare configuration reference.
- Added `API.md`, `DEPLOYMENT.md`, `MONITORING.md`, and `SECURITY.md` as dedicated operational documentation guides.
- `GET /api/admin/chat-log` endpoint with `?room=`, `?limit=`, `?before=`, `?username=`, `?text=` filter/pagination support.
- `GET /api/admin/chat-log/:id` endpoint returning a single chat log entry as JSON.
- `DELETE /api/admin/chat-log/:id` endpoint returning 204 No Content on success.
- `DELETE /api/admin/chat-log/bulk` endpoint accepting `{"ids": [...]}` for bulk deletion (max 500).
- Chat Log admin tab with table, individual delete with confirmation dialog, pagination (prev/next), search/filter by room/username/text, select-all checkbox, and bulk delete button.
- Added `"lint": "tsc --noEmit"` script to `frontend/package.json`.
- `/api/admin/media/{id}` GET/PUT/DELETE handlers for media metadata retrieval, updates, and file+record deletion.
- Resumable chunked admin media upload flow with upload-session endpoints and client progress indicators.
- Prometheus-format `/metrics` endpoint for chat runtime and admin-session monitoring.
- Dedicated operational documentation: `API.md`, `DEPLOYMENT.md`, `MONITORING.md`, `SECURITY.md`.
### Changed
- Revised ADR-006 to reflect current implemented storage: PostgreSQL is the compose default and deployed primary backend, with SQLite retained as optional fallback.
- Updated chat runtime image to include ffmpeg/ffprobe for media duration probing on upload.
- Split `frontend/admin/index.html` into a template shell plus 9 per-tab page HTML files loaded dynamically via `loadPageContent` / `switchTab` / `bindPageEvents`.
- Rebuilt viewer, admin, and admin-login pages around custom semantic class structures with accessibility-focused landmarks, tab semantics, and keyboard-focus behavior.
- Replaced legacy and Tailwind-based stylesheet rules with a custom design-token CSS system covering responsive layouts, forms, tables, and reduced-motion behavior.
- Switched the frontend theme to dark-mode-first token defaults with a light-scheme override path for users who prefer light appearance.
- Refactored the viewer page to a single header plus unified content layout with responsive video/chat split, mobile stacking, and chat panel toggle behavior.
- Code-split `hls.js` via lazy loading in the viewer bootstrap to shrink the main frontend bundle and isolate stream playback logic into a dedicated chunk.
- Added navigation links in root README and architecture docs to the new API, deployment, monitoring, and security guide files.
- Switched frontend theme to dark-mode-first token defaults with light-scheme override.
- Bumped chat healthcheck `start_period` from 10s to 30s in `docker-compose.prod.yml`.
- CD workflow now verifies nginx (port 8080) + chat (3000) + playout (8081); dumps container logs for all failing services.
- Updated Prometheus scrape targets and Grafana dashboard queries to use live chat metrics.
### Fixed
- Started Admin UI Media Library backend implementation by adding the `Media` GORM model and AutoMigrate integration in chat startup.
- Implemented media upload duration probing with ffprobe and persisted media metadata to the database alongside filesystem storage.
- Updated media listing to read from the media table and return duration metadata with HH:MM:SS runtime formatting.
- Removed Tailwind and Alpine runtime/build dependencies from the frontend package configuration and eliminated Tailwind directives/warnings during production build.
- Go module cache in CI now correctly references `backend/playout/go.sum` and `backend/chat/go.sum`.
- Enforced 2GB upload ceiling plus server-side media file type/size validation for admin uploads.
- Increased nginx `client_max_body_size` to allow resumable admin upload chunks and prevent `413 Content Too Large` responses.
- Removed legacy now-playing viewer UI elements that conflicted with the streamlined single-header layout.
- Increased nginx `client_max_body_size` to allow resumable admin upload chunks without 413 errors.
- Removed unused `data-admin-*` Vite env var attributes from admin HTML template.
- Removed Tailwind and Alpine runtime/build dependencies; eliminated Tailwind directives/warnings during production build.
## [1.0.3] - 2026-08-03
+1 -1
View File
@@ -7,7 +7,7 @@
[![Build Status](https://git.allucanget.biz/zwitschi/linearvoid/actions/workflows/ci.yml/badge.svg)](https://git.allucanget.biz/zwitschi/linearvoid/actions)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Gitea](https://img.shields.io/badge/Gitea-1.27.1-blue)](https://git.allucanget.biz)
[![Version](https://img.shields.io/badge/version-1.0.3-blue)](https://git.allucanget.biz/zwitschi/linearvoid/releases)
[![Version](https://img.shields.io/badge/version-1.0.5-blue)](https://git.allucanget.biz/zwitschi/linearvoid/releases)
[![Release Notes](https://img.shields.io/badge/release-notes-green)](CHANGELOG.md)
## Architecture
+1 -1
View File
@@ -42,7 +42,7 @@ services:
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
start_period: 30s
nginx:
image: git.allucanget.biz/zwitschi/linearvoid/nginx:latest
+1 -1
View File
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="../src/style.css" />
</head>
<body class="admin-body" data-admin-default-moderator="%VITE_PUBLIC_ADMIN_DEFAULT_MODERATOR%" data-admin-default-room="%VITE_PUBLIC_ADMIN_DEFAULT_ROOM%" data-admin-moderation-log-limit="%VITE_PUBLIC_ADMIN_MODERATION_LOG_LIMIT%">
<body class="admin-body">
<div class="admin-shell">
<aside class="admin-sidebar" aria-label="Primary">
<div class="brand-block">
+3 -2
View File
@@ -1,12 +1,13 @@
{
"name": "frontend",
"private": true,
"version": "0.0.0",
"version": "1.0.5",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "vite preview",
"lint": "tsc --noEmit"
},
"devDependencies": {
"typescript": "~6.0.2",