diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index aada8d3..992c091 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,29 +1,3 @@ # Copilot Instructions -## Mandatory Task Completion Rule - -After completing ANY task requested by the user, you MUST update the file `changes.md`. - -### Required Format - -Append a new section at the end of `changes.md` using this exact format: - -### Tasks XXX - -```md - - -- -- -- -``` - -### Rules - -- Replace `XXX` with the task number provided by the user (example: `025`). -- The first line inside the code block must be a short commit-style message (imperative tone). -- The bullet list must include all important modifications made. -- Do NOT overwrite previous entries: always APPEND. -- If `changes.md` does not exist, create it. -- If no task number is provided, use the next available number based on the last entry in the file. -- Always ensure formatting matches exactly (heading + code block + bullets). +Checkout the `AGENTS.md` file for instructions on how to use Agents in this project. diff --git a/.gitignore b/.gitignore index baf9354..8f7abe8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ environment.ts /frontend/.env /backend/.env circular-dependencies.png +.agents/skills # Compiled output .angular diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..8ec9c18 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,76 @@ +# AGENTS.md + +## Project Overview + +## Context + +You can get project context from the following files: + +- `/backend/AGENTS.md` +- `/react_frontend/AGENTS.md` + +## Mandatory Task Completion Rule + +#### Update the `changes.md` file after completing any task requested by the user. + +After completing ANY task requested by the user, you MUST update the file `changes.md`. +Append a new section at the end of `changes.md` using this exact format: + +```md +### Milestone XXX + +#### Backend Changes + +- +- +- + +#### Frontend Changes +``` + +#### Rules + +- Always ask the user if this is a new milestone or if you should continue appending to the current milestone. +- Replace `XXX` with the task number provided by the user (example: `025`). +- The bullet list must include all important modifications made. +- Do NOT overwrite previous entries: always APPEND. +- If `changes.md` does not exist, create it. +- If no task number is provided, use the next available number based on the last entry in the file. +- Always ensure formatting matches exactly (heading + code block + bullets). + +### Documentation + +Update the `/backend/docs` and `/react_frontend/docs` folders with any relevant documentation changes related to the task you completed. This includes API documentation, architectural diagrams, or any other relevant docs. + +### Documentation (Obsidian Vault Required) + +You MUST maintain and continuously update the internal project documentation located in `/docs-vault` (Obsidian vault). + +Rules: + +- Every meaningful code change MUST include a documentation update in `/docs-vault`. +- Documentation is considered part of the deliverable: no feature, refactor, or bugfix is complete without updating the vault. +- Use Obsidian-style Markdown and take advantage of Obsidian features: + - Use `[[Wiki Links]]` to connect concepts, modules, services, and files. + - Create a clear network of linked notes instead of isolated documents. + - Add sections like **Overview**, **Responsibilities**, **Key Flows**, **Important Files**, **Environment Variables**, and **Known Issues**. + - When adding a new feature/module, create a dedicated note and link it from relevant areas. + +Vault structure expectations: + +- Maintain a central `docs-vault/Index.md` (entry point) linking to all major documentation areas. +- Maintain core notes such as: + - `docs-vault/Architecture.md` + - `docs-vault/Frontend.md` + - `docs-vault/Backend.md` + - `docs-vault/Electron.md` + - `docs-vault/Database.md` + - `docs-vault/Deployment.md` + - `docs-vault/Env.md` + - `docs-vault/Changelog.md` + +When updating documentation: + +- Always link to related notes using `[[...]]`. +- Keep docs concise, structured, and developer-focused. +- If a change introduces new endpoints, configs, permissions, database models, or breaking changes, update the relevant note(s) immediately. diff --git a/changes.md b/changes.md new file mode 100644 index 0000000..794cfa8 --- /dev/null +++ b/changes.md @@ -0,0 +1,15 @@ +### Milestone 001 + +#### Backend Changes + +- Added `WHERE accuracy = 'EXACT'` filter to `getWatchdayDistribution` in `statisticsController.js` for both EpisodeSeen and EntrySeen queries, so CouchDay chart only reflects exact-date data + +#### Frontend Changes + +- **EntrySeenDialog**: Replaced Calendar popover with native `` for easier year selection; merged date + accuracy into a single row; removed unused `date` state +- **EpisodeSeenEditDialog**: Merged date input and accuracy select into one flex row +- **LibraryGrowthChart**: Changed `getEntryDate` to use only `createdAt` (removed `date_first_seen` fallback); removed watchlist filter so all entries are included +- **SeasonPage**: Added `max-w-4xl` width constraint; changed breadcrumb from "Back to entry" to "Title / Season x" with link to entry +- **EpisodePage**: Added `max-w-4xl` width constraint; changed breadcrumb from generic "Entry / Season" to "Title / Season x / Episode x"; fixed S## display to use `season.season_number` instead of `seasonId` (DB id) +- **SettingsPage**: Added "Cleanup" card section with Scan/Delete buttons for orphan files and orphan media records, using existing maintenance API endpoints +- Created `api/maintenance.ts` API client for maintenance endpoints diff --git a/circular-dependencies.png b/circular-dependencies.png deleted file mode 100644 index 5276e45..0000000 Binary files a/circular-dependencies.png and /dev/null differ