Add comment search, OP reply jumps, and conversation navigation #1

Merged
salix merged 1 commit from t3code/improve-comment-navigation into main 2026-10-02 12:43:52 +02:00
Owner

Readers can now search a thread's comments, step through the original poster's replies, and jump between top-level conversations, on both Android and GNOME.

Find in comments

  • A search button in the thread header opens a find bar (Ctrl+Shift+F on GNOME, since Ctrl+F already searches Reddit).
  • It matches comment text and usernames across every loaded comment, including replies inside collapsed branches.
  • Each jump expands the branch, scrolls the match to the top and highlights it. Every occurrence of the search text is marked, and the bar shows "2 of 3" with previous and next arrows.
  • On GNOME, Enter or Ctrl+G goes to the next match and Shift+Enter or Ctrl+Shift+G to the previous one.

Replies from the original poster

  • An OP toggle in the find bar limits matches to the original poster's comments. With no search text it steps through everything they wrote.
  • The original poster's comments get an "OP" badge.

Conversation jumps

  • Android's Next and Prev dock buttons now jump between top-level conversations instead of moving one list item. Prev from the middle of a conversation returns to its start.
  • GNOME gets matching floating buttons over the thread, with Alt+Down and Alt+Up as shortcuts.

Notes

  • Changing the comment sort reloads the thread and closes the find bar.
  • Android already shows "1 replies" for a single reply. This PR leaves that alone.

Testing

  • GNOME: cargo test passes (70 tests, including new tests for matching, conversation targets and highlighted markup). Exercised in the running app under Xvfb with a fake thread.
  • Android: :app:testStableDebugUnitTest --tests app.threado.ui.CommentThreadTest passes (6 tests). Rendered the find bar and thread with a throwaway Robolectric screenshot test.
Readers can now search a thread's comments, step through the original poster's replies, and jump between top-level conversations, on both Android and GNOME. ## Find in comments - A search button in the thread header opens a find bar (Ctrl+Shift+F on GNOME, since Ctrl+F already searches Reddit). - It matches comment text and usernames across every loaded comment, including replies inside collapsed branches. - Each jump expands the branch, scrolls the match to the top and highlights it. Every occurrence of the search text is marked, and the bar shows "2 of 3" with previous and next arrows. - On GNOME, Enter or Ctrl+G goes to the next match and Shift+Enter or Ctrl+Shift+G to the previous one. ## Replies from the original poster - An OP toggle in the find bar limits matches to the original poster's comments. With no search text it steps through everything they wrote. - The original poster's comments get an "OP" badge. ## Conversation jumps - Android's Next and Prev dock buttons now jump between top-level conversations instead of moving one list item. Prev from the middle of a conversation returns to its start. - GNOME gets matching floating buttons over the thread, with Alt+Down and Alt+Up as shortcuts. ## Notes - Changing the comment sort reloads the thread and closes the find bar. - Android already shows "1 replies" for a single reply. This PR leaves that alone. ## Testing - GNOME: `cargo test` passes (70 tests, including new tests for matching, conversation targets and highlighted markup). Exercised in the running app under Xvfb with a fake thread. - Android: `:app:testStableDebugUnitTest --tests app.threado.ui.CommentThreadTest` passes (6 tests). Rendered the find bar and thread with a throwaway Robolectric screenshot test.
- Find in loaded comments from the thread header on Android and GNOME,
  including replies inside collapsed branches; each jump expands the
  branch, scrolls the match to the top, and marks the matched text
- Narrow matches to the original poster with an OP toggle, and badge
  their comments in the thread
- Make Android's Next and Prev jump between top-level conversations,
  and give GNOME matching floating buttons with Alt+Up and Alt+Down
- Open the GNOME find bar with Ctrl+Shift+F, since Ctrl+F searches Reddit
salix merged commit 26fe0db2b7 into main 2026-10-02 12:43:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
salix/threado!1
No description provided.