Skip to content

feat(swa): filter feed to a single thread view#70

Merged
github-actions[bot] merged 1 commit into
devfrom
feature/thread-filter
Jun 19, 2026
Merged

feat(swa): filter feed to a single thread view#70
github-actions[bot] merged 1 commit into
devfrom
feature/thread-filter

Conversation

@Ryback2501

Copy link
Copy Markdown
Owner

Summary

  • Add a thread view by filtering the existing feed to one thread rather than building a separate view. Showing a thread hides every card that doesn't belong to it; going back restores the full feed.

Changes

Feed client (swa/)

  • threading.js — add threadRootId (resolves an event's thread root via the root marker, deprecated positional tags, or self) and isInThread membership helper.
  • app.js — add activeThreadRoot state; enterThread/exitThread/fetchThread; combine PoW + thread membership in applyFeedFiltersToCard; wire the "Back to feed" banner; reset thread state on tab switch, disconnect, and subscription setup. fetchThread subscribes for the root and its descendants so threads not fully loaded fill in.
  • feedView.js — add a "View thread" action button on feed cards.
  • index.html — thread banner with a back button.
  • style.css — thread banner styling.
  • threading.test.js — unit tests for threadRootId and isInThread.

Test plan

  • Load the feed, click "View thread" on a reply — only that thread's posts remain visible.
  • Click "Back to feed" — the full feed returns.
  • Open a thread whose root/replies aren't loaded — they are fetched and appear.
  • Switch tabs (Feed/Following/Mentions) while in a thread — thread mode clears.
  • Confirm the PoW filter still hides low-difficulty posts inside a thread.

@github-actions github-actions Bot merged commit 758198e into dev Jun 19, 2026
10 checks passed
@github-actions github-actions Bot deleted the feature/thread-filter branch June 19, 2026 10: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