feat(desktop): Actionログの自動ポーリングとRe-run後即時更新#73
Merged
Conversation
- 3秒間隔でジョブステータスとログをポーリング(全ステップ完了で停止) - Re-run実行後にgetJobLogsクエリをinvalidateして即座に更新 - ReviewPanel側のRe-runでもActionLogsタブのキャッシュを無効化 - 実行中ジョブではメタデータのみ取得(ログAPIは完了後のみ利用可能) - 完了ステップから順次ログを表示するUX
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughこのPRは、ブラウザペインのHTML全画面モード機能を実装します。メインプロセスで全画面イベントを検出し、TRPC購読経由でレンダラープロセスに通知し、グローバル状態を管理してUIを反応させます。また、GitHubジョブログのポーリング間隔を短縮しました。 Changes
Sequence Diagram(s)sequenceDiagram
participant User as ユーザー
participant BrowserPane as BrowserPane
participant WebView as WebView
participant BrowserMgr as BrowserManager
participant TRPC as TRPC購読
participant Hook as useBrowserFullscreenHandler
participant Store as useBrowserFullscreenStore
participant UI as UIコンポーネント
User->>WebView: HTML全画面リクエスト
WebView->>WebView: Fullscreen API上書きシム実行
WebView->>BrowserMgr: enter-html-full-screen発火
BrowserMgr->>BrowserMgr: fullscreenPaneId更新
BrowserMgr->>TRPC: fullscreen-change イベント発行
TRPC->>Hook: {paneId, isFullscreen: true}配信
Hook->>Store: setFullscreenPane(paneId)
Store->>BrowserPane: fullscreenPaneId更新通知
BrowserPane->>BrowserPane: hideToolbar=true, BookmarkBar非表示
BrowserPane->>UI: ツールバー/ヘッダー非表示制御
User->>WebView: Esc キー(全画面終了)
WebView->>BrowserMgr: leave-html-full-screen発火
BrowserMgr->>TRPC: fullscreen-change イベント発行
TRPC->>Hook: {paneId, isFullscreen: false}配信
Hook->>Store: setFullscreenPane(null)
Store->>UI: ツールバー/ヘッダー表示復元
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
- getJobLogsの返り値にjobStatus/jobConclusionを追加 - サイドバーのジョブアイコンがポーリングで動的に更新 - ジョブヘッダーのステータスもライブ更新 - 実行中→完了の遷移をリアルタイムに反映 - ジョブ完了までは3秒ポーリング、完了で停止
- 新しいtRPCプロシージャ getJobStatuses: 全ジョブのステータスを並列取得 - サイドバーのアイコンが選択中以外のジョブもリアルタイム更新 - Re-run後に getJobStatuses もinvalidateして即座に反映 - JobStepsコンポーネントからonJobStatusChangeコールバックを削除(不要に)
- ACTIVE_GITHUB_STATUS_REFETCH_INTERVAL_MS: 10s → 3s - ACTIVE_GITHUB_STATUS_STALE_TIME_MS: 10s → 3s - CheckSteps: 15s → 3s - ActionLogsタブと同じ3秒間隔で統一
- getJobStatuses廃止 → getGitHubStatusキャッシュを共有 - ReviewタブとActionLogsタブが完全に同じデータソースを参照 - ステータス変化のタイミングが完全一致 - API呼び出し数を削減
- ジョブの名前マッチで最新のcheck URLに自動更新(Re-runでURL変更に対応) - Re-run後も古いURLに固定されず、新しいrunのジョブを自動追跡 - サイドバーのステータスもlive checksから直接反映
- window.open()をElectron子ウィンドウで開きOAuth認証フローに対応 - Fullscreen APIをJS側でオーバーライドしpane内で動画全画面を実現 - BrowserWindow全画面化を防止し、動画プレーヤーだけをfixed表示 - ESCキーで全画面終了、中間コンテナも含め全てのサイズを復元
… steps undefined)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
#72 で追加した Action Logs ペインに、自動ポーリングと Re-run 後の即時更新機能を追加。
変更内容
getJobLogsキャッシュをinvalidateして即座に反映技術的な背景
GitHub REST APIは実行中ジョブのログストリーミングを提供していない(404が返る)。そのため、ステータスのポーリング + 完了ステップのログ一括取得を組み合わせた方式を採用。
テストプラン
Summary by CodeRabbit
リリースノート
新機能
改善