feat: 投稿日時の範囲を条件に加えてノート検索出来るようにする#16119
feat: 投稿日時の範囲を条件に加えてノート検索出来るようにする#16119samunohito wants to merge 10 commits intomisskey-dev:developfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #16119 +/- ##
===========================================
+ Coverage 62.77% 62.80% +0.03%
===========================================
Files 1150 1152 +2
Lines 114944 115183 +239
Branches 7862 7899 +37
===========================================
+ Hits 72157 72343 +186
- Misses 40643 40695 +52
- Partials 2144 2145 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -71791,6 +71791,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 Comparison
|

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