Skip to content

feat: capture bodies from every feed, rename to Read More, anchor the button - #6

Merged
craigthackerx merged 1 commit into
masterfrom
feat/read-more
Aug 8, 2026
Merged

feat: capture bodies from every feed, rename to Read More, anchor the button#6
craigthackerx merged 1 commit into
masterfrom
feat/read-more

Conversation

@craigthackerx

Copy link
Copy Markdown

Three changes: bodies for every source, the button renamed, and the button pinned to the bottom left of the card.

Bodies from every feed

Answering the question behind this: nothing else had a Read More button because RSS articles carried no body field at all, not because a body was being truncated. The 300 character cap applies to summary, which is a different field.

Which turned out to be a missed opportunity, because the pipeline was already reading far more than it kept:

Source summary content:encoded
Microsoft Security Blog 695 62,233
Threat Intelligence 700 62,389
CISA 52,691 -
Tech Community (Sentinel) 35,891 -
Tech Community (Defender XDR) 24,236 -
AWS 2,086 -
Google Cloud 2,040 2,040
MSRC 22 -
NCSC 154 -

Bodies now come from content:encoded where the feed populates it, falling back to the summary.

Result: 100 of 150 articles get a Read More button, up from 12.

articles with body
gcp_security 25 22
cisa_security 20 20
mssecurity 10 10
core_infra_security 10 10
sentinel 7 7
aws_security 8 7
defender_xdr 4 4
...others
azure_updates 13 0
ncsc_security 7 0
msrc 20 0

The three zeroes are correct: MIN_BODY_LENGTH keeps the button off anything whose feed carries barely more than a headline, so Read More never opens to the same text the card already shows.

Size

feeds.json goes from 205 KB to 431 KB at a 2500 character cap, roughly 470 KB once Message Center is included. Acceptable in one file for now; if it becomes uncomfortable the next step is splitting bodies into a second JSON the dialog fetches lazily on expand.

Message Center keeps a 6000 cap, because it is the only source whose link does not work for a reader. Anything cut there is unreachable, whereas every RSS article keeps a working link to its full text.

Read More

Renamed everywhere, including Message Center, per the request.

Button anchoring

The buttons floated at different heights because the card was a plain block, so the button sat wherever the summary happened to end.

Cards in a grid row already stretch to equal height, so the fix is to make the card a column flexbox and give the button margin-top: auto. That eats the leftover space and lands every button on the same baseline. align-self: flex-start keeps it bottom left rather than stretched to the card width, and .article-summary gets an explicit margin-bottom so a full card (where auto resolves to zero) still keeps the text clear of the button.

Verification

Bodies stay plain text and links keep their scheme check at both ends, unchanged from the previous PR.

jsdom against the real index.html, app.js and styles.css, 19 checks passing. New ones:

PASS button reads "Read More"
PASS button is the card's last child, so margin-top:auto anchors it to the bottom
PASS card is a column flexbox
PASS button uses margin-top:auto
PASS button aligned to the left, not stretched

jsdom does not do layout, so the three layout assertions check the CSS rules that produce the anchoring rather than the rendered geometry. Worth an eyeball on the deployed site.

… button

Most feeds already ship far more than the card showed, and the pipeline was
reading it and throwing it away. The Tech Community boards and CISA put the
whole post in <summary> (up to 52k characters), and the Microsoft blogs put it
in <content:encoded> (up to 62k), which was never read at all.

Bodies are now captured from content:encoded where present, falling back to the
summary, so Read More works on 100 of 150 articles rather than the 12 Message
Center posts. MSRC, NCSC and Azure updates still get no button: their feeds
carry barely more than a headline, and MIN_BODY_LENGTH keeps the button off
anything that would open to the same text the card already shows.

Capped at 2500 characters, which takes feeds.json from 205 KB to 431 KB. Message
Center keeps a 6000 cap because it is the only source whose link does not work
for a reader, so anything cut there is unreachable rather than one click away.

The button now reads Read More everywhere, including Message Center.

It is also anchored to the bottom left of every card. Cards in a grid row
already stretch to equal height, so making the card a column flexbox and giving
the button margin-top:auto lands every button on the same baseline instead of
floating wherever the summary happened to end. align-self keeps it left rather
than stretched, and the summary carries an explicit margin so a full card still
keeps the text clear of the button.

Bodies remain plain text and links keep their scheme check at both ends.
Verified under jsdom against the real files: 19 checks, including the button
text, that it is the card's last child, the three layout rules that produce the
anchoring, and the existing hostile-markup and javascript: URL cases.
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@craigthackerx
craigthackerx merged commit 06bca3f into master Aug 8, 2026
5 checks passed
@craigthackerx
craigthackerx deleted the feat/read-more branch August 8, 2026 16:56
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