Skip to content

fix(site): list works instead of references on CitationSystem pages (#55) - #56

Merged
maehr merged 1 commit into
textrefs:stagingfrom
maehr:fix/55-system-works
Jul 31, 2026
Merged

fix(site): list works instead of references on CitationSystem pages (#55)#56
maehr merged 1 commit into
textrefs:stagingfrom
maehr:fix/55-system-works

Conversation

@maehr

@maehr maehr commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Closes #55. Targets staging, so it ships with the v0.1.0 release PR #4.

Problem

/id/system/<key>/ listed every canonical reference expressed in the system — 27,803 of them for homer-book-line, 5,220 for bekker. That is an information-model mismatch: a citation system is associated with works; references are individual locations expressed using the system. It also made the pages long and buried the relationship that actually matters.

Change

The section is now "Works using this system (N)": each associated work exactly once, linked to its Work page, with its key and the number of references it contributes. Systems with no works get the standard reg-empty message.

The list mirrors the inverse section that already exists on Work pages ("Citation systems", src/pages/id/work/[key]/index.astro) and reuses the same reg-list / reg-iri / reg-tag classes, so both directions of the relation now read the same way.

Real data after the change — multi-work systems list all of their works:

system works refs previously listed
homer-book-line 2 27,803
bible-book-chapter-verse 2 2,412
bekker 1 5,220

/reg/system/<key>/refs/<page>/ is removed along with the preview: that section was its only inbound link, so keeping the route would have built orphan pages. Individual references remain reachable from Work pages (/reg/work/<key>/refs/<page>/) and /id/ref/<uuid>/, and /id/system/<key>.json is unchanged.

Since the section is no longer a wall of locators, it drops data-pagefind-ignore and is indexed like the equivalent section on Work pages.

Verification

  • npm run format:check, npm run check:fast (0 errors), npm run build:fast, and a full npm run build against the real registry submodule — Astro's internal link check passes and grep -r "reg/system" dist is empty.
  • Rendered text reads Fixture Work fixture.work 1 reference(s) — the explicit {' '} separators from docs: Missing whitespace around inline elements on registry pages #53 are preserved, so copy/paste, assistive technology and the Pagefind index still see word boundaries.

🤖 Generated with Claude Code

…extrefs#55)

CitationSystem pages listed every canonical reference expressed in the
system — 27k for homer-book-line — which is both an information-model
mismatch (a system is associated with works; references are individual
locations) and the reason those pages ran long.

The section is now "Works using this system": each associated work once,
linked to its Work page, with the number of references it contributes and
an empty state when a system has no works. Individual references stay
reachable from Work pages (/reg/work/<key>/refs/) and /id/ref/<uuid>/.

The paginated /reg/system/<key>/refs/<page>/ route is removed with it —
the preview section was its only inbound link, so it would otherwise
build orphan pages.

Fixes textrefs#55

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@maehr
maehr merged commit 03cee88 into textrefs:staging Jul 31, 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