Skip to content

feat: add /collection page and fix stale parent inscription ID (closes #157)#386

Merged
whoabuddy merged 2 commits intomainfrom
feat/collection-page-157
Apr 7, 2026
Merged

feat: add /collection page and fix stale parent inscription ID (closes #157)#386
whoabuddy merged 2 commits intomainfrom
feat/collection-page-157

Conversation

@biwasxyz
Copy link
Copy Markdown
Contributor

@biwasxyz biwasxyz commented Apr 5, 2026

Summary

  • Fixes PARENT_INSCRIPTION_ID constant — the old parent (9d8381...) was lost to miner fees at block 941896. Updated to the active canonical parent (fd96e26b...) confirmed at block 941929, per whoabuddy's correction in feat: support child inscription IDs on daily briefs #157.
  • Adds /collection/ page that lists all inscribed daily briefs as child ordinals under the canonical parent, with links to ord.io. Fetches data from the existing GET /api/inscriptions endpoint.
  • Page follows the same design patterns as /archive/ (shared CSS tokens, masthead, nav, skeleton loading, error states, responsive layout).

Test plan

  • All 246 existing tests pass (27 test files)
  • Verify /collection/ renders the parent inscription card with the correct ID
  • Verify child inscriptions are listed in reverse chronological order with ord.io links
  • Verify /api/config and /api/inscriptions return the updated parent inscription ID
  • Verify responsive layout on mobile

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
agent-news 2335d55 Apr 07 2026, 11:11 PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Preview deployed: https://agent-news-staging.hosting-962.workers.dev

This preview uses sample data — beats, signals, and streaks are seeded automatically.

Copy link
Copy Markdown
Contributor

@tfireubs-ui tfireubs-ui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean frontend addition — static HTML page for /collection route, fetches from existing /api/inscriptions endpoint. Consistent styling with the rest of the site (Playfair Display serif, shared.css). No backend changes, no security concerns. LGTM.

Copy link
Copy Markdown
Contributor

@arc0btc arc0btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the stale parent inscription ID (lost to miner fees at block 941896) and adds a clean /collection/ page — two focused, correct changes.

What works well:

  • The PARENT_INSCRIPTION_ID constant update is the right fix — the old 9d838155... parent was lost; the new fd96e26b... canonical parent confirmed at block 941929 is correct. This needs to ship before any new inscriptions are added.
  • esc() is used consistently on all dynamic values inserted into innerHTML — XSS handled correctly. External links have rel="noopener". No security concerns.
  • Error handling covers both the fetch failure and empty-inscriptions cases. Skeleton loading state matches the rest of the site.
  • Design follows the existing patterns exactly (shared.css tokens, same masthead/nav/footer structure as /archive/). Good consistency.

[suggestion] Null guard on parentId in renderParentCard
If /api/inscriptions ever returns a response where parent_inscription_id is missing or null, parentId.length on line 1 of renderParentCard will throw a TypeError before esc() has a chance to handle it. The page would silently break with no visible error state. esc() already handles null safely — parentId.length doesn't:

function renderParentCard(parentId) {
  if (!parentId) return '';

Not blocking for the current API (it always returns this field), but defensive for future changes.

[nit] Dead variable in renderParentCard
shortId is computed but never used — the template shows the full parentId via esc(parentId). This looks like a copy from renderInscriptionRow where shortId is actually used. Safe to remove:

function renderParentCard(parentId) {

Operational context: The /api/inscriptions endpoint is stable — we fetch from it in our own sensors. Inscription IDs are hex + i + digits, so they're URL-safe in the ord.io hrefs even without explicit URL encoding.

biwasxyz and others added 2 commits April 7, 2026 16:10
…#157)

- Update PARENT_INSCRIPTION_ID to the active canonical parent (fd96e26b...)
  confirmed at block 941929, replacing the old parent lost to miner fees
- Add /collection/ page listing all inscribed briefs as child ordinals
  under the canonical parent, with links to ord.io

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@whoabuddy whoabuddy force-pushed the feat/collection-page-157 branch from a2f16b9 to 2335d55 Compare April 7, 2026 23:11
@whoabuddy whoabuddy merged commit be369f2 into main Apr 7, 2026
7 checks passed
@whoabuddy whoabuddy deleted the feat/collection-page-157 branch April 7, 2026 23:12
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.

4 participants