Skip to content

[Feature] Mark as read for articles#267

Open
imhariprakash wants to merge 7 commits intomedyo:developfrom
imhariprakash:feature_mark_as_read
Open

[Feature] Mark as read for articles#267
imhariprakash wants to merge 7 commits intomedyo:developfrom
imhariprakash:feature_mark_as_read

Conversation

@imhariprakash
Copy link

Description

  • Introduces a Mark as read action for posts.
  • The read state is stored per source in localStorage, and posts marked as read are automatically hidden from the feed.
  • Each source maintains up to 1000 read post IDs (oldest entries are removed when the limit is reached).

Changes

  • Store (src/stores/readPosts.ts):
    • Zustand store with readPosts (per-source arrays of read post IDs) and markAsRead(source, postId).
    • Persisted to localStorage. Cap 1000 IDs per source (circular, drop oldest).
  • List (src/components/List/ListComponent.tsx):
    • Filters out posts whose ID is in readPosts[source].
    • Shows "You're all caught up!" when all posts for that source are read.
  • Card item (src/components/Elements/CardWithActions/CardItemWithActions.tsx):
    • "Mark as read" button (check-circle icon) with hover tooltip.
    • Click calls store to mark post as read (row then disappears from list).
  • Cards:
    • Pass source={meta.value} into the list (read posts per source).
  • Styles (src/assets/App.css):
    • Tooltip and "all caught up" message styling.

Behaviour

  • Click the mark as read (✓) icon on a post → post is marked as read for that source and is removed from the list.
  • Read IDs are saved in localStorage and retained after refresh/close.
  • When every post in a source is read, the card shows: "You're all caught up! Check back later for fresh content."
image

@medyo medyo changed the base branch from master to develop February 15, 2026 18:31
@medyo medyo self-requested a review February 15, 2026 18:50
@medyo medyo added the New feature Request a new language to add label Feb 15, 2026
Copy link
Owner

@medyo medyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done @imhariprakash 👌

I have two suggestions:

First, the current implementation relies on the source to track read posts, which means you need to modify each source card. Ideally, we should store read posts by their unique ID and simply check if the ID exists. This avoids depending on the source and allows us to have a consistent limit across all sources.

Another small improvement: some users like to see which posts they already read. It would be nice to add a setting where users can choose how read posts appear.

For example:

  • Dim read posts (default)
  • Hide read posts
  • Show normally

@medyo medyo linked an issue Feb 15, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New feature Request a new language to add

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark as read or Hide article

2 participants