Repository navigation
feat(nicojk): miyouコメントを過去ログに統合 - #33
Conversation
レビュアー向けガイドMiyou の 5ch ログを nicojk の過去ログコメントに統合し、ソースごと/オリジンごとのフィルタリングと件数表示を導入します。また、重複排除とエラーハンドリングを備えた Miyou の認証・取得パイプラインを追加し、レスアンカーによるフィルタリング、再読み込み、新しい設定などのレンダラー/UX の変更を行います。 Miyou の過去ログコメント統合のシーケンス図sequenceDiagram
participant User
participant OptionsPage
participant App
participant KakologManager
participant MiyouClient
participant MiyouAPI
User->>OptionsPage: saveSettings()
OptionsPage->>App: settings updated
App->>MiyouClient: clearMiyouAuth()
App->>KakologManager: refreshMiyou(duration)
KakologManager->>MiyouClient: fetchMiyouComments(channel, start, end)
MiyouClient->>MiyouAPI: POST /auth/moritapo
MiyouAPI-->>MiyouClient: token
MiyouClient->>MiyouAPI: GET /miyou/comments
MiyouAPI-->>MiyouClient: Miyou comments
MiyouClient-->>KakologManager: convertMiyouComment()
KakologManager-->>App: synchronized comments
App-->>User: update recorded comments
ファイル単位の変更
関連 Issue に対する評価
関連する可能性のある Issue
ヒントとコマンドSourcery とのやり取り
利用環境のカスタマイズダッシュボード にアクセスして、以下を行えます。
ヘルプの利用
Original review guide in EnglishReviewer's GuideIntegrates Miyou 5ch logs into nicojk recorded comments, introduces per-source/per-origin filtering and counts, adds Miyou authentication and fetching pipeline with deduplication and error handling, and adds renderer/UX changes like response-anchor filtering, reload, and new settings. Sequence diagram for Miyou recorded comment integrationsequenceDiagram
participant User
participant OptionsPage
participant App
participant KakologManager
participant MiyouClient
participant MiyouAPI
User->>OptionsPage: saveSettings()
OptionsPage->>App: settings updated
App->>MiyouClient: clearMiyouAuth()
App->>KakologManager: refreshMiyou(duration)
KakologManager->>MiyouClient: fetchMiyouComments(channel, start, end)
MiyouClient->>MiyouAPI: POST /auth/moritapo
MiyouAPI-->>MiyouClient: token
MiyouClient->>MiyouAPI: GET /miyou/comments
MiyouAPI-->>MiyouClient: Miyou comments
MiyouClient-->>KakologManager: convertMiyouComment()
KakologManager-->>App: synchronized comments
App-->>User: update recorded comments
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
こんにちは。1件の問題を見つけました
AIエージェント向けプロンプト
このコードレビューのコメントに対応してください:
## 個別のコメント
### コメント1
<location path="src/plugins/nicojk/App.tsx" line_range="916-918" />
<code_context>
+
+ pendingResumeRef.current.delete(playerID);
+ const manager = kakologManagersRef.current.get(playerID);
+ manager?.setProgressListener(null);
+ manager?.clearCache();
+ resetRecordedCommentsState(data);
+ if (manager && data.jkContext) {
+ data.jkContext = withKakologSourceStates(data.jkContext, manager);
</code_context>
<issue_to_address>
**issue (bug_risk):** 録画コメントの再読み込みハンドラーはマネージャーのキャッシュを消去してプレーヤーの状態をリセットしますが、新しい `fetchWithLimit`/`fetchMore` 処理を開始していません。そのため、再読み込みボタンをクリックすると、後から無関係なイベントによって読み込みが発生するまで、録画再生にコメントが表示されなくなります。
**Triggers:** ユーザーが録画番組に対して「コメントを最初から再取得」をクリックしたとき。
**Suggested fix:** 状態をリセットした後、`playerID` に対する既存の録画コメント初期読み込み処理を呼び出す(またはマネージャーの fetch メソッドを明示的に呼び出す)とともに、読み込み状態とトークン状態を一貫して更新してください。
</issue_to_address>Sourceryによる評価
人間のレビュアーによる確認が必要です。 最初に対応すべき指摘が1件あります。また、新しいサードパーティサービスへの認証リクエストを追加し、ユーザーのMiyou認証情報を保存しているため、バグによって認証情報が誤って送信されたり、誤ったコメントデータが公開・表示されたりする可能性があります。機能を無効化するか変更を元に戻せば今後のリクエストは停止できますが、すでに送信された認証情報や、外部サービス上で発生した副作用を取り消すことはできません。
ブロッキング対象の指摘:src/plugins/nicojk/App.tsx:918
もっと役立つレビューにするため、各コメントの 👍 または 👎 をクリックしてください。フィードバックをもとにレビューを改善します。
Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/plugins/nicojk/App.tsx" line_range="916-918" />
<code_context>
+
+ pendingResumeRef.current.delete(playerID);
+ const manager = kakologManagersRef.current.get(playerID);
+ manager?.setProgressListener(null);
+ manager?.clearCache();
+ resetRecordedCommentsState(data);
+ if (manager && data.jkContext) {
+ data.jkContext = withKakologSourceStates(data.jkContext, manager);
</code_context>
<issue_to_address>
**issue (bug_risk):** The recorded-comments reload handler clears the manager cache and resets the player state, but never starts a new `fetchWithLimit`/`fetchMore` operation. Clicking the reload button therefore leaves recorded playback with no comments until an unrelated later event happens to trigger loading.
**Triggers:** When the user clicks “コメントを最初から再取得” for a recorded program.
**Suggested fix:** After resetting the state, invoke the existing initial recorded-comment loading path for `playerID` (or explicitly call the manager’s fetch method) and update the loading/token state consistently.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and this adds authenticated requests to a new third-party service and stores the user's Miyou credentials, so a bug could send credentials incorrectly or expose and display incorrect comment data. Disabling the feature or reverting stops future requests, but it cannot undo credentials already transmitted or any external-service side effects.
Blocking findings: src/plugins/nicojk/App.tsx:918
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Fixes #10
Sourceryによる概要
Miyou 5ch実況ログをNicoJKの録画再生に統合し、独立したフィード制御と処理設定を提供します。
新機能:
バグ修正:
機能強化:
ビルド:
テスト:
Original summary in English
Sourceryによる概要
Miyou 5ch実況ログをNicoJKの録画再生に統合し、フィードごとの独立した制御、認証設定、より堅牢なコメント取得を追加します。
新機能:
バグ修正:
機能改善:
ビルド:
テスト:
Original summary in English
Sourceryによる概要
Miyou 5ch実況ログをNicoJKの録画再生に統合し、フィードごとの個別制御、認証設定、より堅牢なコメント取得に対応しました。
新機能:
バグ修正:
改善:
ビルド:
テスト:
Original summary in English
Summary by Sourcery
Integrate Miyou 5ch実況 logs into NicoJK recorded playback with separate feed controls, configurable authentication, and more resilient comment acquisition.
New Features:
Bug Fixes:
Enhancements:
Build:
Tests: