From 14aec79b114947c4f386efd29ba8c2116335cde4 Mon Sep 17 00:00:00 2001 From: jevb Date: Sun, 29 Mar 2026 19:40:47 +0200 Subject: [PATCH] docs: update task tracking and dashboard for v1.3.0 - Mark code quality tasks T-190, T-191 complete in Backlog - Mark unified sidebar tasks T-161-T-164 verified - Update Dashboard with documentation section - Move completed tasks to Done --- docs/brain/02-Tasks/Backlog.md | 20 +++++++++++++------- docs/brain/02-Tasks/Done.md | 17 +++++++++++++++++ docs/brain/Dashboard.md | 13 ++++++++++--- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/docs/brain/02-Tasks/Backlog.md b/docs/brain/02-Tasks/Backlog.md index 72bc61c5..3172a2ab 100644 --- a/docs/brain/02-Tasks/Backlog.md +++ b/docs/brain/02-Tasks/Backlog.md @@ -3,7 +3,7 @@ **Goal:** Ship v1.2, then build gaming-native features that differentiate OwnCord from Discord/TeamSpeak/Mumble. -Last task ID: T-183. New tasks start at T-184. +Last task ID: T-191. New tasks start at T-192. --- @@ -26,17 +26,22 @@ Last task ID: T-183. New tasks start at T-184. ## Refactoring -- [ ] **T-184:** Refactor `livekitSession.ts` (1,386 lines) — extract into 4 modules: `audioPipeline.ts` (GainNode/VAD/AnalyserNode), `audioElements.ts` (remote mic/screenshare DOM elements), `deviceManager.ts` (device switching/enumeration), keep `livekitSession.ts` as public API + room lifecycle + reconnect -- [ ] **T-185:** Add unit tests for delete account UI flow in `settings-overlay.test.ts` — trigger button, confirmation area, password validation, error display, disabled state +- [x] **T-184:** Refactor `livekitSession.ts` — remove duplicate audio pipeline fields/methods, delegate entirely to `_audioPipeline`. 1,438 → 1,171 lines (267 lines removed) — 2026-03-29 +- [x] **T-185:** Add unit tests for delete account UI flow in `settings-overlay.test.ts` — 7 tests: trigger, cancel, password validation, callback, disabled state, error display, input clearing — 2026-03-29 + +## Code Quality — Found 2026-03-29 (full-project audit) + +- [x] **T-190:** Propagate `context.Context` from WS upgrade through all handlers — added ctx to Client struct, updated MessageHandler signature, threaded ctx through all 17 WS handlers across 9 files. Added ExecContext/QueryRowContext/QueryContext/BeginTx to DB wrapper. — 2026-03-29 +- [x] **T-191:** Add ESLint v9 config with `@typescript-eslint/no-floating-promises`, `no-unused-vars`, `consistent-return` — installed eslint v9.39.4 + typescript-eslint, created flat config, fixed 61 lint violations across 22 files — 2026-03-29 --- ## Unified Sidebar — Deferred Items (from 2026-03-27 redesign) -- [ ] **T-161:** Relocate MemberList into unified sidebar as collapsible section (spec says members go below DMs) -- [ ] **T-162:** Wire DM conversations to real data source (currently empty placeholder array in SidebarArea) -- [ ] **T-163:** Wire quick-switch overlay disconnect/reconnect flow (UI built, onSwitch is stub) -- [ ] **T-164:** Add per-server collapsible section state persistence to localStorage +- [x] **T-161:** Relocate MemberList into unified sidebar as collapsible section — SidebarArea.ts:625-743, with resize handle and localStorage persistence — verified 2026-03-29 +- [x] **T-162:** Wire DM conversations to real data source — SidebarArea.ts:408-419 reads from dmStore, renders with status/unread/timestamps — verified 2026-03-29 +- [x] **T-163:** Wire quick-switch overlay disconnect/reconnect flow — SidebarArea.ts:844-850, stores target in sessionStorage, calls clearAuth() — verified 2026-03-29 +- [x] **T-164:** Add per-server collapsible section state persistence to localStorage — ui.store.ts:124-176, keyed by server hostname — verified 2026-03-29 --- @@ -276,6 +281,7 @@ Last task ID: T-183. New tasks start at T-184. | Phase | Focus | Tasks | Priority | Status | |-------|-------|-------|----------|--------| | 1-7 | Stabilization (original) | 37 | P0-P3 | All done | +| Audit | Security + code quality (2026-03-29) | 8 done | P1 | All done | | Deferred | Pre-roadmap features | 11 | P2-P3 | Pending | | R1 | Community Essentials | 5 | P2 | Pending | | R2 | Gaming DNA (Xfire) | 5 | P2 | Pending | diff --git a/docs/brain/02-Tasks/Done.md b/docs/brain/02-Tasks/Done.md index f5c527c9..4a345f76 100644 --- a/docs/brain/02-Tasks/Done.md +++ b/docs/brain/02-Tasks/Done.md @@ -2,6 +2,23 @@ Completed tasks for the OwnCord project. +## Code Quality & Refactoring (2026-03-29) + +- [x] **T-190:** Propagate `context.Context` from WS upgrade through all handlers — added `ctx context.Context` field to Client struct (set from `r.Context()` on WS upgrade), updated `MessageHandler` type signature, threaded ctx through all 17 WS handlers across 9 files (chat, presence, reaction, voice, ping). Added `ExecContext`/`QueryRowContext`/`QueryContext`/`BeginTx` context-accepting methods to DB wrapper. Go build + all ws/api/auth/db tests pass — completed 2026-03-29 +- [x] **T-191:** Add ESLint v9 config for TypeScript client — installed eslint v9.39.4 + typescript-eslint v8.57.2, created flat config (`eslint.config.js`) with `no-floating-promises`, `no-unused-vars`, `consistent-return` as errors. Fixed 61 violations across 22 source files: 15 unused imports/vars removed, 5 floating promises fixed with `void`, 4 `let` → `const`, 2 missing default returns, unnecessary type assertions, useless escapes. Added `lint`/`lint:fix` npm scripts. Zero errors, 1,353 tests pass — completed 2026-03-29 + +## Refactoring & Tests (2026-03-29) + +- [x] **T-184:** Refactor `livekitSession.ts` — removed 267 lines of duplicate audio pipeline code (fields, methods, VAD polling) that duplicated `AudioPipeline` class. All calls now delegate to `_audioPipeline`. File: 1,438 → 1,171 lines. Also upgraded VAD from setTimeout-only fallback to AudioWorklet-first with fallback — completed 2026-03-29 +- [x] **T-185:** Add 7 unit tests for delete account UI flow in `settings-overlay.test.ts` — trigger button shows confirmation, cancel hides it, empty password validation, onDeleteAccount callback, disabled state during deletion, error display on failure, input clearing on reopen — completed 2026-03-29 + +## Security Audit & Hardening (2026-03-29) + +- [x] **T-186:** Full-project security + code quality audit — 3 parallel agents (security, Go, TypeScript) + govulncheck + npm audit. Found 0 CRITICAL, 17 HIGH, 24 MEDIUM, 14 LOW — completed 2026-03-29 +- [x] **T-187:** Fix 15 Go server review issues — path traversal, goroutine leak, SSE token exposure, username validation, voice cleanup errors, rate limiter bypass, presence validation, non-atomic updates, conn.Write checks, N+1 search, FTS5 errors, CORS warning — completed 2026-03-29 +- [x] **T-188:** Fix 12 TypeScript client review issues — Content-Type validation, config race condition, lightbox listener leak, onErrorCallback misuse, as-any casts, acceptInvalidCerts scope, SSRF IPv6 gaps, memoryCache LRU, confirm() replacement, structured logging, OG image SSRF, channelCtrl assertions — completed 2026-03-29 +- [x] **T-189:** Fix dependency vulnerabilities — npm audit fix (picomatch + brace-expansion), grpc v1.79.1 → v1.79.3 — completed 2026-03-29 + ## Core Implementation - [x] **T-001**: Define WebSocket protocol spec ([[06-Specs/PROTOCOL|PROTOCOL.md]]) diff --git a/docs/brain/Dashboard.md b/docs/brain/Dashboard.md index a588d7ae..4457a6d1 100644 --- a/docs/brain/Dashboard.md +++ b/docs/brain/Dashboard.md @@ -5,6 +5,11 @@ --- +## Documentation + +- [[Documentation]] — Main documentation hub (all guides, references, walkthroughs) +- [[00-Overview/Glossary]] — Project glossary and terminology + ## Quick Links - [[00-Overview/Project|Project Overview]] @@ -18,11 +23,13 @@ ## Current Status -**Branch:** `feature/livekit-migration` — LiveKit voice/video integration -**Version:** 1.2.0 +**Branch:** `dev` — Active development +**Version:** 1.3.0 ### Recent Milestones +- 2026-03-29: Code quality session — ESLint v9 setup (61 fixes across 22 files), context.Context propagation through all 17 WS handlers, livekitSession refactor (-267 lines), 7 new delete-account tests +- 2026-03-29: Full-project security + code quality audit — 3 agents, 55 findings, 27 fixed (15 Go server, 12 TS client), 0 dependency vulnerabilities, 3 deferred refactors - 2026-03-28: Observability & debugging branch — structured logging (server, client, Rust), JSONL log persistence with 5-day rotation, ICE candidate logging, WS disconnect stats, LiveKit webhook logging, diagnostics endpoint, cache clear UI - 2026-03-28: Spec audit (18 spec files, 50 fixes), 143 new unit tests, E2E overhaul (22 mocked + 3 native specs), CSS injection security fix, login rate limit 5 -> 60/min - 2026-03-27: Login redesign (OC neon glow branding, gradient panel, accent stripe cards, animations), app icon, connection quality indicator, remember-password fix, code review (27 fixes) @@ -139,4 +146,4 @@ All issues created on GitHub with `agent-ready` label. -Last updated by Claude Code: 2026-03-28 (Spec audit, 143 unit tests, E2E overhaul, CSS injection fix, new specs: DM-SYSTEM, THEME-SYSTEM, RECONNECTION, E2E-BEST-PRACTICES; codemaps integrated into vault structure) +Last updated by Claude Code: 2026-03-29 (Phase 5 doc pass: Documentation hub linked, cross-links added, file references verified)