feat: 投稿日時の範囲を条件に加えてノート検索出来るようにする#16119
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #16119 +/- ##
===========================================
+ Coverage 24.89% 25.24% +0.34%
===========================================
Files 1160 1162 +2
Lines 39553 39774 +221
Branches 11016 11054 +38
===========================================
+ Hits 9846 10039 +193
- Misses 23806 23833 +27
- Partials 5901 5902 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -72247,6 +72247,18 @@
"query": {
"type": "string"
},
+ "rangeStartAt": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "rangeEndAt": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
"sinceId": {
"type": "string",
"format": "misskey:id" |
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the note search functionality by adding the ability to filter results based on a range of posting dates.
- Adds two new fields (rangeStartAt and rangeEndAt) to the type definitions for search queries.
- Updates the frontend search form with new datetime-local inputs and integrates the date range into the search parameters.
- Extends the backend API endpoint and search service to support filtering notes by a specified date range.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/misskey-js/src/autogen/types.ts | Adds new optional fields rangeStartAt and rangeEndAt to the operations type definition. |
| packages/frontend/src/pages/search.note.vue | Introduces new inputs for date filtering and includes the range in the computed search parameters. |
| packages/backend/src/server/api/endpoints/notes/search.ts | Extends the API parameter definitions and passes the new range fields to the search service. |
| packages/backend/src/core/SearchService.ts | Implements the new date range filtering for notes in both the query and pagination filters. |
There was a problem hiding this comment.
Pull Request Overview
This PR enables filtering notes by a date range in the search feature.
- Extends the API schema and misskey-js types with
rangeStartAtandrangeEndAt - Updates the frontend search page to render datetime inputs and include their values in search parameters
- Implements backend handling in the endpoint and
SearchServiceto apply date‐based filters
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/misskey-js/src/autogen/types.ts | Added rangeStartAt and rangeEndAt to the notes/search query type |
| packages/frontend/src/pages/search.note.vue | Rendered two datetime-local inputs and wired them into the computed searchParams |
| packages/backend/src/server/api/endpoints/notes/search.ts | Exposed rangeStartAt/rangeEndAt in the endpoint schema and passed them through |
| packages/backend/src/core/SearchService.ts | Added query conditions and filter entries to restrict notes by the given date range |
| locales/ja-JP.yml | Added Japanese translations for the new “postFrom” and “postTo” labels |
Comments suppressed due to low confidence (1)
packages/backend/src/core/SearchService.ts:238
- Add tests for the new date-range filtering logic to verify that
rangeStartAtandrangeEndAtcorrectly include/exclude notes.
if (opts.rangeStartAt) {
# Conflicts: # packages/frontend/src/pages/search.note.vue # packages/misskey-js/src/autogen/types.ts
もうだいぶ記憶が薄れてるけど、ならなかったパターンでした。 ※指定した期間の検索結果数がページネーションの閾値を超えると、期間の設定を維持しつつページネーション機能を使えない(from-toかsince/untilのどちらかしか指定できない) |
|
@syuilo |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
よさそう |
# Conflicts: # CHANGELOG.md
|
(いちおう最新に追従したけど、やっぱりDB検索部分だけでもテスト生やしたいのでdraftにします) |
Backend memory usage comparisonBefore GC
After GC
After Request
|
# Conflicts: # packages/frontend/src/pages/search.note.vue
|
テスト増強+最新追従しました。 |
|
conflict解消 |
|
👍🏻 |

What
ノート検索で期間を指定できるようになります
Why
fix #16035
Additional info (optional)
Checklist