diff --git a/AGENTS.md b/AGENTS.md index c1c532278..4028d8523 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -212,16 +212,17 @@ Each new feature or major change should be documented in an artifact specificati ### Organization - **Location**: All artifact specifications are stored in the `artifacts/` directory. -- **Dated Folders**: Specifications should be placed in a subfolder named by the current date (e.g., `artifacts/YYYY-MM-DD/`). +- **Dated Folders**: Specifications **MUST** be placed in a subfolder named by the current date (e.g., `artifacts/YYYY-MM-DD/`). +- **CRITICAL**: Do **NOT** create specification files directly in the `artifacts/` root. Always use the dated folder. - **Filename**: Use descriptive names for the specification files (e.g., `move-to-library-specification.md`). ### Managing Folders -A `Makefile` is provided in the `artifacts/` directory to quickly set up the folder for the current day: +A `Makefile` is provided in the `artifacts/` directory to quickly set up the folder for the current day. **AI Assistants should always run this command first** if the today folder does not exist: ```bash cd artifacts -make # Runs the 'today' target to create the dated folder +make # Runs the 'today' target to create the dated folder (e.g. artifacts/2026-02-17) ``` ### Purpose diff --git a/artifacts/2026-02-17/ui_enhancements.md b/artifacts/2026-02-17/ui_enhancements.md new file mode 100644 index 000000000..0119a6eb3 --- /dev/null +++ b/artifacts/2026-02-17/ui_enhancements.md @@ -0,0 +1,21 @@ +# UI Enhancements + +## 1. Home View Header Shortcuts + +Add navigation buttons next to specific shelf headlines on the Home view that link to the full library pages with appropriate sorting. + +### Shelves and Targets + +| Shelf ID | Headline | Target Page | Sort Criteria | +| :--- | :--- | :--- | :--- | +| `recently-added` | Recently Added | `/library/:id/bookshelf` | `addedAt` Descending | +| `recent-series` | Recent Series | `/library/:id/bookshelf/series` | `addedAt` Descending | +| `newest-authors` | Newest Authors | `/library/:id/bookshelf/authors` | `addedAt` Descending | + +### Implementation Details + +- **Component**: `client/components/app/BookShelfRow.vue` +- **Trigger**: New button next to the `h2` title in the `categoryPlacard`. +- **Action**: + 1. Update Vuex store settings for the specific sort (e.g., `orderBy` for library, `seriesSortBy` for series, `authorSortBy` for authors). + 2. Navigate to the target page. diff --git a/client/components/app/BookShelfRow.vue b/client/components/app/BookShelfRow.vue index fac89a70b..5f3d85751 100644 --- a/client/components/app/BookShelfRow.vue +++ b/client/components/app/BookShelfRow.vue @@ -38,6 +38,11 @@

{{ $strings[shelf.labelStringKey] }}

+ + +
@@ -84,9 +89,24 @@ export default { }, isSelectionMode() { return this.$store.getters['globals/getIsBatchSelectingMediaItems'] + }, + isLinkableShelf() { + return ['recently-added', 'recent-series', 'newest-authors'].includes(this.shelf.id) } }, methods: { + goToShelfFullPage() { + if (this.shelf.id === 'recently-added') { + this.$store.dispatch('user/updateUserSettings', { orderBy: 'addedAt', orderDesc: true }) + this.$router.push(`/library/${this.currentLibraryId}/bookshelf`) + } else if (this.shelf.id === 'recent-series') { + this.$store.dispatch('user/updateUserSettings', { seriesSortBy: 'addedAt', seriesSortDesc: true }) + this.$router.push(`/library/${this.currentLibraryId}/bookshelf/series`) + } else if (this.shelf.id === 'newest-authors') { + this.$store.dispatch('user/updateUserSettings', { authorSortBy: 'addedAt', authorSortDesc: true }) + this.$router.push(`/library/${this.currentLibraryId}/bookshelf/authors`) + } + }, clearSelectedEntities() { this.updateSelectionMode(false) },