Skip to content

feat: blog - Connect routes and collection-wide pagination #368

Open

Description

@ashleyshaw

Outcome

Expose blog destinations and apply filtering/sorting before pagination.

Verified context

BlogPage.tsx filters already retrieved pages, risking page-local results; routes.ts lacks blog destinations.

Scope

Integrate the approved adapter and existing archive/detail/taxonomy components.

Acceptance criteria

  • Canonical routes and card, taxonomy and back links agree.
  • Category/tag filtering and ordering operate on the full eligible collection.
  • Totals, page boundaries and reset behaviour stay consistent after changes.
  • Tests cover direct loading, empty collections and unknown routes using existing regression tooling.

Boundaries and sources

Creation defines work only; it does not start implementation. Preserve unrelated code, protected assets, editorial wording and existing records. Do not fabricate content, identity, media, manuscript chapters, dates or engagement data. Use approved repository-native authoring, validation, preview and publication decisions; do not provision an external CMS or database. Existing editorial verification remains with its current issues. All acceptance criteria remain unchecked until evidenced.

Repository evidence was inspected on develop at 4ecdb26d9655a48bf000a7c89da2f70383edce87. Recheck before implementation; no build or browser tests were run for this draft. Follow repository instructions and applicable Spec Kit requirements. Paths below refer to this repository.

Sources: repository instructions, application, editorial content.

Branch instructions

  • Repository: lightspeedwp/ThisOneTimeOnAcidCom
  • Proposed branch: feat/blog-route-pagination
  • Base: develop
  • Naming policy: local guide, validator, organisation strategy.
  • Pull request template: Organisation .github/PULL_REQUEST_TEMPLATE/pr_feature.md, per inspected local routing; recheck before opening a PR.
  • Constraints: Preserve unrelated changes; do not force-push, merge or deploy. Complete applicable Spec Kit requirements before implementation.
  • Conflicts or missing evidence: Proposed branch, not an existing branch; collision freedom is unverified. Recheck current branch routing and open governance changes, including PR automation: repo-governance - Add governance automation and validation #346. Older instructions claim branch rules are absent; the inspected local guide and executable validator establish the current convention. This draft creates no branch or pull request.

Branch instructions — batch 15 audit addendum

  • Repository: lightspeedwp/ThisOneTimeOnAcidCom.
  • Implementing target: this routing/pagination issue; verified GitHub counterpart: issue 368.
  • Branch state: proposed new branch, not created or verified for reuse. feat/blog-route-pagination was absent from the inspected remote branches; no matching implementation PR identified. Recheck immediately before creation.
  • Proposed branch: feat/blog-route-pagination.
  • Base: refreshed develop, inspected at 4ecdb26d9655a48bf000a7c89da2f70383edce87 (D).
  • Naming: feat is authorised by the local guide, validator and organisation strategy at 8f28eca80bff198879f7aaf496717dc0551bb32e (O). The proposal follows type/scope-title by static inspection; validation not executed.
  • PR template: shared Feature template. Canonical routing and local workflow agree on feat to pr_feature.md. The local workflow suggests a template and applies a type label, not PR-body insertion. Native inheritance/named-template selection remains unverified. Create no local templates; do not copy example closing references or automatically apply frontmatter labels.
  • Parent context: existing hierarchy unchanged. Omit coordination-parent identifiers, titles and URLs from branches, PR metadata and coding prompts; no parent development associations.
  • Allowed closing targets: none currently. Partial work must not close this issue. Future contextual references or native associations require separate review.
  • Open governance PR346 is context, not approval, implementation evidence or a branch to reuse.
  • Constraints: planning only. No repository edits, branch operations, PR changes, execution, merge or deployment authorised.

Expected file changes

Provisional implementation plan, not delivered code. Existing files inspected at D; new filename proposed within inspected e2e directory.

Operation Path Intended change Evidence/revision Approval or dependency
Edit src/app/routes.ts Register existing blog archive/article/category/tag pages at /blog, /blog/:slug, /blog/category/:slug and /blog/tag/:slug; preserve unrelated routes and wildcard D: no blog routes; navigation uses these destinations Approved source, route and rendering handoffs before exposure
Edit src/app/components/pages/blog/BlogPage.tsx Filter and order the full eligible collection before slicing; derive totals, boundaries, category counts and resets consistently; retain accessible card navigation D: page request precedes filtering; upstream pagination and mock counts Delivered adapter collection-query contract; agree page size and invalid-page policy
Edit src/app/components/pages/blog/BlogCategoryPage.tsx Replace mock-post sourcing with approved collection; align taxonomy, ordering, counts, pagination and cards; distinguish unknown taxonomy from empty results D: direct mock source; unknown category can select all posts Approved taxonomy/publication contract
Edit src/app/components/pages/blog/BlogTagPage.tsx Use eligible collection/pagination contract; replace heuristic unknown-tag resolution with approved recovery behaviour D: mock import and slug-to-name fallback Approved tag identity and recovery policy
Edit, conditional src/app/components/pages/shared/TaxonomyArchiveLayout.tsx Only necessary optional pagination/total-count support; preserve other content-type defaults D: supplied-item rendering and item-length count; no pagination interface Confirm minimal integration and shared-consumer impact
Edit src/app/data/mock/ui/blog.ts Centralise touched filter/pagination/announcement/recovery copy in approved UK English and sentence case D: existing blog UI-data module and inline labels Copy approval; no editorial rewrite
Create, proposed e2e/blog-route-pagination.spec.ts Direct load/refresh, card/taxonomy/back links, unknown destinations, cross-page filters/sorts, totals, resets and empty/invalid pages; controlled fixtures exceeding one page D: Playwright e2e discovery/routing precedent; filename absent Approved fixture/source injection and runnable browser environment

No moves or deletions. Adapter/source selection remains separate existing work; article formatting, author/media mapping, FAQs and simulated engagement remain article-rendering work. Both remain Todo: prior plans are not delivered dependencies. Do not expose random engagement as truthful data.

Preserve earlier guidance and resolve conflicts explicitly: root guides retain stale branch/runtime/testing claims; editorial-import prohibition conflicts with source-backed scope. Do not repair guidance here. Complete applicable Spec Kit approval; no blog specification verified in inspected catalogue/directories. Repository prompt/report/task writes are deferred under this draft-only instruction.

Exclude editorial changes, protected assets/references, Supabase, deployment/configuration, dependencies, managed workflows, locked governance and changelog edits. Resolve changelog permission separately. Existing criteria unchanged; no tests, builds, hooks, scripts or implementation performed. Additional paths, shared-interface expansion or materially different scope require revised preview and approval. Exclude credentials and restricted content from public sync. Description approval changes no status, ownership, labels, hierarchy or PR associations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions