Commit Graph
82 Commits
Author SHA1 Message Date
James Cox 3fdb63f00d chore(ui): remove remaining series chart template casts
- Series progress chart:
  - replace the remaining `$any($event.target)` template casts with typed input and select handlers
  - keep the search, filter, and sort behavior unchanged while removing leftover template conversion debt
- Validation:
  - `just ui check`
  - `just ui typecheck`
  - `just ui test`
2026-04-22 17:26:51 -04:00
James Cox 43389c8dc4 fix(ui): restore frontend verification after eslint cleanup
- Reader and metadata typing:
  - align ebook and cbx reader event, progress, dialog, and helper types with the stricter checks surfaced by the ESLint cleanup
  - replace unsafe non-null assertions and broad event assumptions with guarded access in reader, metadata, and shelf flows
- Template and component compatibility:
  - tighten menu item typing for Angular template checking and normalize overlay and card click handlers to use explicit DOM event types
  - repair chart, preferences, and websocket factory typings that broke standalone typecheck and production build validation
- Tests:
  - fix the magic shelf form-array assertion so the frontend test suite compiles cleanly under the stricter checker
- Validation:
  - `just ui check`
  - `just ui typecheck`
  - `just ui test`
2026-04-22 17:26:51 -04:00
James Cox 782bd63664 chore(ui): clear reader core any bucket
Replace the final ebook reader any usages with explicit Foliate view, renderer, search, and custom event interfaces.

This completes the frontend ESLint backlog without changing the reader architecture.

Validation: just ui lint
2026-04-22 17:26:51 -04:00
James Cox af9a53dd4e chore(ui): clear reader state any bucket
Replace remaining reader-side any usages outside the core managers with concrete relocate, annotation, renderer, timer, and EPUB metadata types.

This leaves the final no-explicit-any cleanup isolated to event.service and view-manager.service.

Validation: just ui lint
2026-04-22 17:26:51 -04:00
James Cox e12f4ea827 chore(ui): clear reader utility any bucket
Replace reader-adjacent any usages in footer data shapes, settings sync helpers, panel search mapping, legacy font migration, and PDF annotation serialization.

Keep the remaining no-explicit-any backlog isolated to the ebook reader core and annotation/progress surfaces.

Validation: just ui lint
2026-04-22 17:26:50 -04:00
James Cox 3700e356b4 chore(ui): clear settings and stats any bucket
Replace low-risk any usages in settings flows, paginator state handling, and chart helper code with concrete local types.

Leave the remaining no-explicit-any backlog isolated to reader-specific files for the next passes.

Validation: just ui lint
2026-04-22 17:26:50 -04:00
James Cox f7a5d939ae chore(ui): clear helper service any bucket
Replace helper and service any usages with concrete local shapes, typed records, or unknown fallbacks.

Keep runtime behavior unchanged while shrinking the remaining no-explicit-any backlog.

Validation: just ui lint
2026-04-22 17:26:50 -04:00
James Cox 2e66fd30b6 chore(ui): clear test and declaration any bucket
Replace low-risk any usages in test harnesses, specs, and epubjs type declarations with concrete unions, unknown, or Angular form types so the no-explicit-any backlog starts shrinking without changing runtime behavior.

Validation: just ui lint
2026-04-22 17:26:50 -04:00
James Cox 878cfa09c8 chore(ui): clear final prefer-inject bucket
Convert the remaining feature and core constructors flagged by prefer-inject to field injection so the last Angular inject() violations are removed across upload dialogs, core services, and bookdrop flows.

Validation: just ui lint
2026-04-22 17:26:50 -04:00
James Cox 4f7d38a306 chore(ui): clear reader settings prefer-inject bucket
Convert reader settings and shared setup/custom-font components to field injection so these UI surfaces follow the project inject() convention without changing behavior.

Validation: just ui lint
2026-04-22 17:26:49 -04:00
James Cox b3fe4fd598 chore(ui): clear shared prefer-inject bucket
Convert the shared layout shell and shared service constructors to field injection so the frontend shell matches the repo's Angular inject() guidance without changing behavior.

Validation: just ui lint
2026-04-22 17:26:49 -04:00
James Cox 68e3df7cde chore(ui): clear eslint angular style guide bucket
Rename reader dialog outputs away from native DOM event names and convert the menu item component to an element selector so the remaining Angular style-guide lint rules are satisfied without changing behavior.

Validation: just ui lint
2026-04-22 17:26:49 -04:00
James Cox 935b3edced chore(ui): clear eslint optional chain assertion bucket
Replace non-null assertions on optional chains in the library and shelf menu actions with direct entity assertions so the commands keep their current assumptions without tripping the stricter TypeScript lint rule.

Validation: just ui lint
2026-04-22 17:26:49 -04:00
James Cox 79eef411d2 chore(ui): clear eslint expression cleanup bucket
Replace remaining side-effect ternaries with explicit control flow and drop unused error bindings so the affected editors and readers satisfy the current TypeScript lint rules.

Validation: just ui lint
2026-04-22 17:26:48 -04:00
James Cox ac6b44e64e chore(ui): clear eslint control flow bucket
Convert the remaining audit log template ngIf directives to built-in control flow so the template follows the configured Angular control-flow style.

Validation: just ui lint
2026-04-22 17:26:48 -04:00
James Cox eba9688112 chore(ui): clear eslint empty object type bucket
Replace empty object placeholder parameters in dialog helpers with object types so the intent stays object-shaped without relying on the permissive {} type.

Validation: just ui lint
2026-04-22 17:26:48 -04:00
James Cox ea15719b6c chore(ui): clear eslint mechanical style bucket
Replace loose template null checks with strict null and undefined comparisons and convert the remaining simple index loops to for-of iteration.

Keep behavior intact while clearing the low-risk mechanical lint backlog in templates and chart helpers.

Validation: just ui lint
2026-04-22 17:26:48 -04:00
James Cox 18784fd12d chore(ui): clear eslint interaction accessibility bucket
Add keyboard handlers and focus support to clickable UI affordances across reader dialogs, metadata views, cards, and layout controls.

Keep the existing click behavior intact while making non-button elements operable from the keyboard and clearing the remaining template interaction accessibility backlog.

Validation: just ui lint
2026-04-22 17:26:48 -04:00
James Cox b03ecf3a5e chore(ui): clear eslint label-association bucket
- Frontend accessibility cleanup:
  - add concrete `for` and `id` or `inputId` bindings where labels map to real inputs, selects, and number fields
  - convert remaining row headers and grouped-control captions from `<label>` to `<span>` where the markup described composite controls rather than a single form element
- Lint progress:
  - clear the remaining `@angular-eslint/template/label-has-associated-control` backlog from 109 issues to 0
  - reduce total frontend lint errors from 532 to 423 while keeping the next accessibility buckets isolated
- Validation:
  - `just ui lint`
2026-04-22 17:26:47 -04:00
James Cox 0a407f6fae chore(ui): clear eslint presentation-label bucket
- Frontend accessibility cleanup:
  - replace presentational `<label>` elements with `<span>` in settings, reader preferences, and file-mover templates where the text was acting as a control-group heading rather than a form label
  - keep the markup semantics aligned with toggles, sliders, button groups, and custom components instead of forcing fake label associations
- Lint progress:
  - reduce the `@angular-eslint/template/label-has-associated-control` backlog by removing false-positive label markup before the real control-association pass
- Validation:
  - `just ui lint`
2026-04-22 17:26:47 -04:00
James Cox 5dfd1e18d9 chore(ui): clear eslint empty-function bucket
- Frontend lifecycle cleanup:
  - remove empty `ngOnInit` stubs and redundant `OnInit` implementations from components that already initialize through signals or effects
  - drop related unused injections that only supported those empty hooks
- No-op handling:
  - replace empty catch and callback blocks with explicit no-op expressions or early returns so the existing behavior stays unchanged while satisfying lint
  - keep silent failure paths silent where the UI intentionally ignores those errors today
- Validation:
  - ran `just ui lint` and cleared the empty lifecycle, empty function, and `no-empty` bucket; the command still fails on the remaining ESLint backlog
  - ran `just ui check`; deps and typecheck pass, and the remaining failure is the outstanding ESLint backlog
2026-04-22 17:26:47 -04:00
James Cox 0d6f83bed0 chore(ui): clear eslint no-unused-vars bucket
- Frontend lint cleanup:
  - remove unused imports, constants, locals, and callback parameters across the UI codebase
  - keep template and callback signatures intact where bindings still pass event arguments by explicitly consuming the values instead of changing behavior
- Metadata and reader surfaces:
  - trim dead symbols in the metadata editor, viewer, search, and reader flows without mixing in broader refactors
  - preserve existing runtime behavior while tightening the code paths that the ESLint bucket touches
- Validation:
  - ran `just ui lint` and cleared the `@typescript-eslint/no-unused-vars` bucket; the command still fails on the remaining ESLint backlog
  - ran `just ui check`; deps and typecheck pass, and the remaining failure is the outstanding ESLint backlog
2026-04-22 17:26:47 -04:00
James Cox c0dff27f78 style(frontend): enforce selector-class-pattern in scss
- Stylelint:
  - re-enable selector-class-pattern in the frontend Stylelint config
  - keep the selector rename isolated because this rule is the only remaining bucket that crosses stylesheet and template changes
- Series page:
  - rename the metadata card modifier classes to kebab-case in both the stylesheet and template
- Bookdrop and stats:
  - rename the fixed field label and series-name helper classes to kebab-case in the picker stylesheet and template
  - correct the responsive dialog footer selector to PrimeNG's kebab-case class name
- Validation:
  - run just ui stylelint
2026-04-22 17:26:47 -04:00
James Cox ee02f6e386 style(frontend): enforce property-no-vendor-prefix in scss
- Stylelint:
  - re-enable property-no-vendor-prefix in the frontend Stylelint config
  - apply the rule cleanup as its own commit so browser-compatibility changes stay reviewable in isolation
- Styles:
  - remove flagged vendor-prefixed property forms where an unprefixed property already exists or is now used instead
  - clean up duplicate standard declarations left behind by the autofix pass
- Validation:
  - run just ui stylelint
2026-04-22 17:26:46 -04:00
James Cox 0b34a85c50 style(frontend): scope no-invalid-position-declaration for scss mixins
- Stylelint:
  - re-enable no-invalid-position-declaration in the frontend Stylelint config
  - ignore nested @media blocks so shared Sass mixins can keep their responsive declarations without tripping a false positive
- Shared styles:
  - avoid a risky refactor of the auth, panel, and settings mixins, which rely on Sass media bubbling for responsive output
- Validation:
  - run just ui stylelint
2026-04-22 17:26:46 -04:00
James Cox 7058992145 style(frontend): enforce keyframes-name-pattern in scss
- Stylelint:
  - re-enable keyframes-name-pattern in the frontend Stylelint config
  - keep the rule rollout isolated so the animation naming change can be reviewed or reverted independently
- Animation styles:
  - rename camelCase keyframes to kebab-case in the flagged reader, metadata, auth, and directory-picker stylesheets
  - update the matching local animation references in the same files so behavior stays unchanged
- Validation:
  - run just ui stylelint
2026-04-22 17:26:46 -04:00
James Cox 32765de84c style(frontend): enforce declaration-block-single-line-max-declarations in scss
- Stylelint:
  - re-enable declaration-block-single-line-max-declarations in the frontend Stylelint config
  - keep the rule change isolated to a formatting-only commit for easier rollback if needed
- Chart styles:
  - expand compressed declaration blocks in the stats chart styles into multi-line blocks
  - reformat the book flow empty-state styles without changing selectors or declarations
- Layout styles:
  - expand the topbar animation keyframe blocks and bulk ISBN status styles to satisfy the single-line declaration limit
- Validation:
  - run just ui stylelint
2026-04-22 17:26:46 -04:00
James Cox df12acd7fb style(frontend): enforce property-no-deprecated in scss
- Stylelint:
  - re-enable `property-no-deprecated` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions unchanged
- SCSS:
  - replace deprecated `word-wrap` aliases with `overflow-wrap` in the affected frontend stylesheets and remove duplicate declarations created during the migration
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:46 -04:00
James Cox 1a6588432c style(frontend): enforce declaration-property-value-keyword-no-deprecated
- Stylelint:
  - re-enable `declaration-property-value-keyword-no-deprecated` in the frontend Stylelint config while preserving the agreed Angular and legacy Sass exceptions
- SCSS:
  - replace deprecated `word-break: break-word` usage with `overflow-wrap: anywhere` in the affected frontend stylesheets
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:45 -04:00
James Cox 43412c0d29 style(frontend): enforce at-rule-empty-line-before in scss
- Stylelint:
  - re-enable `at-rule-empty-line-before` in the frontend Stylelint config while preserving the agreed Angular and legacy Sass exceptions
- SCSS:
  - normalize blank-line spacing before Sass includes, media queries, and other at-rules where the repo was inconsistent
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:45 -04:00
James Cox e68938f916 style(frontend): enforce scss dollar-variable-empty-line-before
- Stylelint:
  - re-enable `scss/dollar-variable-empty-line-before` in the frontend Stylelint config while preserving the agreed Angular and legacy Sass exceptions
- SCSS:
  - keep the existing Sass variable block spacing as the enforced convention without requiring additional source changes
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:45 -04:00
James Cox 2ee5dce427 style(frontend): enforce scss dollar-variable-pattern in layout styles
- Stylelint:
  - re-enable `scss/dollar-variable-pattern` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions intact
- SCSS:
  - rename the remaining camelCase layout Sass variables to kebab-case and update all layout partial references accordingly
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:45 -04:00
James Cox d95424dd22 style(frontend): enforce no-empty-source in scss
- Stylelint:
  - re-enable `no-empty-source` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions untouched
- SCSS:
  - replace empty stylesheet files with explicit placeholder comments to document that those surfaces intentionally rely on shared styling
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:45 -04:00
James Cox a689751e39 style(frontend): enforce number-max-precision in scss
- Stylelint:
  - re-enable `number-max-precision` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions unchanged
- SCSS:
  - round overly precise rem values in the shared tag component stylesheet to the configured precision without changing the size scale materially
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:44 -04:00
James Cox 55f448191f style(frontend): enforce rule-empty-line-before in scss
- Stylelint:
  - re-enable `rule-empty-line-before` in the frontend Stylelint config while preserving the agreed Angular and legacy Sass exceptions
- SCSS:
  - normalize blank-line spacing before nested rules and sibling blocks across frontend stylesheets without changing selectors or computed styles
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:44 -04:00
James Cox a04daac341 style(frontend): enforce declaration-empty-line-before in scss
- Stylelint:
  - re-enable `declaration-empty-line-before` in the frontend Stylelint config while leaving the agreed Angular and legacy Sass exceptions unchanged
- SCSS:
  - normalize declaration spacing across frontend stylesheets to match the enforced empty-line convention without changing selectors or computed styles
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:44 -04:00
James Cox a991351bb5 style(frontend): enforce color-hex-length in scss
- Stylelint:
  - re-enable `color-hex-length` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions as-is
- SCSS:
  - normalize repeatable long hex colors to their short form where the value is identical
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:44 -04:00
James Cox 7b9830faf5 style(frontend): enforce shorthand-property-no-redundant-values in scss
- Stylelint:
  - re-enable `shorthand-property-no-redundant-values` in the frontend Stylelint config while leaving the agreed Angular and legacy Sass exceptions intact
- SCSS:
  - collapse redundant shorthand values across frontend stylesheets without changing computed spacing or sizing
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:43 -04:00
James Cox e46f87eb96 style(frontend): enforce media-feature-range-notation in scss
- Stylelint:
  - re-enable `media-feature-range-notation` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions untouched
- SCSS:
  - convert parenthesized `min-` and `max-` media features to context range notation across frontend stylesheets without changing breakpoint values
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:43 -04:00
James Cox ddcbb5b666 style(frontend): enforce color-function-notation in scss
- Stylelint:
  - re-enable `color-function-notation` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions unchanged
- SCSS:
  - normalize comma-based `rgb(...)` color syntax to modern space-and-slash notation across frontend stylesheets without changing color values
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:43 -04:00
James Cox 130463bc4b style(frontend): enforce color-function-alias-notation in scss
- Stylelint:
  - re-enable `color-function-alias-notation` in the frontend Stylelint config while preserving the agreed Angular and legacy Sass exceptions
- SCSS:
  - replace legacy `rgba(...)` aliases with `rgb(...)` across the frontend stylesheet tree without changing color values or selector structure
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:43 -04:00
James Cox 6921da76ba style(frontend): enforce alpha-value-notation in scss
- Stylelint:
  - re-enable `alpha-value-notation` in the frontend Stylelint config while keeping the agreed Angular and legacy Sass exceptions disabled
- SCSS:
  - rewrite decimal alpha values to percentage notation across the frontend stylesheet tree without changing selector structure or layout behavior
- Validation:
  - `just ui stylelint`
2026-04-22 17:26:43 -04:00
James Cox dbd1f20357 style(frontend): resolve the remaining stylelint findings
Merge duplicate SCSS selectors that were only tripping stylelint, add a generic fallback for the PrimeIcons font usage, and relax the legacy Sass variable naming rule for the shared layout variables.

Validation:
- just ui stylelint
2026-04-22 17:26:42 -04:00
James Cox 237c54bacf fix(packaging): keep the frontend compatibility symlink in docker context
- Docker packaging:
  - stop excluding the temporary booklore-ui compatibility symlink from the Docker build context
  - keep the denylist for generated frontend and backend artifacts unchanged
- Why:
  - downstream packaging or helper scripts may still resolve files through booklore-ui during the transition window
  - excluding the symlink would break that compatibility contract inside Docker builds even though the repo still keeps the alias locally
- Validation:
  - verify booklore-ui is no longer denied by .dockerignore
2026-04-22 17:26:42 -04:00
James Cox a735bf12cd chore(packaging): simplify dockerignore to a denylist
- Docker packaging:
  - replace the fragile deny-all plus allowlist dockerignore pattern with a direct denylist of irrelevant and generated paths
  - exclude the legacy booklore-ui symlink, frontend build caches and outputs, and backend build artifacts from the image context
- Why:
  - the previous pattern made every rename and every new Docker input easy to miss, which is how the frontend path fell out of the build context
  - the simpler denylist keeps the Dockerfile as the primary source of truth for included files
- Validation:
  - verify the Dockerfile inputs remain outside the denylist
  - local docker image validation was not run because the Docker daemon is unavailable in this environment
2026-04-22 17:26:41 -04:00
James Cox 00f116a474 fix(packaging): include frontend in the docker build context
- Docker packaging:
  - update .dockerignore to whitelist the renamed frontend directory instead of the old booklore-ui path
  - keep the generated frontend build artifacts excluded so the build context stays lean
- Why:
  - the packaging smoke test was failing because Docker could not see frontend/ in the build context, which broke COPY frontend/ ./ in the frontend build stage
- Validation:
  - verify the .dockerignore whitelist now includes frontend/** and matches the Dockerfile copy paths
  - local docker image validation was not run because the Docker daemon is unavailable in this environment
2026-04-22 17:26:41 -04:00
James Cox d59d5f7c87 build(frontend): make deps checks work with yarn 4
- Frontend tooling:
  - replace the deprecated yarn list invocation in frontend/Justfile with a Yarn 4 compatible dependency listing command
  - keep the change scoped to the deps recipe so CI can move past the package-manager mismatch cleanly
- Validation:
  - run just ui deps
2026-04-22 17:26:41 -04:00
James Cox dcd264cf6b fix(ci): align github actions with yarn 4 frontend tooling
- Test suite workflow:
  - stop relying on setup-node's Yarn 1 cache integration for the frontend job
  - enable Corepack explicitly before the frontend install and test steps so the reusable test suite runs with Yarn 4
- Frontend threshold workflow:
  - switch the job from the old booklore-ui/npm path to frontend/Corepack/Yarn commands
  - keep the existing threshold logic, but run install, typecheck, build, and ESLint through the current frontend command surface
- Release workflows:
  - enable Corepack before installing Yarn-based release tooling in the stable and preview release jobs
  - remove the setup-node Yarn cache settings that fail against packageManager-pinned Yarn 4 projects
- Validation:
  - run just ui install-ci
  - verify the threshold workflow commands produce lint-results.json and build-output.log locally
  - run just ui deps and confirm just ui check now reaches the existing ESLint backlog instead of failing on Yarn 1 CI setup
2026-04-22 17:26:41 -04:00
James Cox dc2c1ec395 chore(frontend-lint): tune stylelint for Angular and legacy SCSS patterns
- Stylelint configuration:
  - ignore Angular-specific pseudo-elements such as `::host`
  - stop flagging underscore-prefixed SCSS partial imports that match the existing layout partial convention
  - drop empty-source and precision-only checks that were adding noise without improving maintainability
- Lint surface:
  - keep the higher-signal duplicate-selector, naming, and font-family checks in place
  - reduce the manual stylelint queue from 62 findings to 10 actionable errors

- Validation:
  - `just ui stylelint` now reports 10 errors after the config update
2026-04-22 17:26:41 -04:00
James Cox e2a8e6a1d6 style(frontend): apply the first eslint autofix pass
- ESLint autofixes:
  - apply the safe automatic ESLint rewrites without taking on manual typing, accessibility, or Angular inject migrations
  - normalize `==` and `!=` comparisons in templates, convert `Array<T>` to `T[]`, and tighten a small set of `let` declarations to `const`
  - remove `autofocus` attributes that ESLint can rewrite mechanically
- Cleanup scope:
  - keep this pass limited to files changed by `ng lint --fix` so the remaining 702 manual ESLint findings stay isolated for later review

- Validation:
  - `env YARN_ENABLE_GLOBAL_CACHE=0 YARN_CACHE_FOLDER=../.yarn/cache corepack yarn lint:eslint --fix` reduced the remaining ESLint count from 721 to 702 before stopping on non-fixable issues
2026-04-22 17:26:40 -04:00
James Cox 34fc60050f style(frontend): apply the first stylelint autofix pass
- SCSS autofixes:
  - apply Stylelint's automatic fixes across the frontend stylesheet set without touching TypeScript or Angular templates
  - normalize zero values, shorthand properties, selector casing, and similar mechanical stylesheet rewrites
  - keep this pass limited to autofix output so the remaining manual stylelint findings stay isolated for later review
- Cleanup scope:
  - update component SCSS and shared layout styles only where Stylelint could rewrite them mechanically
  - leave the unresolved manual stylelint findings in place for a smaller follow-up pass

- Validation:
  - `just ui stylelint-fix` reduced the remaining stylelint count from 140 to 62 before stopping on non-fixable issues
2026-04-22 17:26:40 -04:00
James Cox cef000d425 chore(frontend-lint): add local typecheck and stylelint commands
- Frontend package scripts:
  - add a dedicated `typecheck` script for `tsc --noEmit`
  - split ESLint into `lint:eslint` and add `lint:styles` plus `lint:styles:fix`
  - keep the top-level `lint` script as a combined frontend lint entrypoint
  - restore `postcss` so the frontend dependency graph satisfies the peer requirements used by Angular build tooling and Stylelint
- Frontend command surface:
  - add `typecheck`, `stylelint`, and `stylelint-fix` recipes to `frontend/Justfile`
  - expand the frontend `check` and `ci-check` recipes to include typechecking, stylesheet linting, and a production build
- Stylelint configuration:
  - add `frontend/stylelint.config.js` using the standard SCSS config as the base
  - pare back the noisiest formatting and notation rules so the initial lint layer stays actionable instead of forcing a repo-wide SCSS rewrite
- Lockfile:
  - refresh `frontend/yarn.lock` for the new frontend lint dependencies

- Validation:
  - `just ui install`
  - `just ui typecheck`
  - `just ui stylelint` currently reports 140 errors, with 76 marked autofixable
2026-04-22 17:26:40 -04:00
James Cox 4ddc567406 chore(frontend): add temporary booklore-ui compatibility symlink
- Compatibility layer:
  - add a repo-root `booklore-ui` symlink that resolves to `frontend`
  - preserve the legacy path temporarily while downstream tooling, local scripts, and open branches catch up to the renamed frontend directory
- Migration safety:
  - keep the compatibility shim isolated from the rename and Yarn migration commits so it can be removed later in one explicit follow-up change

- Validation:
  - not run; this commit only adds the compatibility symlink
2026-04-22 17:26:40 -04:00
James Cox 4855f36d46 build(yarn): migrate frontend and release tooling to yarn 4
- Frontend package management:
  - add a repo-root `.yarnrc.yml` that pins Yarn to the `node-modules` linker with a local cache
  - add the modern Yarn package manager declaration to `frontend/package.json`
  - replace the frontend npm lockfile with `frontend/yarn.lock`
  - move the frontend Just recipes to Corepack-managed Yarn commands for install, audit, build, test, and lint
  - run the production build in CI-style mode so non-interactive Yarn builds behave consistently
- Release automation:
  - add the modern Yarn package manager declaration to `tools/release/package.json`
  - replace the release tooling npm lockfile with `tools/release/yarn.lock`
  - switch the release Just recipes from `npm` and `npx` to Corepack-managed Yarn scripts
- CI and local runtime wiring:
  - switch the frontend and release GitHub Actions caches from npm lockfiles to Yarn lockfiles
  - update the root `doctor` output and contributor prerequisites to report Yarn and Corepack instead of npm
  - update the dev compose UI container to Node 24 with immutable Yarn installs
  - restore the Docker frontend build stage to install and build through Yarn, including the shared cache path
- Repository hygiene:
  - ignore the repo-local Yarn cache and per-project Yarn state directories created by modern Yarn installs

- Validation:
  - `just ui install-ci`
  - `just release install`
  - `just ui build`
  - `just image-build linux/amd64 codex-yarn-port-test` was not runnable because the local Docker daemon was unavailable
2026-04-22 17:26:40 -04:00
James Cox 42d9dcb4d3 refactor(frontend): repoint repo tooling to the frontend path
- Tooling and automation:
  - update Dependabot and the frontend test workflow to read frontend-owned paths
  - keep published frontend test reports aligned with the renamed project directory
  - extend ignore rules for frontend-generated test output and local dependencies
- Local developer entrypoints:
  - repoint the root Justfile ui module at frontend/Justfile
  - update the dev compose bind mount to use ./frontend
  - update the Weblate setup script to source translations from frontend/src/i18n
- Build integration:
  - repoint the Docker frontend build stage to /workspace/frontend and the renamed source paths
  - update the backend Gradle fallback dist location to ../frontend/dist/grimmory/browser
- Repository guidance:
  - rewrite root docs and AGENTS references that still pointed at booklore-ui so contributor guidance matches the new directory name

- Validation:
  - not run; this commit is scoped to staged path rewrites only
2026-04-22 17:26:39 -04:00
James Cox 874b013f75 refactor(frontend): rename booklore-ui to frontend
- Frontend path:
  - rename the tracked Angular app tree from `booklore-ui/` to `frontend/`
  - preserve file contents during the move so this commit stays focused on the path change itself
- Frontend docs:
  - update the moved frontend README and contribution guide where they refer to the renamed folder
  - keep those edits limited to path references introduced by the directory rename
2026-04-22 17:26:39 -04:00
James Cox c99aa87877 docs(plan): add frontend grimmory migration plan
- Planning:
  - add the staged frontend migration plan under docs/plans
  - record the intended rename, Yarn 4 adoption, lint rollout, and PR replay sequence
- Cleanup ledger:
  - capture the remaining frontend Booklore-era aliases that should survive the cutover temporarily
  - document explicit triggers for removing each compatibility shim after the dust settles
2026-04-22 17:26:38 -04:00
James Cox 3f9d3e0d8a fix(ci): reduce workflow cache churn
- GitHub Actions caching:
  - replace implicit setup-java cache writes with explicit Gradle cache restore/save steps
  - only persist the shared Gradle cache from long-lived develop and release workflows
  - remove the unnecessary QEMU setup from the single-arch smoke build
  - disable QEMU image caching in multi-arch publish workflows to stop repeated binfmt cache entries
- CodeQL workflow:
  - replace the generated advanced template with a pinned repo-owned CodeQL workflow
  - add per-ref concurrency to cancel superseded CodeQL runs before they create more caches
  - restrict dependency caching to Java, using restore-only on pull requests and full caching on long-lived runs
  - disable trap caching and turn off PR overlay database caching to avoid repetitive low-value CodeQL caches
- Validation:
  - validated the edited workflow YAML with yq
  - did not execute the workflows locally
2026-04-22 17:26:38 -04:00
James Cox caa37cd64a docs(agents): add repository agent workflow guide
- Agent workflow:
  - add a root `AGENTS.md` focused on agent execution rather than general contributor onboarding
  - document the expected command surface, branch target, and staged verification order
- Repo boundaries:
  - map the backend and frontend layout with the key source, resource, test, i18n, and asset paths
  - call out ownership boundaries for deploy, packaging, tools, docs, and shared assets
- Project rules:
  - capture backend and frontend conventions that agents should follow before editing or validating work
  - include repo-specific PR expectations such as linked issues, test output, and UI evidence
2026-04-22 17:26:37 -04:00
James Cox e4fc279528 chore(docs): update Discord invite links
- Community links:
  - replace the old Discord invite code with the new `9YJ7HB4n8T` invite in the repository README
  - update the contributor guide to point at the same server
  - align the issue-template support link with the same canonical invite

- Consistency:
  - keep the public docs and issue intake flow on a single Discord destination so users and contributors land in the right community space
2026-04-22 17:26:36 -04:00
James Cox dee8cd9659 chore(docs): align Discord links with the README
- Community links:
  - update the issue-template support link to use the canonical Grimmory Discord invite from `README.md`
  - update the contributing guide to point at the same Discord server

- Consistency:
  - remove the stale invite URL so issue intake, contributor docs, and the repository landing page all reference the same community link
2026-04-22 17:26:36 -04:00
James Cox 511f84cc48 feat(issues): add typed Grimmory issue templates
- Issue intake:
  - rebrand the bug and feature request forms from Booklore to Grimmory
  - remove the old `[Bug]` and `[Feature]` title prefixes so issue titles can stay natural
  - default issue intake to `needs-triage` while relying on GitHub Issue Types for the primary classification

- New templates:
  - add a dedicated enhancement template for smaller quality-of-life and UX improvements
  - add a documentation template for doc fixes, missing guides, and confusing setup flows
  - add a performance template for runtime, UI, build, and operational performance problems

- Type alignment:
  - map the templates onto the repo's issue-type taxonomy with `Bug`, `Feature`, `Enhancement`, `Documentation`, and `Performance`
  - keep the larger feature template distinct from the smaller enhancement template so incoming requests are easier to triage
2026-04-22 17:26:36 -04:00
James Cox 69d50d4fb5 feat(devex): add a unified just command surface
- Command surface:
  - add a root `Justfile` with namespaced `api`, `ui`, and `release` modules so humans and agents can use the same entrypoints from the repo root
  - add project-local Justfiles for `booklore-api`, `booklore-ui`, and `tools/release` so each area remains self-contained and can still be driven from inside its own directory
  - standardize local developer workflows around `just check`, `just test`, `just api run`, `just ui dev`, `just db-up`, and `just image-build`

- Workflow integration:
  - update the reusable test suite workflow to install `just` and run backend and frontend CI steps through the Justfiles instead of hardcoded shell commands
  - update the semantic-release workflows to install `just` and invoke release tooling via `just release install`, `just release preview`, and `just release run`
  - keep the Docker image publication workflows on the native Docker actions while moving the project-command logic into the canonical command surface

- Documentation:
  - split backend and frontend implementation guidance into `booklore-api/README.md`, `booklore-api/CONTRIBUTING.md`, `booklore-ui/README.md`, and `booklore-ui/CONTRIBUTING.md`
  - simplify the top-level `README.md` and `CONTRIBUTING.md` so they stay focused on overview, policy, and navigation while pointing to component-specific guides for deeper detail
  - align contributor-facing examples on the `just` interface instead of mixing ad hoc Gradle, npm, Docker, and Compose commands

- Developer environment:
  - add `mise.toml` to pin the expected Java and Node toolchain versions for local work
  - switch the development Compose defaults from the old Booklore database values to Grimmory-oriented defaults
  - keep the command layout ready for a future API/UI split without forcing that packaging change yet
2026-04-22 17:26:35 -04:00
James Cox 930e526228 feat(release): document develop-based stable release previews
- Release preview workflow:
  - document that the dry-run preview evaluates `develop` or another selected ref as a candidate promotion onto `main`
  - explain that the preview now reports the included `main..candidate` commit range alongside the computed semantic version
- Stable publish flow:
  - update the maintainer guide to reflect the current release-main to publish-release handoff instead of the older tag-trigger description
  - remove stale bootstrap-baseline guidance that no longer matches the live stable release history
2026-03-20 21:12:36 -05:00
James Cox afa5b818eb fix(ci): repair release preview and test result publishing
- Release preview:
  - preview stable releases by comparing a selected ref against `main` instead of rejecting refs that are ahead of `main`
  - default the preview workflow to `develop` and summarize the candidate commit range in the workflow summary
- Test result publishing:
  - download only the test report artifacts and event payload needed for PR comments/checks
  - avoid pulling the Buildx `.dockerbuild` artifact that was causing repeated workflow_run failures
- Actions runtime:
  - move `actions/download-artifact` to a Node 24-compatible release line to eliminate the Node 20 deprecation warning in the publisher job
2026-03-20 21:12:08 -05:00
James Cox 0416d48a6c style(ui): simplify the topbar logo branding
- topbar branding:
  - replace the split two-tone `Grimm` and `ory` logo text with a single `Grimmory` label
  - comment out the topbar SVG icon markup without removing it entirely from the template
- styling:
  - remove the now-unused split logo styles and keep a single text style for the app name
2026-03-20 20:48:08 -05:00
James Cox 98c9b1ae65 chore(api): remove the custom startup banner
- startup output:
  - remove the custom Spring Boot `banner.txt` resource that printed the Booklore ASCII art on application startup
  - let the API fall back to the default Spring Boot banner behavior instead of shipping fork-era branding in the logs
- cleanup:
  - drop the banner resource without changing runtime configuration or application logic
2026-03-20 20:23:20 -05:00
James Cox 55c0ac0899 chore(funding): point support links at opencollective
- GitHub funding:
  - remove the legacy BookLore Open Collective handle and Ko-fi entry
  - leave GitHub Sponsors unset so the repo does not advertise multiple support channels
  - set the sole project funding destination to https://opencollective.com/grimmory
2026-03-20 19:58:03 -05:00
James Cox fea1ec6930 fix(ui): repair frontend compile after rebrand
- User payload serialization:
  - switch the Grimmory and Booklore compatibility shim to bracket access so Angular's strict index-signature checks pass
  - relax the generic payload helper to support typed request objects like user updates instead of only raw record shapes
- Reset progress typing:
  - define `ResetProgressType` as the payload value union so the Grimmory alias can safely emit the legacy `BOOKLORE` backend value
  - send the reset-progress type directly instead of re-indexing the constant map with a value-type key
- Validation:
  - fix the TypeScript compiler errors blocking the frontend test job
  - pass `tsc -p tsconfig.app.json --noEmit`
2026-03-20 19:58:03 -05:00
James Cox ecf388f7a2 refactor(build): rename frontend dist output to grimmory
- Frontend build output:
  - change the Angular application output path from `dist/booklore` to `dist/grimmory`
  - keep the workspace folder layout unchanged while aligning the emitted artifact name with Grimmory

- Packaging pipeline:
  - update the Docker frontend copy step to consume `dist/grimmory/browser`
  - update the backend Gradle default frontend dist path to the same location so local packaging and container builds stay in sync
2026-03-20 19:58:03 -05:00
James Cox d786dd8ccb refactor(ui): rebrand frontend surfaces to grimmory
- Frontend branding:
  - rename visible Booklore branding in the app shell, document title, page titles, manifest metadata, package metadata, and frontend README
  - update first-party documentation links to the Grimmory docs site
  - rename the Angular workspace project id to `grimmory` while keeping the current output path contract unchanged for now

- Compatibility shims:
  - make Grimmory-first UI state and permission names coexist with the legacy Booklore API payload names
  - add explicit `TODO(grimmory-cleanup)` markers on the temporary language-storage, KOReader, permission, and reset-progress aliases
  - keep legacy endpoint and payload fallbacks in place where the backend still speaks Booklore

- Reader and settings cleanup:
  - rename KOReader toggle state and bulk-reset permission handling in the UI to Grimmory-first identifiers
  - update progress labels and tooltips so the frontend no longer displays Booklore to end users
2026-03-20 19:58:03 -05:00
James Cox eb94afa7ad refactor(i18n): rename booklore translation keys to grimmory
- Frontend translations:
  - rename the remaining `booklore`-named translation keys across the locale JSON files to `grimmory`
  - keep the translated values intact while aligning the key namespace with the Grimmory branding pass

- Angular lookups:
  - update the affected Transloco lookups in book menus, metadata views, user-management permissions, and KOReader settings
  - preserve existing compatibility-oriented API and state names that are not translation identifiers

- Notes:
  - this commit also normalizes JSON formatting across the touched locale files because the key rename was applied structurally
  - the resulting diff is much noisier than the logical change, but the intended behavior change is the translation-key rename itself
2026-03-20 19:58:03 -05:00
James Cox 37ca101dd4 fix(ci): correct artifact download action pin
- replace the invalid actions/download-artifact SHA in the workflow_run test-results publisher\n- restore the publisher workflow so it can download CI artifacts and post PR test results\n- keep the new workflow_run-based permissions model intact while fixing the setup-time action resolution failure
2026-03-20 17:20:18 -05:00
James Cox 11a76bffe1 fix(ci): publish PR test results from workflow_run
- stop publishing unit test results directly from the pull_request test jobs\n- upload the GitHub event payload from CI so a follow-up workflow can reuse the original PR context\n- add a workflow_run publisher that downloads backend/frontend test artifacts and posts the check runs and PR comments with the permissions Dependabot PRs require\n- keep the reusable test suite focused on executing tests and producing artifacts without failing on comment permissions
2026-03-20 17:20:18 -05:00
James Cox 03f4a8e22a fix(release): publish stable images via reusable workflow
- Stable release orchestration:
  - stop relying on a bot-created tag push to trigger stable image publication
  - capture the semantic-release result directly in the main release workflow
  - invoke the stable image publisher as a reusable workflow with the computed tag and release commit SHA

- Stable publish workflow:
  - convert the publish workflow from a `push.tags` trigger to `workflow_call`
  - keep a `workflow_dispatch` entry point so existing tags can be published manually for recovery
  - remove the obsolete `v2.2.1` bootstrap skip and use the release bot token for release finalization when available

- Branch hygiene:
  - automatically cherry-pick the semantic-release changelog commit from `main` back onto `develop`
  - avoid merge commits while keeping `CHANGELOG.md` aligned across the release and integration branches
  - skip the backport if the target release commit is already present on `develop`

- Validation:
  - parse both workflow files successfully with `yq`
  - pass `git diff --check`
2026-03-20 16:23:09 -05:00
James Cox 2294a388cb docs: Adds a note for moving away from packaging everything in a jar 2026-03-20 15:51:42 -05:00
James Cox dfd7a19f5c fix(build): make frontend resources optional in test runs
- Gradle packaging:
  - stop treating the default frontend dist path as a required input during `processResources`
  - include frontend assets only when the resolved dist directory actually exists
  - keep support for the explicit `-PfrontendDistDir=...` path used by the Docker build

- CI stability:
  - restore backend-only Gradle runs in the reusable test workflow without requiring an Angular build first
  - prevent `processResources` from failing before backend tests execute when `booklore-ui/dist/...` is absent

- Validation:
  - run `processResources` successfully with no frontend dist present
  - run `processResources` with a temporary `frontendDistDir` and confirm `static/index.html` is packaged
  - pass `git diff --check`
2026-03-20 15:51:42 -05:00
James Cox c4b021f3b9 fix(build): package frontend assets through Gradle resources
- Backend packaging:
  - make `processResources` include the built frontend dist as an explicit `static/` resource input instead of relying on a manual copy into Gradle's output directory
  - keep `bootJar` as the source of truth for bundling `static/index.html` into the application jar

- Docker build:
  - pass the frontend dist location into Gradle with `-PfrontendDistDir=/tmp/frontend-dist`
  - remove the ad hoc copy into `build/resources/main/static` before `bootJar`

- Validation:
  - verify `processResources` emits `build/resources/main/static/index.html` when given a frontend dist directory
  - keep `git diff --check` clean for the touched packaging files
2026-03-20 15:51:42 -05:00
James Cox 2b2e08b193 docs: Add a note about how to make a release 2026-03-20 15:51:42 -05:00
James Cox d148a097c6 perf(ci): speed up image builds and centralize cache writes
- Image builds:
  - pin frontend and backend Docker build stages to the build platform so multi-arch packaging can reuse architecture-independent work
  - add an Angular build cache mount and move dynamic version metadata to the end of the runtime stage so static layers stay reusable across tags
  - reduce image workflow checkout depth and keep preview builds on `linux/amd64` only to avoid unnecessary QEMU and history overhead

- Cache policy:
  - make CI packaging smoke builds consume the shared image cache without writing new BuildKit cache state
  - make normal preview builds consume shared GHA and registry caches without mutating the canonical cache
  - keep nightly and stable release builds as the workflows that refresh the shared image cache in both GHA and registry backends

- Preview override:
  - add a `refresh_shared_cache` input to the preview workflow for an explicit no-cache rebuild that repopulates the shared cache when maintainers need to bust and refresh it
  - keep the default preview behavior optimized for fast disposable builds rather than cache churn

- Validation:
  - keep workflow YAML parsing clean after the cache-policy changes
  - keep `git diff --check` clean for the touched Docker and workflow files
2026-03-20 15:51:42 -05:00
James Cox e3b3e7c4d7 fix(ci): forward checks permission to reusable test jobs
- Workflow callers:
  - grant `contents: read` and `checks: write` when invoking the reusable test suite from CI validation, nightly builds, and main release automation
  - align caller permissions with the nested `backend-tests` and `frontend-tests` jobs so GitHub accepts the workflow graph

- Validation:
  - keep workflow YAML parsing clean after the permission wiring change
  - keep `git diff --check` clean for the touched workflow files
2026-03-19 18:50:00 -05:00
James Cox 6b0c4aa66c chore: Update README to use new links, and clean up formatting 2026-03-17 23:18:14 -05:00