Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 29, 2025

What

Add search filtering to users/following and users/followers API endpoints via a new query parameter. The frontend now displays a search input in the follow/follower list views.

Backend:

  • Add query parameter to both endpoints
  • Search by name (ILIKE partial match) and username (prefix match if @-prefixed, partial match otherwise)
  • query takes priority over birthday when both specified

Frontend:

  • Enable canSearch and set searchParamName: 'query' on Paginator instances in follow-list.vue

Why

Additional info (optional)

Search logic follows UserSearchService.search pattern:

  • @username → prefix match on usernameLower
  • Valid username string → partial match on usernameLower
  • Any string → partial match on name (ILIKE)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /home/REDACTED/.nvm/versions/node/v22.15.0/bin/node node dist/index.js --exec install (dns block)
  • iojs.org
    • Triggering command: /usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o - (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>フォロー・フォロワーを絞り込む機能</issue_title>
<issue_description>### Summary

特定のフォロー・フォロワーを簡単に探すことができるように、ユーザーIDや名前の(一部)で検索して絞り込む機能がほしいです。

Purpose

特定のフォロー・フォロワーを探すときに全員が載っているリストから探すのが少し面倒なため。

Do you want to implement this feature yourself?

  • Yes, I will implement this by myself and send a pull request</issue_description>

<agent_instructions>この機能を以下の要領で実装してください。

  • バックエンド
    • 既存のAPI users/following および users/followersquery パラメータを追加する。
    • birthday フィールドと query 両方が指定されている場合は、queryを優先する。
    • query での検索ロジックは、 UserSearchService.search に準じることが望ましい。
  • フロントエンド
    • 絞り込みの実装は、MkPaginationControlを使用する。
    • MkPaginationControl は、MkPaginationのpropsに withControl を指定することで別途インポートすることなく使用できる。
    • クエリパラメータをもとにしたリクエストペイロードの構築等は、Paginator クラスのコンストラクタ上で指定できる。別途仕組みを使用せず、なるべく既存の仕組みをベースに作成するようにすること。</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@kakkokari-gtyih @copilot この機能を以下の要領で実装してください。
  • バックエンド
    • 既存のAPI users/following および users/followersquery パラメータを追加する。
    • birthday フィールドと query 両方が指定されている場合は、queryを優先する。
    • query での検索ロジックは、 UserSearchService.search に準じることが望ましい。
  • フロントエンド
    • 絞り込みの実装は、MkPaginationControlを使用する。
    • MkPaginationControl は、MkPaginationのpropsに withControl を指定することで別途インポートすることなく使用できる。
    • クエリパラメータをもとにしたリクエストペイロードの構築等は、Paginator クラスのコンストラクタ上で指定できる。別途仕組みを使用せず、なるべく既存の仕組みをベースに作成するようにすること、</comment_new>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add filtering feature for followers and following feat: Add query parameter to filter following/followers lists Nov 29, 2025
@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Nov 29, 2025
@kakkokari-gtyih kakkokari-gtyih changed the title feat: Add query parameter to filter following/followers lists enhance: フォロー・フォロワーを検索できるように Nov 29, 2025
@kakkokari-gtyih kakkokari-gtyih removed their request for review November 29, 2025 09:57
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

❌ Patch coverage is 42.30769% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.01%. Comparing base (d35ddc7) to head (c13856e).
⚠️ Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
...ackend/src/server/api/endpoints/users/followers.ts 25.00% 15 Missing ⚠️
...ackend/src/server/api/endpoints/users/following.ts 53.12% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #16891      +/-   ##
===========================================
- Coverage    62.83%   61.01%   -1.83%     
===========================================
  Files         1150     1152       +2     
  Lines       115242   115505     +263     
  Branches      7896     7627     -269     
===========================================
- Hits         72409    70472    -1937     
- Misses       40690    42889    +2199     
- Partials      2143     2144       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kakkokari-gtyih
Copy link
Contributor

なんとなくいけてそうな感じがする

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -82120,6 +82120,12 @@
                         "minimum": 1,
                         "maximum": 100,
                         "default": 10
+                      },
+                      "query": {
+                        "type": [
+                          "string",
+                          "null"
+                        ]
                       }
                     }
                   }
@@ -82343,15 +82349,32 @@
                         "minimum": 1,
                         "maximum": 100,
                         "default": 10
-                      },
-                      "birthday": {
-                        "type": [
-                          "string",
-                          "null"
-                        ],
-                        "pattern": "^([0-9]{4})-([0-9]{2})-([0-9]{2})$"
                       }
                     }
+                  },
+                  {
+                    "oneOf": [
+                      {
+                        "type": "object",
+                        "properties": {
+                          "query": {
+                            "type": "string"
+                          }
+                        }
+                      },
+                      {
+                        "type": "object",
+                        "properties": {
+                          "birthday": {
+                            "type": [
+                              "string",
+                              "null"
+                            ],
+                            "pattern": "^([0-9]{4})-([0-9]{2})-([0-9]{2})$"
+                          }
+                        }
+                      }
+                    ]
                   }
                 ]
               }

Get diff files from Workflow Page

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

Backend Memory Usage Comparison

Metric base head Diff
RSS 352.14 MB 356.59 MB 4.45 MB (1.26%)

See workflow logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js

Projects

Development

Successfully merging this pull request may close these issues.

フォロー・フォロワーを絞り込む機能

2 participants