Skip to content

Draw the byline the card has been throwing away (GRYT-913) - #392

Merged
sivert-io merged 1 commit into
mainfrom
claude/GRYT-913-print-logos
Sep 4, 2026
Merged

Draw the byline the card has been throwing away (GRYT-913)#392
sivert-io merged 1 commit into
mainfrom
claude/GRYT-913-print-logos

Conversation

@sivert-io

Copy link
Copy Markdown
Member

author and publishedAt have been on LinkPreviewData for as long as the card has existed. The server fills both wherever a page declares them. LinkPreviewCard drew neither.

So an article arrived with its byline dropped on the floor, and — since server#134 — a MakerWorld model arrives with "Mr. Anderson" and the upload date and shows neither. The two most human facts on the card.

They go under the description rather than above the title: attribution, not the headline.

Why it is a function and not three lines of JSX

The happy case is easy. The reason cardByline is pure, in embedUtils, and has its own check is everything else — article:published_time is free text as far as this app is concerned, and real pages ship:

what a page sent what the card shows
"" / " " nothing
"not a date" nothing (or just the author)
"1970-01-01T00:00:00Z" — a template that filled in the epoch nothing
"2199-01-01" nothing
"2027-01-01" the date — an embargoed post is ordinary

Without that, a broken template on somebody's blog puts "Invalid Date" under their link.

Not in here: the logos

MakerWorld, Printables and Thingiverse artwork is ready (SiBambulab, SiPrintables, SiThingiverse all exist in react-icons) but cannot merge yet. check-embed-icons.mjs refuses an icon for a provider @gryt/core does not have:

icons for providers @gryt/core does not have: makerworld, printables, thingiverse

Which is the check doing its job. core#10 adds the providers; the artwork follows the core release that carries them, with the @gryt/core bump in the same change.

Verification

yarn lint (tsc -b + eslint, --max-warnings 0), the new yarn test:card-byline, and yarn test:embed-icons all pass. The new check is wired into package.json and CI.

Not verified on screen — GRYT-911 still has the dev client stuck behind the auth splash.

🤖 Generated with Claude Code

`author` and `publishedAt` have been on `LinkPreviewData` for as long as the
card has existed, the server fills both wherever a page declares them, and
`LinkPreviewCard` drew neither. So an article arrived with its byline dropped,
and a MakerWorld model with its creator dropped — the two most human facts on
the card.

They go under the description, not above the title: it is attribution rather
than the headline.

`cardByline` is pure and lives in `embedUtils` because the interesting part is
not the happy case. `article:published_time` is free text as far as this app is
concerned, and real pages ship empty strings, the Unix epoch out of a broken
template, and dates a century out. Every one of those has to come back as a
line that is not drawn rather than as "Invalid Date" under somebody's link.

Next year is allowed through — a post dated slightly ahead is an ordinary
embargo, and a card refusing to show it would be the odd one out. 2099 is not.

`check-card-byline.mjs` is new and mostly about the empty cases.

Not in here: the MakerWorld, Printables and Thingiverse logos. `check-embed-icons`
refuses an icon for a provider `@gryt/core` does not have, which is the correct
answer — core#10 adds the providers, and the artwork follows the release that
carries them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sivert-io
sivert-io merged commit 8151efa into main Sep 4, 2026
3 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