Conversation
…ees minutes format
…iltered view, while Clear anchors you to the photo while blowing away the filters.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Reintroduces and expands “Admin > Edit Album” functionality (dropped in v12) by adding raw XML fetching/editing and XML regeneration, alongside related navigation/search/map-filter UX improvements.
Changes:
- Add Admin “Edit Album” raw-XML workflow: fetch raw album XML, edit fields (incl. geo/ref), multi-select edits, and generate copy/paste-ready XML.
- Refactor shared item aggregation and improve search/map-filter UX (bookmarking, clear behavior, map filter toggle UI).
- Update types/utilities to support raw vs camel-cased XML shapes and centralize search/reference helpers.
Reviewed changes
Copilot reviewed 40 out of 42 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/search.ts | Extracts matchCorpus boolean-search helper from hook for reuse/perf. |
| src/utils/reference.ts | Centralizes reference URL building + XML ref transform. |
| src/types/common.d.ts | Adds RawXmlItem/RawXmlAlbum and generalized XML casing types. |
| src/models/album.ts | Makes XML transforms more tolerant (caption/city/title) and uses centralized reference transform. |
| src/models/tests/album.test.ts | Updates tests to use new reference utility. |
| src/lib/xml.ts | Adds raw XML parse options and overloads readAlbum for raw parsing. |
| src/lib/persons.ts | Refactors to reuse shared “get all items” utility. |
| src/lib/paths.ts | Adds shared helpers for photo/thumb/video paths. |
| src/lib/get-all-items.ts | Adds shared item aggregation + keyword indexing helpers and mappers. |
| src/lib/generate-clusters.ts | Minor refactor to avoid redundant H3 resolution caching. |
| src/lib/all.ts | Refactors /all data generation to use shared helper. |
| src/hooks/useSearch.tsx | Adds bookmarking + clear behavior changes; moves match logic to utility; new displayed-items plumbing. |
| src/hooks/usePersonsFilter.tsx | Exposes new map-filter clearing state/coordinates. |
| src/hooks/useMemory.tsx | Opens reference links in a new tab. |
| src/hooks/useMapFilter.ts | Adds clear-state handling, displayed-items propagation, and faster selected-id lookup. |
| src/hooks/useBookmark.tsx | Adds bookmark button to copy/update ?select= URL. |
| src/hooks/tests/useSearch.vitest.tsx | Updates tests for new clear behavior and filename-based selection. |
| src/hooks/tests/useMemoryAndMapFilter.test.tsx | Updates mock to match new useSearch return shape. |
| src/components/ThumbImg/styles.module.css | Adds multi-select highlight style. |
| src/components/ThumbImg/index.tsx | Adds multi-select styling and passes click event through. |
| src/components/SplitViewer/index.tsx | Adjusts map centroid behavior during filter/clear. |
| src/components/SlippyMap/styles.module.css | Adds CSS module styling for map filter toggle button. |
| src/components/SlippyMap/options.ts | Minor precedence fix when choosing labels. |
| src/components/SlippyMap/index.tsx | Replaces div-with-role with actual <button> and CSS module styling. |
| src/components/Persons/PersonsClient.tsx | Adds ?select= handling to position gallery by filename. |
| src/components/All/Items.tsx | Changes select-linking to use filename for global uniqueness. |
| src/components/All/AllClient.tsx | Adds ?select= handling to position gallery by filename. |
| src/components/Album/AlbumClient.tsx | Updates ?select= behavior to match filename-based selection and mark viewed. |
| src/components/AdminAlbum/useGeoCopy.tsx | Adds geo clipboard helper (coords/Google Maps URL). |
| src/components/AdminAlbum/useEditCountPill.tsx | Tracks edits across items and displays edits-since-generation pill; applies edits for XML generation. |
| src/components/AdminAlbum/Xml.tsx | Removes old JSON textarea component. |
| src/components/AdminAlbum/Thumbs.tsx | Reworks admin thumbs to operate on raw XML items and support multi-select. |
| src/components/AdminAlbum/Photo.tsx | Updates admin photo rendering to use new path helpers and raw XML items. |
| src/components/AdminAlbum/Fields.tsx | Adds full admin editing UI, geo/ref handling, keyword autocomplete, and XML generation output. |
| src/components/AdminAlbum/AdminAlbumClient.tsx | Adds admin edit page logic: search by filename, keyboard navigation, multi-select editing, and XML loading. |
| package.json | Bumps version and dependency versions. |
| package-lock.json | Updates lockfile for dependency bumps. |
| app/global.css | Moves mapbox control container hiding to global CSS. |
| app/api/admin/xml/[gallery]/[album]/route.ts | Adds API route to fetch raw album XML. |
| app/api/admin/search/route.ts | Adds API route to search filenames across galleries/albums. |
| app/api/admin/keywords/route.ts | Adds API route to fetch indexed keywords for autocomplete. |
| CHANGELOG.md | Adds v12.3.0 changelog entries reflecting new features/fixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Addressed review comments:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 42 out of 44 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Test plan
Manual testing