diff --git a/AGENTS.md b/AGENTS.md index 2ba4fabc6..036470a3f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # PhotoPrism® — Repository Guidelines -**Last Updated:** February 24, 2026 +**Last Updated:** February 25, 2026 ## Purpose @@ -208,7 +208,7 @@ Note: Across our public documentation, official images, and in production, the c ### Playwright MCP Usage - **Endpoint & Navigation** — Playwright MCP is preconfigured to reach the dev server at `http://localhost:2342/`. - Use `playwright__browser_navigate` to open the login route under the configured frontend URI (default `/library/login`), sign in, and then call `playwright__browser_take_screenshot` to capture the page state. + Use `playwright__browser_navigate` to open the login route under the configured frontend URI (default `/library/login` for CE/Plus/Pro, `/portal/admin/login` for Portal), sign in, and then call `playwright__browser_take_screenshot` to capture the page state. - **Viewport Defaults** — Desktop sessions open with a `1280×900` viewport by default. Use `playwright__browser_resize` if the viewport is not preconfigured or you need to adjust it mid-run. - **Mobile Workflows** — When testing responsive layouts, use the `playwright_mobile` server (for example, `playwright_mobile__browser_navigate`). @@ -352,7 +352,7 @@ Note: Across our public documentation, official images, and in production, the c - `PhotoFixtures.Get()` and similar helpers return value copies; when a test needs the database-backed row (with associations preloaded), re-query by UID/ID using helpers like `entity.FindPhoto(fixture)` so updates observe persisted IDs and in-memory caches stay coherent. - For slimmer tests that only need config objects, prefer the new helpers in `internal/config/test.go`: `NewMinimalTestConfig(t.TempDir())` when no database is needed, or `NewMinimalTestConfigWithDb("", t.TempDir())` to spin up an isolated SQLite schema without seeding all fixtures. - When you need illustrative credentials (join tokens, client IDs/secrets, etc.), reuse the shared `Example*` constants (see `internal/service/cluster/examples.go`) so tests, docs, and examples stay consistent. -- Hidden error UI checks for the hidden route under the frontend URI (default `/library/hidden`) require both `files.file_error` and `photos.photo_quality = -1`; hidden searches are quality-gated, so setting only `file_error` will not surface the row in Hidden results. +- Hidden error UI checks for the hidden route under the frontend URI (default `/library/hidden` for CE/Plus/Pro, `/portal/admin/hidden` for Portal) require both `files.file_error` and `photos.photo_quality = -1`; hidden searches are quality-gated, so setting only `file_error` will not surface the row in Hidden results. ### Roles & ACL diff --git a/CODEMAP.md b/CODEMAP.md index f1fbe8140..6c53a15cf 100644 --- a/CODEMAP.md +++ b/CODEMAP.md @@ -1,6 +1,6 @@ PhotoPrism — Backend CODEMAP -**Last Updated:** February 24, 2026 +**Last Updated:** February 25, 2026 Purpose - Give agents and contributors a fast, reliable map of where things live and how they fit together, so you can add features, fix bugs, and write tests without spelunking. @@ -63,7 +63,7 @@ HTTP API - `make swag-json` runs a stabilization step (`swaggerfix`) removing duplicated enums for `time.Duration`; API uses integer nanoseconds for durations. - `/api/v1/metrics` (see `internal/api/metrics.go`) exposes Prometheus metrics, including cached filesystem/account usage derived from `config.Usage()`, registered user/guest totals, and portal cluster node counts when `NodeRole=portal`; the handler returns the standard Prometheus exposition content type (`text/plain; version=0.0.4`). - Common groups in `routes.go`: sessions, OAuth/OIDC, config, users, services, thumbnails, video, downloads/zip, index/import, photos/files/labels/subjects/faces, batch ops, cluster, technical (metrics, status, echo). -- Hidden search behavior (used by the hidden route under the configured frontend URI, default `/library/hidden`) is implemented in `internal/entity/search/photos.go`: +- Hidden search behavior (used by the hidden route under the configured frontend URI, default `/library/hidden` for CE/Plus/Pro and `/portal/admin/hidden` for Portal) is implemented in `internal/entity/search/photos.go`: - `frm.Hidden` enforces `photos.photo_quality = -1` and `photos.deleted_at IS NULL`. - Non-hidden searches exclude errored files by default (`files.file_error = ''`) unless `frm.Error` is explicitly set. - Search DTOs in `internal/entity/search/photos_results.go` expose `FileError` (`files.file_error`) so clients can render hidden reasons without loading full file details first. diff --git a/frontend/CODEMAP.md b/frontend/CODEMAP.md index 8ad3f7479..df64d36a1 100644 --- a/frontend/CODEMAP.md +++ b/frontend/CODEMAP.md @@ -1,6 +1,6 @@ PhotoPrism — Frontend CODEMAP -**Last Updated:** February 23, 2026 +**Last Updated:** February 25, 2026 Purpose - Help agents and contributors navigate the Vue 3 + Vuetify 3 app quickly and make safe changes. @@ -35,7 +35,7 @@ Startup Templates & Splash Screen Runtime & Plugins - Vue 3 + Vuetify 3 (`createVuetify`) with MDI icons; themes from `src/options/themes.js` -- Router: Vue Router 4, history base at `$config.frontendUri` (default `/library`) +- Router: Vue Router 4, history base at `$config.frontendUri` (default `/library` for CE/Plus/Pro and `/portal/admin` for Portal) - I18n: `vue3-gettext` via `common/gettext.js`; canonical extraction via root `make gettext-extract` (scans `frontend/src` plus available overlays in `plus/frontend`, `pro/frontend`, and `portal/frontend`), compile with `npm run gettext-compile` - HTML sanitization: `vue-3-sanitize` + `vue-sanitize-directive` - Tooltips: `floating-vue`