Improvements v0.0.4 #3

Merged
rdenadai merged 3 commits from improvements-v0.0.4 into main 2026-08-19 18:18:46 +00:00
Owner

Summary

Adds client-only article favorites with a /favorites page that reuses the same digest-card layout as the main daily edition.

What Changed

  • Added favorite star toggles to article cards and rows.
  • Added /favorites as a server-rendered shell populated from localStorage.
  • Stored favorites locally under tilens_favorites, capped at 500 items.
  • Added a themed remove-confirm modal for deleting saved articles.
  • Added a top-nav Favorites trigger with live count.
  • Matched favorites cards to the main page card layout, links, tags, GitHub labels, and footer metadata.
  • Kept the web process SQLite read-only: no user state, no API, no writes.
  • Updated docs for the client-only favorites contract.
  • Added regression tests for rendering, navigation, card parity, tag styling, modal behavior, and star sizing.
## Summary Adds client-only article favorites with a `/favorites` page that reuses the same digest-card layout as the main daily edition. ## What Changed - Added favorite star toggles to article cards and rows. - Added `/favorites` as a server-rendered shell populated from `localStorage`. - Stored favorites locally under `tilens_favorites`, capped at 500 items. - Added a themed remove-confirm modal for deleting saved articles. - Added a top-nav Favorites trigger with live count. - Matched favorites cards to the main page card layout, links, tags, GitHub labels, and footer metadata. - Kept the web process SQLite read-only: no user state, no API, no writes. - Updated docs for the client-only favorites contract. - Added regression tests for rendering, navigation, card parity, tag styling, modal behavior, and star sizing.
Adds a /favorites page that mirrors the daily edition's two-column
tl-digest-card grid without touching the read-only SQLite web process.

Highlights:
- Client-only favorites list backed by localStorage['tilens_favorites'],
  capped at 500 entries FIFO by favoritedAt. No server state, no JSON
  API surface; the SQLite mode=ro/query_only=ON contract holds.
- New /favorites shell page renders the digest-grid wrapper, the
  card template, and a confirm-remove themed <dialog> modal centered
  with margin:auto to override Tailwind v4 preflight.
- Favorite toggle button (+35px star on cards, 18px in system bar)
  wired into article_card.html and article_row.html via
  partials/favorite_button.html. Same StarIcon SVG used by microbox.
- Topic tag parity: _topic_classes() now emits 'tl-tag tl-tag-{variant}'
  and a topicPalette() mirror in favorites.js so rendered cards use
  identical color/font/padding/height across both pages.
- GitHub cards preserve the org/repo: prefix on /favorites via a JS
  mirror of _github_repo_name that parses github.com/<owner>/<repo>.
- Cover + title links open in a new tab with rel=noopener noreferrer
  and the favorites toggle stays z-index:3 above the full-card cover
  link so clicks aren't swallowed.
- /favorites trigger sits as a sibling of Topics and Calendar in the
  top filter rail (hidden on meta pages).

Docs:
- RULES.md: cards/page layouts are local-only source of truth;
  UI motion via fade/reveal transition only.
- architecture.md: favorites are client-side; web process still read-only.
- operations.md: build:assets now also copies favorites.js into dist.

Tests: 477 passed. Regression coverage for the card template, palette
mapping, GitHub repo parser, mirror structure (target/rel/no-rounded)
and the headline 35px card star + 18px system-bar star.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rdenadai/tilens!3
No description provided.