Skip to content

feat: アンテナから特定のノートを手動で除去できるように#17463

Open
samunohito wants to merge 4 commits into
misskey-dev:developfrom
samunohito:feat/15391-antenna-note-remove
Open

feat: アンテナから特定のノートを手動で除去できるように#17463
samunohito wants to merge 4 commits into
misskey-dev:developfrom
samunohito:feat/15391-antenna-note-remove

Conversation

@samunohito
Copy link
Copy Markdown
Member

What

アンテナからノートを消せるようにします。

Why

fix #15391

Additional info (optional)

ローカルで動確済み

Checklist

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

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 20, 2026
@github-actions github-actions Bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js packages/backend:test labels May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.29%. Comparing base (9f2e806) to head (0807419).

Files with missing lines Patch % Lines
...d/src/server/api/endpoints/antennas/remove-note.ts 0.00% 10 Missing and 1 partial ⚠️
packages/frontend/src/utility/get-note-menu.ts 0.00% 7 Missing and 4 partials ⚠️
packages/frontend/src/components/MkNote.vue 0.00% 1 Missing and 2 partials ⚠️
...ontend/src/components/MkStreamingNotesTimeline.vue 0.00% 2 Missing and 1 partial ⚠️
packages/backend/src/core/FanoutTimelineService.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17463      +/-   ##
===========================================
- Coverage    25.31%   25.29%   -0.02%     
===========================================
  Files         1160     1161       +1     
  Lines        39643    39671      +28     
  Branches     11010    11018       +8     
===========================================
  Hits         10036    10036              
- Misses       23729    23749      +20     
- Partials      5878     5886       +8     

☔ 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 302.22 MB 306.67 MB +4.45 MB +1.47%
VmHWM 302.22 MB 306.67 MB +4.45 MB +1.47%
VmSize 23169.19 MB 23171.48 MB 2.29 MB 0%
VmData 1369.50 MB 1372.02 MB +2.52 MB +0.18%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 302.59 MB 306.68 MB +4.08 MB +1.35%
VmHWM 302.59 MB 306.68 MB +4.08 MB +1.35%
VmSize 23169.60 MB 23171.57 MB 1.96 MB 0%
VmData 1369.92 MB 1372.10 MB +2.18 MB +0.15%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 303.04 MB 307.10 MB +4.05 MB +1.33%
VmHWM 303.04 MB 307.10 MB +4.05 MB +1.33%
VmSize 23169.60 MB 23171.65 MB 2.04 MB 0%
VmData 1369.92 MB 1372.19 MB +2.27 MB +0.16%

See workflow logs for details

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

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

差分はこちら
--- base
+++ head
@@ -21287,6 +21287,168 @@
         }
       }
     },
+    "/antennas/remove-note": {
+      "post": {
+        "operationId": "post___antennas___remove-note",
+        "summary": "antennas/remove-note",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/antennas/remove-note.ts"
+        },
+        "tags": [
+          "antennas"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "antennaId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "noteId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  }
+                },
+                "required": [
+                  "antennaId",
+                  "noteId"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "204": {
+            "description": "OK (without any results)"
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "NO_SUCH_ANTENNA": {
+                    "value": {
+                      "error": {
+                        "message": "No such antenna.",
+                        "code": "NO_SUCH_ANTENNA",
+                        "id": "850926e0-fd3b-49b6-b69a-b28a5dbd82fe"
+                      }
+                    }
+                  },
+                  "INVALID_PARAM": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid param.",
+                        "code": "INVALID_PARAM",
+                        "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Authentication error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "CREDENTIAL_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Credential required.",
+                        "code": "CREDENTIAL_REQUIRED",
+                        "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Forbidden error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "AUTHENTICATION_FAILED": {
+                    "value": {
+                      "error": {
+                        "message": "Authentication failed. Please ensure your token is correct.",
+                        "code": "AUTHENTICATION_FAILED",
+                        "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "418": {
+            "description": "I'm Ai",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "I_AM_AI": {
+                    "value": {
+                      "error": {
+                        "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+                        "code": "I_AM_AI",
+                        "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "500": {
+            "description": "Internal server error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INTERNAL_ERROR": {
+                    "value": {
+                      "error": {
+                        "message": "Internal error occurred. Please contact us if the error persists.",
+                        "code": "INTERNAL_ERROR",
+                        "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/antennas/show": {
       "post": {
         "operationId": "post___antennas___show",

Get diff files from Workflow Page

});
}

if (props.currentAntenna != null && appearNote.userId !== $i.id && !$i.isModerator && !$i.isAdmin) {
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.

条件がややこしくて一瞬L519-L526と重複に見えた
else if では無理そう?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fix 59ba89e

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

off-topic:
なんかもうこのファイルが全体的にカオスなので、ごそっと整理したい気持ちも…

const isMyNote = appearNote.userId === $i.id;
const isModerator = $i.isModerator || $i.isAdmin;

みたいなのを作って、同じ条件を置き換えるだけでも認知負荷が下がりそうな予感

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

あと、unit-testを書いてもいいかもしれない

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

Labels

packages/backend:test packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

アンテナ内のノートを取り除く機能

2 participants