Skip to content

feat(streaming): polling モードでチャットメッセージを配信する - #61

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

feat(streaming): polling モードでチャットメッセージを配信する#61
hitalin merged 1 commit into
developfrom
fix/polling-chat

Conversation

@hitalin

@hitalin hitalin commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

なぜ

ポーリングモードではチャットカラム・チャットウィンドウの新着が初期ロード後に更新されない (notedeck-dev/notedeck#1008)。ポーリングループの対象にチャット購読 (chatUser / chatRoom) が含まれていなかった。

何を

  • polling_loop がチャット購読を検出し、chat/messages/user-timeline / room-timeline を定期取得して WS と同じ StreamEvent::ChatMessage として配る
  • chat は subscription_id で 1:1 配送されるため、購読 ID をそのまま載せる (テストで検証)
  • DB キャッシュは WS 受信側と同じ cache_chat_message 経路
  • 初回サイクルはカーソル確立のみで emit しない (notecli#60 の通知 polling と同じ方針)
  • 既読/リアクション/削除の polling 追随はスコープ外 (issue 備考のとおり要検討事項)

🤖 Generated with Claude Code

ポーリングループの対象にチャット購読 (chatUser / chatRoom) が含まれず、
polling モードではチャットの新着が届かなかった (notedeck#1008)。チャット
購読を検出して user-timeline / room-timeline を定期取得し、WS と同じ
ChatMessage イベントで配る。chat は subscription_id で 1:1 配送される
ため購読 ID をそのまま載せる。DB キャッシュも WS 受信側と同じ経路。

初回サイクルはカーソル確立のみで emit しない (#1003 の通知 polling と
同じ方針)。既読/リアクション/削除の polling 追随はスコープ外。

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: a85a85ea-8850-4e48-9402-a785204fb812

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 0b0d39d 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