The image is built in CI (.gitea/workflows/docker-build.yml) from the
Dockerfile and pulled from registry.alwisp.com on Unraid. The Dockerfile
recompiles the client (vite build) inside the build and .dockerignore already
excludes these paths from the build context, so tracking them in git served no
purpose.
- Untrack client/dist (regenerated by the Docker build; logo + version stub
sources live in client/public).
- Gitignore client/dist/, data/ (local SQLite volume), and *.tar.gz / *.zip
(local `docker save` exports), alongside the already-ignored node_modules/.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
node_modules was vendored into the repo, which caused platform-specific
rollup/esbuild binary churn on every local install. Dependencies are
installed fresh during the Docker build, so there's no reason to track them.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Documentation:
- Consolidate 6 doc surfaces to 3. Merge Unraid guide into README and
fold durable mobile rules into AGENTS.md; remove README_UNRAID_INSTALL.md,
MOBILE_RESPONSIVE.md, and the misplaced "CPAS Violation Tracker.md" vault note.
- Fix drift across README/AGENTS/in-app guide: clean-cycle roll-off model
(not per-violation 90-day window), auth documented as shipped, dropped
active_cpas_scores view, correct table count (8 tables/0 views), auth
endpoints + ADMIN_PASSWORD in run commands, roadmap updated.
Fixes:
- Audit log / amendment timestamps: SQLite CURRENT_TIMESTAMP is UTC with no
zone marker; new Date() parsed the space-separated form as local time,
shifting entries +5h in Chicago/CDT. Pin the bare form to UTC before
formatting in AuditLog.jsx and AmendViolationModal.jsx.
- Absence - PTO Exhausted: fixed 5 pts -> sliding scale 1-5.
Rebuild client bundle to include the above.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a full CRUD system for user-defined violation types stored in a new
violation_types table. Custom types appear in the violation dropdown alongside
hardcoded types, grouped by category, with ✦ marker and a green Custom badge.
- db/database.js: auto-migration adds violation_types table on startup
- server.js: GET/POST/PUT/DELETE /api/violation-types; type_key auto-generated
as custom_<slug>; DELETE blocked if any violations reference the type
- ViolationTypeModal.jsx: create/edit modal with name, category (datalist
autocomplete from existing categories), handbook chapter reference,
description/reference text, fixed vs sliding point toggle, context field
checkboxes; delete with usage guard
- ViolationForm.jsx: fetches custom types on mount; merges into dropdown via
mergedGroups memo; resolveViolation() checks hardcoded then custom; '+ Add
Type' button above dropdown; 'Edit Type' button appears when a custom type is
selected; newly created type auto-selects; all audit calls flow through
existing audit() helper
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added acknowledgment signature workflow to "Logging a Violation" section (step 7)
- Added toast notification step to violation logging workflow (step 9)
- Updated Violation History section: amend now includes acknowledged-by/date fields
- Added PDF acknowledgment rendering note to Violation History
- Added "Toast Notifications" as standalone feature section
- Updated Amendable Fields to include acknowledged_by and acknowledged_date
- Updated Immutability Rules table with ack fields
- Moved acknowledgment signature and toast system to Shipped in roadmap
- Removed acknowledgment signature from Near-term (already shipped)
- Toast success/error on PDF download, negate, restore, hard delete
- Toast success on employee edit and violation amendment via modal callbacks
- Error details from API responses included in error toasts
- New "Employee Acknowledgment" section with acknowledged_by name and date
- Replaces blank signature line on PDF with recorded acknowledgment
- Toast notifications for submit success/error, PDF download, and validation warnings
- Inline status messages retained as fallback
- ToastProvider context with useToast hook
- Supports success, error, info, and warning variants
- Auto-dismiss with configurable duration (default 4s)
- Slide-in animation with progress bar
- Stacks up to 5 toasts, oldest dismissed first
- Consistent with dark theme UI