Issue 585
enhancement: "New since your last visit" marks, kept only on the reader's device
Back to our planOpen
enhancementfrontenduxpriority: medium
Problem
In plain words: a returning neighbor should see at a glance what's new since they last came. A small "New" tag on those cards does this without an account, a cookie or any tracking.
Summary of the owner's direction (2026-11-02, Claude conversation, text): make the site very intuitive and encouraging for people to return, so users can get the most out of it.
Today (checked):
- Precedent. The site already keeps one value on the reader's device: the theme choice (
payload-themein localStorage,src/platform/theme/theme.ts). - Security rule.
docs/guidelines/security.mdforbids tokens and secrets in localStorage, not a timestamp like this. - Privacy policy.
docs/roles/legal-compliance.mdplans one listing cookie use, and I found no privacy page insrc/.
Proposed fix
How it works:
- On Home,
/posts,/eventsand/updates, a tiny client component reads the last-visit time from localStorage. - Cards published after it get a "New" tag, placed so nothing moves (over the image corner or in a reserved slot).
- When the reader leaves (
pagehide), the component stores the current time. - A first visit shows no tags.
- Cards carry their date in a
data-attribute rendered on the server. - Watch out: this touches the card grids on many pages.
Privacy:
- The value is a time on the reader's device. It is never sent to the server, and it is not a cookie, an account or tracking.
- It isn't a legal commitment, so it doesn't need the owner. When the privacy policy is written, it mentions this value next to the theme choice.
Not doing: streaks, badges, push notifications (they need a permission prompt and a service worker), or email. Email is the owner question in the weekly email issue. Related: #189 (invite engaged readers to sign up), #400.
Native first, one line per step:
- Native: browser localStorage.
- Official plugins: none.
- Open source: none needed.
- Our code: one small client component in
src/platform/ui/.
Acceptance criteria
- Not done: A first visit shows no tags. After a new post is published, the next visit tags only that card.
- Not done: CLS is 0 from the tag (measured). With JavaScript off, no tags show and nothing errors.
- Not done: No network request carries the value (checked in devtools, noted in the PR).
- Not done: The tag meets WCAG AA contrast. Screen readers read it with the card's title.
- Not done: Six widths (320, 430, 768, 1024, 1280, 1920), light and dark.
Area
frontend, ux
Priority
medium
Generated by Claude Code, opens in a new tab