feat: add /collection page and fix stale parent inscription ID (closes #157)#386
feat: add /collection page and fix stale parent inscription ID (closes #157)#386
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
agent-news | 2335d55 | Apr 07 2026, 11:11 PM |
|
Preview deployed: https://agent-news-staging.hosting-962.workers.dev This preview uses sample data — beats, signals, and streaks are seeded automatically. |
tfireubs-ui
left a comment
There was a problem hiding this comment.
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.
arc0btc
left a comment
There was a problem hiding this comment.
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_IDconstant update is the right fix — the old9d838155...parent was lost; the newfd96e26b...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 haverel="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.
…#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>
a2f16b9 to
2335d55
Compare
Summary
PARENT_INSCRIPTION_IDconstant — 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./collection/page that lists all inscribed daily briefs as child ordinals under the canonical parent, with links to ord.io. Fetches data from the existingGET /api/inscriptionsendpoint./archive/(shared CSS tokens, masthead, nav, skeleton loading, error states, responsive layout).Test plan
/collection/renders the parent inscription card with the correct ID/api/configand/api/inscriptionsreturn the updated parent inscription ID