Skip to content

feat: Emeroteca section — periodicals browsing gated on server capability - #34

Merged
fabiodalez-dev merged 2 commits into
mainfrom
feat/emeroteca
Sep 4, 2026
Merged

feat: Emeroteca section — periodicals browsing gated on server capability#34
fabiodalez-dev merged 2 commits into
mainfrom
feat/emeroteca

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

What

Read-only Emeroteca section for instances running Pinakes 0.7.77+ with the periodicals mobile bridge (fabiodalez-dev/Pinakes#411). The app follows the Book Club pattern for optional server-side plugins end to end.

How it works

  • Capability gating: periodicalsAvailable flag in FeatureStore (default false — the entry point stays hidden until confirmed). An authenticated probe of GET /api/v1/periodicals/health runs in refreshHealth() in parallel with the book-club probe: 2xx → on, 404 → off, other errors keep the last known value; instance-switch guard included.
  • Navigation: entry point in Profile next to Book Club (Newspaper icon); nested graph periodicalsperiodicals/{id}periodicals/years/{yearId}/{year}periodicals/issues/{id} with the standard slide-in transitions.
  • Screens: mastheads list (350ms-debounced search, type filter chips, cursor load-more with dedup) → masthead detail (logo, ISSN, publisher, coverage, holdings statement, volume years with owned/issue counts) → issues of a year (cover, number, date, colour-coded status badge) → issue detail (large cover, spoglio table of contents, Open PDF shown only when the server exposes a public pdf_url).
  • Data layer: separate PeriodicalsApi Retrofit interface + defensive @Serializable DTOs (nullable + defaults), PeriodicalsRepository via the shared apiCall/ApiResult plumbing.
  • i18n: 57 new keys in all four locales (en/it/fr/de), appended in identical order for generateI18nRes.

Tests & checks

  • PeriodicalsUiStateTest: 12 pure-function tests (page merge without duplicates incl. boundary overlap, type filter toggle, status→badge mapping, pdf gating) — ViewModels are exercised only through their pure state functions, per project convention.
  • ./gradlew testDebugUnitTest → 145/145 green
  • ./gradlew lintDebug → 0 errors (no new warnings)
  • ./gradlew assembleDebug and assembleRelease (R8) → build; existing keep rules already cover the new @Serializable DTOs and Retrofit interface.

Notes

…lity

New read-only section for the emeroteca bundled plugin (Pinakes 0.7.77+
with the periodicals mobile bridge). Follows the Book Club pattern for
optional server-side plugins end to end:

- PeriodicalsApi (separate Retrofit interface) + defensive @serializable
  DTOs; PeriodicalsRepository with probeAvailability() (2xx→on, 404→off,
  other→last known) and instance-switch guard
- periodicalsAvailable flag in FeatureStore (default false — the entry
  point stays hidden until the authenticated probe confirms), probe run
  in parallel with the book-club one inside refreshHealth()
- Screens: mastheads list (debounced search, type filter chips, cursor
  load-more with dedup) → masthead detail (logo, ISSN, publisher,
  holdings, volume years) → issues of a year (cover, number, date,
  status badge) → issue detail (large cover, spoglio table of contents,
  "Open PDF" only when the server exposes a public pdf_url)
- Entry point in Profile next to Book Club (Newspaper icon), nested nav
  graph with the standard slide-in transitions
- 57 new i18n keys in all four locales (en/it/fr/de), appended in
  identical order
- PeriodicalsUiStateTest: 12 pure-function tests (page merge dedup,
  type filter toggle, status→badge mapping, pdf gating)

Verified: testDebugUnitTest 145/145, lintDebug clean, assembleDebug and
assembleRelease (R8) build — existing keep rules already cover the new
@serializable DTOs and Retrofit interface.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 4ec4e0f6-533e-43aa-90a7-446d64a4424a


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fabiodalez-dev
fabiodalez-dev merged commit 8293498 into main Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant