Skip to content

fix(streaming): main チャンネル購読をアカウント単位で 1 本に dedup する - #58

Merged
hitalin merged 1 commit into
developfrom
fix/main-channel-singleton
Aug 7, 2026
Merged

fix(streaming): main チャンネル購読をアカウント単位で 1 本に dedup する#58
hitalin merged 1 commit into
developfrom
fix/main-channel-singleton

Conversation

@hitalin

@hitalin hitalin commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

なぜ

Misskey の mainshouldShare チャンネルで、同一 WS 接続への 2 本目の connect をサーバーが黙って無視する (ack も返らない)。従来は購読のたびに新規 ID で connect していたため、notedeck で通知カラムとメンションカラムが併存すると後から張った側にイベントが一切届かなかった (notedeck-dev/notedeck#984)。

さらに main には通知・メンション・OS 通知・未読バッジがすべてぶら下がるため、カラム都合の unsubscribe / suspend で main を切ると他の消費者ごと無音になる (notedeck-dev/notedeck#1002)。

変更

  • subscribe_target: SubscriptionTarget::Main は既存の購読 ID を返す (check-and-insert を原子化し、send 失敗時はロールバック)
  • unsubscribe / suspend_subscription: Main に対しては no-op。解放経路は disconnect のみ
  • テスト 2 本追加 (dedup / no-op 化)

🤖 Generated with Claude Code

Misskey の main は shouldShare チャンネルで、同一 WS 接続への 2 本目の
connect はサーバーが黙って無視する (ack も返らない)。従来は購読のたびに
新規 ID で connect していたため、通知カラムとメンションカラムが併存すると
後から張った側にイベントが一切届かなかった (notedeck#984)。

- subscribe_target: Main は既存購読 ID を返す (check-and-insert を原子化)
- unsubscribe / suspend_subscription: Main は no-op (共有チャンネルのため
  カラム都合で切ると OS 通知・未読バッジまで巻き添えになる。解放は
  disconnect のみ)

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e10e712c-9483-452d-81c1-250da6e810ef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hitalin
hitalin merged commit 2d7305e into develop Aug 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant