Skip to content

feat(streaming): polling モードで main チャンネル相当の通知・メンションを配信する - #60

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

feat(streaming): polling モードで main チャンネル相当の通知・メンションを配信する#60
hitalin merged 1 commit into
developfrom
fix/polling-main-channel

Conversation

@hitalin

@hitalin hitalin commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

なぜ

ポーリングモードでは通知カラム・メンションカラムが初期ロード後いっさい更新されない (notedeck-dev/notedeck#1003)。ポーリングループの対象がノート系購読 (SubscriptionTarget::Notes) だけで、main チャンネル (通知/メンション) の取得経路がそもそも実装されていなかった。

何を

  • polling_loop が SubscriptionTarget::Main の購読 (#984 の dedup によりアカウントあたり高々 1 本) を検出し、i/notificationsnotes/mentions を定期取得する
  • 取得結果は WS と同じ StreamEvent::Notification / StreamEvent::Mention として emit_both で配る。下流 (notedeck の query ルーティング・OS 通知・未読バッジ・SSE) は WS モードとそのまま共通で動く
  • 初回サイクルはカーソル (since_id) の確立のみで emit しない — 過去分をまとめて配ると OS 通知が大量発火するため

🤖 Generated with Claude Code

ポーリングループの対象がノート系購読だけで、main チャンネル (通知/
メンション) の取得経路が存在しなかった (notedeck#1003)。main 購読を
検出して i/notifications / notes/mentions を定期取得し、WS と同じ
StreamEvent::Notification / Mention として emit_both で配る。下流の
query ルーティング・OS 通知・未読バッジは WS モードとそのまま共通。

初回サイクルはカーソル確立のみで emit しない — 過去分をまとめて配ると
OS 通知が大量発火するため。

Co-Authored-By: Claude Opus 4.8 <[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: c2fbfb18-0c0b-4aa3-a27f-07c04a226d63

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 9548c18 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