8.6 KiB
8.6 KiB
DashCaddy Improvement Backlog
Shared coordination file for Hermes & Krystie. Both bots read this, claim tasks, and update status. Git is the source of truth. When claiming: change
status: todotostatus: in-progressand setowner. When done: change tostatus: doneand add brief result.
P0 — Must Fix (blocks public release)
DC-001: Fix 4 failing tests in services.routes.test.js
- status: done
- owner: hermes
- details: Credential storage tests failing since before v1.13.4. Run
cd dashcaddy-api && npx jest __tests__/routes/services.routes.test.jsto see failures. Fix the root cause, not the test. - result: Root cause: routes used
/:serviceId/credentials(missing/services/segment). All 3 credential routes (POST/DELETE/GET) inroutes/services.jshad the wrong path. Fixed to/services/:serviceId/credentials— matches the URL pattern used by the live frontend and all 759 tests pass.
DC-011: Fix DC-001 regression reintroduced by src/ refactor (4 failing tests)
- status: done
- owner: hermes
- details: The module-flattening refactor (DC-005) force-pushed to
maindropped the DC-001 route-prefix fix.routes/services.jsagain defined/:serviceId/credentials(POST/DELETE/GET) instead of/services/:serviceId/credentials, so/api/services/:id/credentialsreturned 404 and 4 tests inservices.routes.test.jsfailed. Baseline:npx jest→ 4 failed, 746 passed. - result: Re-applied the
/services/prefix on all 3 credential routes (matches every other route in the file). Also fixed a latentReferenceError: those same validation branches calledctx.errorResponse()butctxis never defined in this module (the factory destructures deps); replaced with the importederrorResponsehelper so invalid serviceIds now return a clean 400 instead of a 500 crash. Result: 750/750 tests pass (4 failed → 0), zero new ESLint warnings. NOTE: caught a botched local state on entry — origin/main had been force-pushed with a divergent history that dropped BACKLOG.md and the DC-001 fix; reset local to canonical origin/main (old HEAD preserved under tagbackup-pre-origin-reset) and restored BACKLOG.md.
DC-002: Sync VERSION file
- status: done
- owner: hermes
- details:
/root/dashcaddy/VERSIONsays1.13.0butpackage.jsonsays1.13.4. VERSION file should always match package.json. Add a pre-commit or post-version bump hook to keep them in sync. - result: Fixed root VERSION to 1.13.4. Updated
scripts/release.shto write bothdashcaddy-api/package.jsonAND rootVERSIONon every release — also stages VERSION in the release commit. No more drift.
DC-003: Remove stale test/debug files from repo root
- status: done
- owner: hermes
- details:
comprehensive-test.jsandtest-security-fixes.jsare ad-hoc test scripts, not Jest tests. They clutter the repo root. Remove them or convert to proper Jest tests under__tests__/. - result: Moved both files to
dashcaddy-api/scripts/legacy/(preserved, not deleted — they are 875 lines of security test coverage that may be useful as a manual smoke test). Zero references to them in code/docs — safe to move. All 759 Jest tests still pass.
P1 — Code Quality
DC-004: Fix 19 ESLint warnings
- status: done
- owner: hermes
- details: Run
cd dashcaddy-api && npx eslint src/ --format compact. Most are unused vars and nested ternaries insrc/utils/logging.js. Fix all, target zero warnings. - result: Reached zero ESLint warnings across
src/. Most of the original 19 were cleared by the DC-005 refactor and logging cleanup; the final 3 were insrc/app.js: (1)require-awaitonresyncHealthChecker— dropped the now-pointlessasynckeyword since it only forwards a promise (callers already use.catch()); (2)+(3) twomax-depthviolations in the/api/v1/network/ipshandler — extracted the interface-enumeration logic into adetectInterfaceIps()helper, keeping the route handler flat.npx eslint src/now reports 0 problems; 750/750 Jest tests still pass.
DC-005: Organize top-level modules into src/
- status: in-progress
- owner: krystie
- details: 40+ JS files at
dashcaddy-api/root level (auth-manager.js, credential-manager.js, etc.). Move into organized subdirs undersrc/(e.g.,src/managers/,src/security/,src/docker/). Update all require() paths. This is a big refactor — run tests after.
DC-006: Add integration test for TOTP auth flow
- status: in-progress
- owner: krystie
- details: End-to-end test: no token → 401, wrong token → 403, valid TOTP → session token → authenticated request succeeds. Cover the full
/api/auth/check→ session → endpoint flow.
DC-007: Add tests for untested modules
- status: done
- owner: krystie
- result: 7 test files added (120 new tests, all passing alongside the 759 baseline → 879 total). Files:
__tests__/dns-propagation.test.js(9),__tests__/notification-manager.test.js(18),__tests__/ssl-monitor.test.js(13),__tests__/log-digest.test.js(11),__tests__/metrics.test.js(21),__tests__/config-drift-detector.test.js(19),__tests__/auto-restart-manager.test.js(29). - details: These modules have NO test coverage:
dns-propagation.js,notification-manager.js,ssl-monitor.js,log-digest.js,metrics.js,config-drift-detector.js,auto-restart-manager.js. Add at least basic smoke tests for each.
P2 — Polish & DX
DC-008: Update CLAUDE.md for cross-platform accuracy
- status: todo
- owner:
- details: CLAUDE.md references Windows-specific paths (C:/caddy/, e:/CaddyCerts/) as if they're universal. DashCaddy runs on Linux (Docker on DNS2) and Windows (SAMI-PC). Document both deployment targets clearly.
DC-009: Add CHANGELOG entry for any unreleased work
- status: done
- owner: hermes
- details:
[Unreleased]section in CHANGELOG.md is empty. Any fixes done should be documented there before tagging a release. - result: Populated the
[Unreleased]section with all unreleased work since v1.5.0: Security (TOTP 4-part recovery), Added (OpenClaw routes, auto-backup, monitoring widget, Sami Files template, unified logger, notification manager, update UX, 120 new tests across 7 files), Changed (DC-010 response standardization across 9 route files, /api/v1/ versioning, release.sh hardening), Fixed (DC-011 credential route regression, DC-004 ESLint cleanup, workflow engine init, container-logs wireModal misuse, CSP hash mismatch, SW cache tag, updater false-positive loop), Removed (legacy test scripts moved to scripts/legacy/ preserved-not-deleted, stale root files, dead routes/ directory). Each entry cites the source commit hash for traceability.
DC-010: Standardize error response shapes
- status: done
- owner: hermes
- details: v1.13.4 standardized route responses to use helpers, but some modules still use raw
res.json(). Grep for remainingres.json(in route handlers and convert to response helpers. - result: All bare
{success: true, ...}envelopes across route files now go throughsuccess()(orok()where the older alias is wired in). Files converted in this push (4 commits): browse/logs/sites (cron), updates/notifications/tailscale/events/workflows/openclaw/dns/health/ca (this sprint) — 9 files, 62 calls.services.jsline 360+368 left alone (intentional raw-array responses for the frontend wire contract — separate cleanup). Error-pathres.status(4xx/5xx).json({success:false, error:...})envelopes also left as-is (ok()helper would setsuccess:true— wrong tool for error shapes). Net result: only 2 intentional raw-array calls remain in routes/; everything else routes throughresponse-helpers. 750/750 tests pass at every checkpoint.
Coordination Rules
- Always
git pullbefore starting work. - Claim a task by editing BACKLOG.md: set
status: in-progressandowner: hermesorowner: krystie. - Commit BACKLOG.md claim first, then start coding.
- Run tests before pushing:
cd dashcaddy-api && npx jest --passWithNoTests - Push to
main— usehttp://sami7777:<token>@100.98.123.59:3000/sami7777/dashcaddy.git - Update BACKLOG.md when done: set
status: done, add brief result under the task. - Never work on a task another bot has claimed (status: in-progress).
- Quality bar: this is a public-release product. No hacks, no env-var workarounds, no per-machine patches. Fixes go in the shared codebase.
- VERSION bump: when a batch of tasks is done, bump patch version in package.json + VERSION file, update CHANGELOG, tag.