feat: 公開ロールの表示設定を追加#17643
Conversation
…n-setting # Conflicts: # CHANGELOG.md
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #17643 +/- ##
===========================================
+ Coverage 26.50% 26.84% +0.33%
===========================================
Files 1184 1186 +2
Lines 40446 40704 +258
Branches 11217 11264 +47
===========================================
+ Hits 10719 10925 +206
- Misses 23848 23894 +46
- Partials 5879 5885 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
📦 Frontend Bundle ReportChunk size diff (48 updated, 1 added, 0 removed)
Startup chunk size (1 updated, 0 added, 0 removed)
Startup chunks are the Vite entry for Bundle Stats
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -14121,6 +14121,10 @@
"isPublic": {
"type": "boolean"
},
+ "isPublicDisplayRequired": {
+ "type": "boolean",
+ "default": false
+ },
"isModerator": {
"type": "boolean"
},
@@ -14993,6 +14997,9 @@
"isPublic": {
"type": "boolean"
},
+ "isPublicDisplayRequired": {
+ "type": "boolean"
+ },
"isModerator": {
"type": "boolean"
},
@@ -62612,6 +62619,15 @@
"none"
]
},
+ "hiddenRoleIds": {
+ "type": "array",
+ "maxItems": 256,
+ "uniqueItems": true,
+ "items": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
"pinnedPageId": {
"type": [
"string",
@@ -88555,6 +88571,10 @@
"items": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string",
+ "format": "id"
+ },
"name": {
"type": "string"
},
@@ -88569,6 +88589,7 @@
}
},
"required": [
+ "id",
"name",
"iconUrl",
"displayOrder"
@@ -88945,6 +88966,13 @@
"isDeleted": {
"type": "boolean"
},
+ "hiddenRoleIds": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "id"
+ }
+ },
"twoFactorBackupCodesStock": {
"type": "string",
"enum": [
@@ -89962,6 +89990,7 @@
"preventAiLearning",
"isExplorable",
"isDeleted",
+ "hiddenRoleIds",
"twoFactorBackupCodesStock",
"hideOnlineStatus",
"hasUnreadSpecifiedNotes",
@@ -93488,6 +93517,18 @@
"type": "boolean",
"example": false
},
+ "asBadge": {
+ "type": "boolean",
+ "example": false
+ },
+ "isPublicDisplayRequired": {
+ "type": "boolean",
+ "example": false
+ },
+ "isExplorable": {
+ "type": "boolean",
+ "example": false
+ },
"displayOrder": {
"type": "integer",
"example": 0
@@ -93501,6 +93542,9 @@
"description",
"isModerator",
"isAdministrator",
+ "asBadge",
+ "isPublicDisplayRequired",
+ "isExplorable",
"displayOrder"
]
},
@@ -93535,6 +93579,10 @@
"type": "boolean",
"example": false
},
+ "isPublicDisplayRequired": {
+ "type": "boolean",
+ "example": false
+ },
"isExplorable": {
"type": "boolean",
"example": false
@@ -93589,6 +93637,7 @@
"target",
"condFormula",
"isPublic",
+ "isPublicDisplayRequired",
"isExplorable",
"asBadge",
"preserveAssignmentOnMoveAccount", |
⚙️ Backend Diagnostics ReportMemory: After GC(No significant changes) V8 Heap Snapshot Statistics
|
|
落ち着いたら見る |
ユーザーサイドではそれが設定のロールページになる |
|
他人が他人のロールを確認する場合だわね |
|
それは完全に非表示になるしAPIでも返ってこなくなる ただし、「見つけやすくする」がオンの場合はそのリストには出てくる(設定画面にその旨は記載済み https://github.com/misskey-dev/misskey/pull/17643#issuecomment-4880953845) |
|
なので導線を追加したほうが良さそうという感じ |
|
なんの動線かいまいちピンときてない |
|
他人が他人の完全なロールを確認する導線だわね |
それは無しなのでは(完全に非表示になるしAPIでも返ってこなくなる=他人からは非公開ロールと同じ扱いになるため。そうなると困るロールを管理者側で強制表示にする) |
|
表示上整理したい目的であれば、ノート上のバッジやプロフィールを開いたときに省略されていれば達成できて、それ( |
|
やりたいこと的に、表示上整理というよりかは公開ロールのユーザー側での非公開化の制御と言ったほうが近いかもしれない 元のIssueで表示上整理するというのを挙げたがそれは一例で、他にも、サーバーの支援者に対して支援者特典などのポリシーを付与した公開ロールを付与する運用になっている場合に、その公開ロールを非表示(非公開)とすることで、そのアカウントが支援者であるということを他のユーザーに公開せず支援者特典を享受できるというユースケースもある |
|
バッジが多すぎるから表示を絞りたい(ただそのロールを持っていることは公開したい)というのと、あるロールを持っていることを完全に秘密にしたいというのはどっちが多そうかしら |
このケースがあんまり思いつかなかった(ただこれをやるなら、バッジのみ非表示(プロフィールページなどには表示される)というモードを新設する形で対応すると導線の問題は解決する) |
|
ほむん |
📦 Frontend Bundle ReportChunk size diff (48 updated, 1 added, 0 removed)
Startup chunk size (1 updated, 0 added, 0 removed)
Startup chunks are the Vite entry for Bundle Stats,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
設定のメニュー移動した |
|
/preview |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
CHANGELOG.md (1)
17-19: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winユーザー影響のある変更を
## Unreleased配下へ移動してください。以下のエントリが
2026.7.0配下にありますが、ガイドラインに従い、## Unreleased配下の適切なサブセクションへ移動してください。
CHANGELOG.md#L17-L19: 公開ロール/ロールバッジの表示設定CHANGELOG.md#L60-L60: バックエンドログの1行JSON出力
CHANGELOG.md#L17-L19については、過去レビューと同じ未修正の指摘です。As per coding guidelines: 「ユーザー影響のある変更では、
CHANGELOG.mdの## Unreleased配下にある該当サブセクションへ追記する。」🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@CHANGELOG.md` around lines 17 - 19, Move the public role and role-badge display settings entry from the 2026.7.0 section into the appropriate subsection under ## Unreleased in CHANGELOG.md (anchor, lines 17-19). Also move the backend log single-line JSON output entry into the appropriate ## Unreleased subsection in CHANGELOG.md (sibling, line 60).Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@CHANGELOG.md`:
- Around line 17-19: Move the public role and role-badge display settings entry
from the 2026.7.0 section into the appropriate subsection under ## Unreleased in
CHANGELOG.md (anchor, lines 17-19). Also move the backend log single-line JSON
output entry into the appropriate ## Unreleased subsection in CHANGELOG.md
(sibling, line 60).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b7d8f7e3-b478-4ec2-b85e-7a84e673119f
📒 Files selected for processing (1)
CHANGELOG.md
|
/preview |
|
あらプロフィール設定とプロフィールページ見てもリンクらしきものが無いわね |
|
/preview |
🖥 Frontend Diagnostics Report(No significant changes) Requests by resource type
V8 heap snapshot statistics
📦 Bundle StatsChunk size diff (48 updated, 1 added, 0 removed)
Startup chunk size (2 updated, 0 added, 0 removed)
Startup chunks are the Vite entry for
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What
Fixes #17366
この PR では、公開ロールとロールバッジの表示をユーザーが個別に制御できるようにします。
DB/API 変更:
user.hiddenRoleIdsを追加し、ユーザーごとの非表示ロール ID を保存しますrole.isPublicDisplayRequiredを追加し、管理者がユーザー側での非表示を禁止できるようにしますi/updateにhiddenRoleIdsを追加し、保存時に「割り当て済み」「公開」「常時表示ではない」ロールだけへ sanitize しますmisskey-jsautogen を更新しましたWhy
Issue #17366 の要望どおり、ロールバッジが多く付与されていて見た目を整理したい場合などに、ユーザー自身がプロフィールやノート上に表示する公開ロール/ロールバッジを選べるようにするためです。
一方で、運営上必ず表示したいロールもあり得るため、管理者が特定の公開ロール/ロールバッジを常時表示にできる設定も同時に追加しています。
Additional info (optional)
追加・更新した確認観点:
i/updateでhiddenRoleIdsが保存時に sanitize される e2e テストUserEntityServiceで通常閲覧者、本人、モデレーターごとの表示差分を確認する unit testCHANGELOG.mdとlocales/ja-JP.ymlを更新up/downを追加手元確認:
git diff --check origin/develop...HEADは通過しました未実行:
pnpm --filter backend test -- UserEntityServicepnpm --filter frontend test -- home.stories.implpnpm --filter backend check-migrationsこの環境の Node.js が
v24.14.0で、リポジトリの要求^22.22.2 || ^24.17.0 || ^26.4.0を満たさないため、上記 pnpm コマンドは起動前に失敗しました。Checklist
UIは #17643 (comment)