Skip to content

feat: add status filter chips to SearchStatusDialog - #1337

Merged
Rhilip merged 4 commits into
masterfrom
copilot/pt-pluginspt-depiler-1336-add-site-filter-function
Jun 22, 2026
Merged

feat: add status filter chips to SearchStatusDialog#1337
Rhilip merged 4 commits into
masterfrom
copilot/pt-pluginspt-depiler-1336-add-site-filter-function

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

SearchStatusDialog had no way to isolate sites by their result status, making it tedious to act on specific outcomes (e.g. open sites that need login, retry only parse errors).

Changes

  • statusChips computed — scans current searchPlan, counts entries per EResultParseStatus, and exposes only statuses that are actually present, each with its count and color.
  • filteredSearchPlan computed — returns all entries when no filter is active; otherwise returns only entries whose status is in the selected set.
  • Filter UIv-chip-group (multi-select) above the list; each chip reuses ResultParseStatus for its label plus a v-badge count. Zero selected = show all.
[ ✅ 获取成功! 12 ]  [ 🔴 需要登录! 3 ]  [ 🔴 无结果! 5 ]  [ 🔴 解析错误! 1 ]
─────────────────────────────────────────────────────
SiteA  -> entry  需要登录!   [↑] [↺]
SiteB  -> entry  需要登录!   [↑] [↺]
...

Chips are OR-combined; clicking a selected chip deselects it. The list and chips update reactively as searches complete.

Summary by Sourcery

Add status-based filtering to the search status dialog to make it easier to focus on specific result outcomes.

New Features:

  • Introduce status filter chips that display available result statuses with counts and colors in the search status dialog.
  • Add computed search plan filtering so the list only shows entries matching the selected result statuses.

Copilot AI requested review from Copilot and removed request for Copilot June 22, 2026 12:49
Copilot AI requested review from Copilot and removed request for Copilot June 22, 2026 12:54
Copilot AI changed the title [WIP] Add site filter function to search status dialog feat: add status filter chips to SearchStatusDialog Jun 22, 2026
Copilot AI requested a review from Rhilip June 22, 2026 12:54
Copilot AI review requested due to automatic review settings June 22, 2026 13:56
@Rhilip
Rhilip marked this pull request as ready for review June 22, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a status-based filtering UI to SearchStatusDialog in the Options “SearchEntity” flow, allowing users to quickly narrow the per-site results list by EResultParseStatus (multi-select chips with counts).

Changes:

  • Introduces computed statusChips to derive present statuses, counts, and chip colors from the current searchPlan.
  • Introduces computed filteredSearchPlan to filter the rendered list based on selected status chips (0 selected = show all).
  • Adds a v-chip-group UI above the results list to drive the filter.

Comment on lines 98 to 101
<SiteName
:class="['text-decoration-none', 'font-weight-bold', 'text-black']"
:site-id="searchPlan.siteId"
tag="span"
/>
@sourcery-ai

sourcery-ai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds status-based filtering to SearchStatusDialog by introducing computed status chip metadata and a filtered search plan, and wiring them into a new Vuetify chip-group UI that filters the existing search plan list reactively.

Flow diagram for status chip filtering in SearchStatusDialog

flowchart LR
  runtimeStore[search.searchPlan]

  runtimeStore --> statusChips[statusChips computed]
  runtimeStore --> filteredSearchPlan[filteredSearchPlan computed]

  statusChips --> chipGroup[v-chip-group statusFilterRef]
  chipGroup --> statusFilterRef[statusFilterRef]

  statusFilterRef --> filteredSearchPlan
  filteredSearchPlan --> vList[v-list of search results]
Loading

File-Level Changes

Change Details Files
Introduce reactive status filter state and status-to-color mapping for result statuses.
  • Add statusFilterRef as a ref of EResultParseStatus[] to hold the selected status filters.
  • Define a statusColorMap record mapping each EResultParseStatus to a Vuetify color name.
src/entries/options/views/Overview/SearchEntity/SearchStatusDialog.vue
Compute status chip metadata from the runtime search plan and expose a filtered search plan list based on selected statuses.
  • Add statusChips computed that counts searchPlan entries per EResultParseStatus and returns status/count/color objects.
  • Add filteredSearchPlan computed that returns all searchPlan entries when no filter is selected and otherwise filters by selected statuses, using typed tuples for entries.
src/entries/options/views/Overview/SearchEntity/SearchStatusDialog.vue
Add chip-based filter UI and wire it to the filtered search plan list in the template.
  • Render a v-chip-group bound to statusFilterRef, with a chip per statusChips item that shows ResultParseStatus and a badge count, styled via base-color.
  • Insert a divider below the chips when any statuses exist.
  • Change the v-list-item v-for to iterate over filteredSearchPlan entries and add :key="solutionKey".
  • Remove the unused tag prop on SiteName to simplify markup.
src/entries/options/views/Overview/SearchEntity/SearchStatusDialog.vue

Possibly linked issues

  • #(none): PR directly implements status-based filtering chips in SearchStatusDialog matching the issue’s requested post-search status filters.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@Rhilip Rhilip linked an issue Jun 22, 2026 that may be closed by this pull request
@Rhilip
Rhilip merged commit 89bc7e0 into master Jun 22, 2026
6 checks passed
@Rhilip
Rhilip deleted the copilot/pt-pluginspt-depiler-1336-add-site-filter-function branch June 22, 2026 14:00
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.

功能增加建议,搜索完成后增加站点筛选功能

3 participants