Skip to content

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Jul 22, 2025

Describe Your Changes

This pull request updates the deleteAllThreads method in the useThreads hook to preserve favorite threads while deleting non-favorite ones. Additionally, it modifies the search index logic to reflect the remaining threads.

Changes to thread deletion logic:

  • web-app/src/hooks/useThreads.ts: Updated the deleteAllThreads method to filter threads into favorite and non-favorite categories, ensuring only non-favorite threads are deleted. Favorite threads are retained and restructured into the remainingThreads object.

Changes to search index:

  • web-app/src/hooks/useThreads.ts: Modified the searchIndex initialization to use the remaining favorite threads, with a selector function targeting the title property for indexing.

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

deleteAllThreads in useThreads.ts now retains favorite threads and updates the search index accordingly.

This description was created by Ellipsis for 9a95257. You can customize this summary. It will automatically update as commits are pushed.

@urmauur urmauur added this to the v0.6.6 milestone Jul 22, 2025
@urmauur urmauur requested a review from louis-menlo July 22, 2025 10:19
@urmauur urmauur self-assigned this Jul 22, 2025
@urmauur urmauur added this to Jan Jul 22, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 9a95257 in 1 minute and 9 seconds. Click for details.
  • Reviewed 40 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/hooks/useThreads.ts:112
  • Draft comment:
    Good job filtering favorites! However, if the current thread (currentThreadId) is among the non-favorites that are deleted, it remains unchanged. Consider updating or clearing currentThreadId to avoid dangling references.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. web-app/src/hooks/useThreads.ts:119
  • Draft comment:
    You perform two separate filter iterations to split favorite and non-favorite threads. For improved efficiency, consider iterating once and partitioning the threads into two groups.
  • Reason this comment was not posted:
    Confidence changes required: 25% <= threshold 50% None
3. web-app/src/hooks/useThreads.ts:134
  • Draft comment:
    The Fzf instance is constructed with the type parameter Fzf<Thread[]> even though it is passed an array of Thread items. Verify if Fzf might be more appropriate to ensure type clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None

Workflow ID: wflow_FdWNRYuoHESnMP6i

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

Barecheck - Code coverage report

Total: 35.17%

Your code coverage diff: 0.05% ▴

Uncovered files and lines
FileLines
web-app/src/hooks/useThreads.ts70, 72-76, 127-129, 145-150, 154, 169-177, 179, 182, 185, 187-193, 195-213, 215-229, 253-255, 258-261, 264-265, 268, 270-277

@urmauur urmauur merged commit 7b3b6cc into release/v0.6.6 Jul 22, 2025
18 of 21 checks passed
@github-project-automation github-project-automation bot moved this to QA in Jan Jul 22, 2025
@urmauur urmauur deleted the fix/delete-all branch July 22, 2025 12:52
@urmauur urmauur moved this from QA to Done in Jan Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

bug: Pressing "delete all" in Recent on thread shouldn't delete thread in Favourite
2 participants