Skip to content

feat(desktop): Connect browser automation モーダルのUX改善#379

Merged
MocA-Love merged 11 commits intomainfrom
feature/browser-connect-modal-ux
Apr 21, 2026
Merged

feat(desktop): Connect browser automation モーダルのUX改善#379
MocA-Love merged 11 commits intomainfrom
feature/browser-connect-modal-ux

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

@MocA-Love MocA-Love commented Apr 21, 2026

背景 / 動機

ユーザーから以下の声がありました:

  1. どれがどのタブに繋がっているかわかりづらい
  2. すでに紐づいているものがどれかわかりづらい
  3. すでに MCP を追加しているのに毎回追加用スニペットが出て、「設定できてないのかな?」と思ってしまう

mock.html で現状 UI を再現し改善案を作成、本 PR で実装に落とし込みました。

変更点

SessionConnectModal

  • pane identity カードを刷新: Connected / Unassigned pill + Driven by: <session名> を明示。disconnect ボタンもカード右端に同居
  • ヘッダー直下に Workspace bindings サマリバー (connected / unassigned / needs setup) を常駐。"Open all panes view →" から BrowserAutomationList にジャンプ
  • SessionCard の pill を状況別に刷新:
    • 自 pane に bind されているセッション → ● Driving this pane
    • 他 pane に bind されているセッション → Driving: <pane名>
    • 未 bind で ready → Ready · Free
  • 3 タグ行 (kind / branch / last active) を 1 行 sub-line に統合し情報密度を下げた
  • footer の重複 Disconnect ボタンを削除 (pane identity カード側に統合)

McpInstallPanel

  • 全 runtime が installed + matchesExpected なら emerald 1 行バナー ("Browser MCP is installed — ready to connect") に畳む
  • "Manage ▾" で従来のインストールパネルへ展開可能
  • 未インストール runtime がある場合のみ従来通り展開表示

BrowserAutomationList (All panes)

  • カード羅列 → status dot + pane ← session 矢印 + actions の 1 行テーブル風レイアウト
  • メトリクスを 3 カード → 1 行のインライン表示に圧縮

参考

  • UI 比較は mock.html に現状 ①②③ / 改善案 ④⑤⑥ を並べて確認できます

Test plan

  • ブラウザ pane を開き Connect モーダルで pane identity カードに "Driven by: …" が出る
  • 他 pane に bind 済みのセッションを選ぶと "Driving: <pane名>" pill が表示される
  • 全 runtime インストール済みなら右カラムが 1 行バナーに畳まれる
  • Manage ▾ で従来のインストールパネルが展開される
  • All panes モーダルが 1 行レイアウトで表示される

Summary by CodeRabbit

リリースノート

  • 新機能

    • セッション接続モーダルに「Workspace」タブを追加し、ワークスペース単位のペーン一覧と操作を追加。
    • 新しい視覚モックを追加し、接続フローと各種状態をサンプル表示。
  • UI改善

    • ブラウザ自動化一覧をテーブル風に再設計し、合計/接続/未割当/要設定を一行で要約表示。
    • モーダルや行レイアウトを整理、名称短縮・トゥールチップ・分割コマンド表示を導入。
  • 改善

    • MCPインストール表示を凝縮バナーで簡潔化。

- pane identity card を "Driven by: <session>" 強調表示に刷新し Connected/Unassigned pill を追加
- ヘッダー直下に Workspace bindings サマリバー (connected / unassigned / needs setup) を常駐
- SessionCard の pill を状況別に更新 (● Driving this pane / Driving: <pane> / Ready · Free) + 3 tag 行を 1 行 sub-line に統合
- McpInstallPanel を全 runtime ready 時に emerald 1 行バナーへ畳む (Manage で展開)
- BrowserAutomationList をカード羅列 → status dot + pane ← session 矢印の 1 行テーブル風レイアウトへ
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@MocA-Love has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 36 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 36 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a2e439ae-8edd-4e5b-85a5-c2bb812e2b5c

📥 Commits

Reviewing files that changed from the base of the PR and between b7b7ba3 and ec7a623.

📒 Files selected for processing (7)
  • apps/desktop/src/lib/errors.ts
  • apps/desktop/src/lib/trpc/index.ts
  • apps/desktop/src/main/lib/language-services/providers/typescript/TypeScriptLanguageProvider.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/CdpEndpointCard/CdpEndpointCard.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/CdpEndpointCard/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/PermissionsTab/PermissionsTab.tsx
📝 Walkthrough

Walkthrough

ブラウザ自動化関連のUIを再構成し、BrowserAutomationListのレイアウト更新と幅拡張、SessionConnectModalにワークスペースビューと短縮表示を追加、McpInstallPanelにインストール検出と折りたたみバナーを導入しました(内部UIの表示/振る舞い変更のみ)。

Changes

Cohort / File(s) Summary
BrowserAutomationList UIリファクタリング
apps/desktop/src/renderer/screens/main/.../BrowserAutomationList/BrowserAutomationList.tsx
ダイアログ幅を640→720pxに拡大。3列のMetricグリッドを横並びサマリー行に置換(合計/接続/未割当/要セットアップ)。各ペイン行を再構成し接続フラグ・カラードット・状態表示・ボタンスタイルの分岐を導入。ローカルMetric関数を削除。
SessionConnectModal 構造変更と新コンポーネント
apps/desktop/src/renderer/screens/main/.../SessionConnectModal/SessionConnectModal.tsx
タブにworkspaceを追加。WorkspaceBindingsSummaryPaneIdentityCardWorkspacePanesTabを導出/追加。SessionCard表示ロジックを更新(短縮表示・pill文言・種別/最終アクティブを追加、Tag行削除、Disconnectボタンの位置変更)。複数パネルとトランケート関数を導入。
McpInstallPanel: インストール検出・折りたたみバナー
apps/desktop/src/renderer/screens/.../McpInstallPanel/McpInstallPanel.tsx
expanded状態を追加。claudeReady/codexReadyフラグでランタイムCLIの有無とコマンド一致を判定。全ランタイム準備済みなら折りたたまれた「installed — ready to connect」バナーを返し、Manageで展開可能。アイコン(LuCheck,LuChevronDown)追加。
CdpEndpointCard: コマンド分岐追加
apps/desktop/src/renderer/screens/main/.../CdpEndpointCard/CdpEndpointCard.tsx
以前の単一コマンドをClaude/Codexそれぞれのコマンドに分割。CommandBlockを複数追加し、各コマンド文字列とコピーラベルを対応付け。
PermissionsTab レイアウト変更
apps/desktop/src/renderer/screens/main/.../PermissionsTab/PermissionsTab.tsx
全体をflexカラム構成にし、ヘッダー(preset名/Duplicate/Delete/警告)とフッター(ステータス/Save/Activate)を非スクロール領域に分離。トグルリストを独立スクロール領域へ移動し、アクティブヘルプ文言を簡素化。
UIモック追加(静的)
mock.html
日本語の静的UIモックを追加。現行と提案のセッション/ペイン/MCP表示をTailwindでサンプル描画(JSロジックなし)。

Sequence Diagram(s)

sequenceDiagram
  participant User as "User"
  participant Modal as "SessionConnectModal"
  participant Workspace as "WorkspaceBindingsSummary / WorkspacePanesTab"
  participant MCP as "McpInstallPanel (runtime check)"
  participant Sessions as "Session list / SessionCard"

  User->>Modal: 開く(pane選択)
  Modal->>Workspace: workspaceId を派生してバインディング集計取得
  Modal->>Sessions: 実行中セッション一覧取得
  Modal->>MCP: ランタイムCLIの存在とコマンド一致をチェック
  MCP-->>Modal: 準備済みフラグ (claudeReady/codexReady)
  Modal->>User: 表示更新(Workspaceタブ / ペインカード / セッションカード / MCPバナー)
  User->>Modal: Connect/Change を実行
  Modal->>Sessions: セッションをペインに割当(または切替)
  Sessions-->>Modal: 割当結果
  Modal-->>User: 更新されたペイン状態を表示
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 ふわり繋いだブラウザの道しるべ
ペインとセッション、声を合わせて
MCPは緑でひとやすみ、必要なら展開
ワークスペースも一目で見えるように
さあ、次のクリックへ跳ねるよ ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main UX improvement to the browser automation modal with specific focus on the Connect modal.
Description check ✅ Passed The description comprehensively covers background, changes across multiple components, references the mock.html, and includes a test plan.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/browser-connect-modal-ux

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
mock.html (1)

1-7: mock.html のリポジトリ同居についての方針確認

mock.html はランタイムで使用されず、Tailwind CDN 依存の静的なデザインモックです。リポジトリルートに置くと以下の懸念があります:

  • ビルド/配布物と混在し、誤って静的ホスティングされる可能性
  • 将来的に UI と乖離しても検知されず、古いまま残りやすい
  • モックとしての位置付けが伝わりづらい(docs/design/ 配下の方が意図が明確)

docs/design/browser-automation/ など設計ドキュメント配下への移動、もしくは PR の説明欄へリンクを貼るだけ(commit しない)という選択肢もあります。現在の配置が意図的であれば、README 等で役割を明記しておくと後続メンテナ向けに親切です。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@mock.html` around lines 1 - 7, The mock.html file is a static Tailwind-based
design mock that should not live at the repo root; either move mock.html into a
documentation/design path (e.g., docs/design/browser-automation/mock.html) to
clarify its role and avoid accidental hosting, or keep it out of the commit and
instead add a link to the PR description; if you intentionally keep it at the
repo root, add a README entry (referencing mock.html) explaining it is a
non-runtime design mock and should not be included in build/distribution or
static hosting.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx (2)

354-425: コンポーネント props の型は interface を推奨

WorkspaceBindingsSummary(Line 358-362)・PaneIdentityCard(Line 419-425)ともインラインの object type で props を宣言しています。同ファイル内の SessionConnectModalPropsinterface で定義されており、リポジトリのガイドラインとも整合しません。新規に追加したサブコンポーネントも interface に寄せると揃います。

As per coding guidelines: "Prefer interface for defining object shapes in TypeScript".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`
around lines 354 - 425, Replace the inline object type annotations for
WorkspaceBindingsSummary and PaneIdentityCard with named interfaces (e.g.,
declare interface WorkspaceBindingsSummaryProps { sessions: AutomationSession[];
bindingsByPane: Record<string,string>; onOpenAllPanes: () => void; } and
interface PaneIdentityCardProps { paneName: string; paneUrl: string;
currentSession: AutomationSession | null; onDisconnect?: () => void;
disconnectPending?: boolean; }), then update the component signatures to accept
those interfaces (function WorkspaceBindingsSummary(props:
WorkspaceBindingsSummaryProps) { ... } and function PaneIdentityCard(props:
PaneIdentityCardProps) { ... }) so they match the existing
SessionConnectModalProps style and repository guideline preferring interface
over inline object types.

646-655: SetupPanel に未使用の props が残っている

session / mcpConfigPath / onCopy は受け取るだけで使われておらず、関数本体は McpInstallPanel をそのまま返しているだけです。呼び出し側(Line 266-275)でも mcpConfigPath を三項演算で計算しているので、無駄な処理にもなっています。SetupPanel ラッパーごと削除するか、最低限 serverCommand だけを受け取る形に整理するのがすっきりします。

♻️ リファクタ例

呼び出し側:

-							<SetupPanel
-								session={session}
-								mcpConfigPath={
-									session.provider === "Codex"
-										? (mcpStatus?.codexConfigPath ?? null)
-										: (mcpStatus?.claudeConfigPath ?? null)
-								}
-								serverCommand={serverCommand}
-								onCopy={handleCopySnippet}
-							/>
+							<McpInstallPanel serverCommand={serverCommand} />

これで SetupPanel 定義(Line 646-655)ごと削除でき、未使用の handleCopySnippet / getSnippetForSession import も併せて見直せます。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`
around lines 646 - 655, Remove the unused SetupPanel wrapper or simplify it to
only accept serverCommand: delete the SetupPanel function (and its import sites)
and directly render <McpInstallPanel serverCommand={serverCommand} /> where it
was used, or change SetupPanel signature to ({ serverCommand }: {
serverCommand?: ServerCommand }) => <McpInstallPanel
serverCommand={serverCommand} />; also remove unused props session,
mcpConfigPath, onCopy and clean up related unused imports handleCopySnippet and
getSnippetForSession. Ensure callers no longer compute mcpConfigPath for this
wrapper if you delete it.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/McpInstallPanel/McpInstallPanel.tsx (1)

100-126: 折りたたみバナー展開後に「閉じる」手段がない点 — 任意の改善

Manage ▾expanded=true にした後は、full panel から折りたたみバナーへ戻す UI がありません。allInstalled のときは「Collapse」ボタンや同じ Manage コントロールをトグルにすると、誤って展開しても元の静かな状態に戻せて UX が一貫します。

💡 提案例
-					<button
-						type="button"
-						onClick={() => setExpanded(true)}
-						className="inline-flex items-center gap-0.5 text-[11px] text-muted-foreground hover:text-foreground"
-					>
-						Manage
-						<LuChevronDown className="size-3" />
-					</button>
+					<button
+						type="button"
+						onClick={() => setExpanded((v) => !v)}
+						className="inline-flex items-center gap-0.5 text-[11px] text-muted-foreground hover:text-foreground"
+					>
+						Manage
+						<LuChevronDown className="size-3" />
+					</button>

併せて、full panel 側にも allInstalled のとき「Hide」ボタンを出すと双方向になります(初期リリースではスコープ外でも可)。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/McpInstallPanel/McpInstallPanel.tsx`
around lines 100 - 126, When allInstalled is true the UI only renders the
compact banner and the Manage button sets expanded via setExpanded(true) but
there is no way to collapse back; update McpInstallPanel to render a
corresponding collapse control when expanded (or make the existing Manage button
act as a toggle) so users can call setExpanded(false) to return to the compact
banner; locate logic using the expanded and allInstalled state and add a button
(e.g., "Collapse" or toggled "Manage") that invokes setExpanded(false) in the
full-panel render path so the banner can be hidden again.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`:
- Around line 354-411: The summary currently counts panes across all workspaces
because WorkspaceBindingsSummary's browserPanes filter only checks p.type ===
"webview" and tab existence; fix by scoping to the current workspace: resolve
the workspaceId for the modal (from the current paneId in SessionConnectModal)
and pass that workspaceId into WorkspaceBindingsSummary, then change the
browserPanes filter in WorkspaceBindingsSummary to also require
tabById.get(p.tabId)?.workspaceId === workspaceId (or use tabsById from
useTabsStore if available) so connected/unassigned/needsSetup only reflect panes
in the active workspace and match BrowserAutomationList.tsx's logic.

---

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/McpInstallPanel/McpInstallPanel.tsx`:
- Around line 100-126: When allInstalled is true the UI only renders the compact
banner and the Manage button sets expanded via setExpanded(true) but there is no
way to collapse back; update McpInstallPanel to render a corresponding collapse
control when expanded (or make the existing Manage button act as a toggle) so
users can call setExpanded(false) to return to the compact banner; locate logic
using the expanded and allInstalled state and add a button (e.g., "Collapse" or
toggled "Manage") that invokes setExpanded(false) in the full-panel render path
so the banner can be hidden again.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`:
- Around line 354-425: Replace the inline object type annotations for
WorkspaceBindingsSummary and PaneIdentityCard with named interfaces (e.g.,
declare interface WorkspaceBindingsSummaryProps { sessions: AutomationSession[];
bindingsByPane: Record<string,string>; onOpenAllPanes: () => void; } and
interface PaneIdentityCardProps { paneName: string; paneUrl: string;
currentSession: AutomationSession | null; onDisconnect?: () => void;
disconnectPending?: boolean; }), then update the component signatures to accept
those interfaces (function WorkspaceBindingsSummary(props:
WorkspaceBindingsSummaryProps) { ... } and function PaneIdentityCard(props:
PaneIdentityCardProps) { ... }) so they match the existing
SessionConnectModalProps style and repository guideline preferring interface
over inline object types.
- Around line 646-655: Remove the unused SetupPanel wrapper or simplify it to
only accept serverCommand: delete the SetupPanel function (and its import sites)
and directly render <McpInstallPanel serverCommand={serverCommand} /> where it
was used, or change SetupPanel signature to ({ serverCommand }: {
serverCommand?: ServerCommand }) => <McpInstallPanel
serverCommand={serverCommand} />; also remove unused props session,
mcpConfigPath, onCopy and clean up related unused imports handleCopySnippet and
getSnippetForSession. Ensure callers no longer compute mcpConfigPath for this
wrapper if you delete it.

In `@mock.html`:
- Around line 1-7: The mock.html file is a static Tailwind-based design mock
that should not live at the repo root; either move mock.html into a
documentation/design path (e.g., docs/design/browser-automation/mock.html) to
clarify its role and avoid accidental hosting, or keep it out of the commit and
instead add a link to the PR description; if you intentionally keep it at the
repo root, add a README entry (referencing mock.html) explaining it is a
non-runtime design mock and should not be included in build/distribution or
static hosting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 51b5f29f-56cf-4a28-8b01-78bf4b212385

📥 Commits

Reviewing files that changed from the base of the PR and between 1a98f6c and b890e94.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/BrowserAutomationList/BrowserAutomationList.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/McpInstallPanel/McpInstallPanel.tsx
  • mock.html

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b890e94bdc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- WorkspaceBindingsSummary を現在 pane の workspaceId で絞り込み。BrowserAutomationList と数値が一致するように
- stale binding (session が live set から消えた状態) でも Disconnect を出せるよう PaneIdentityCard に hasBinding を追加。"Session ended" ラベルと専用案内文を表示
- shortenPaneLabel helper を追加し URL 形式の pane 名を host+短縮パスに圧縮
  - ReadyPanel DetailItem "Pane"/"Expected"、SessionCard Reassign pill、footer の reassign 文、PaneIdentityCard に適用
  - 全 display 箇所で break-words/title 属性を添え、ツールチップで full 値を残す
- BrowserAutomationList の機能を SessionConnectModal に "Workspace" タブとして取り込み。別モーダル起動を廃し、Sessions/Workspace/Permissions の3タブ構成に
- Summary bar の "Open all panes view →" はタブ切替に変更し、Workspace タブ選択時は表示しない
- Permissions タブを sticky header/footer + scrollable middle に再構成し、トグル行が多い時も Save/Activate が常時見える
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Only repository collaborators, contributors, or members can run CodeRabbit commands.

- DialogContent に h=min(840px,85vh) + flex-col を明示し、各タブ content を flex-1 min-h-0 で埋めることで、Sessions/Workspace/Permissions 間でモーダル外形が変動しないように
- 各タブ個別の min-h/max-h 指定を削除
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx (1)

410-422: 新規 props 形状は interface に切り出してください。

Line 410-422、Line 482-496、Line 586-594 の新規コンポーネント props が inline object type になっています。既存の SessionConnectModalProps と同様に interface に寄せると、再利用や差分追跡がしやすくなります。

♻️ 修正例
+interface WorkspaceBindingsSummaryProps {
+	sessions: AutomationSession[];
+	bindingsByPane: Record<string, string>;
+	workspaceId: string | null;
+	onOpenAllPanes: () => void;
+	activeTab: "sessions" | "workspace" | "permissions";
+}
+
 function WorkspaceBindingsSummary({
 	sessions,
 	bindingsByPane,
 	workspaceId,
 	onOpenAllPanes,
 	activeTab,
-}: {
-	sessions: AutomationSession[];
-	bindingsByPane: Record<string, string>;
-	workspaceId: string | null;
-	onOpenAllPanes: () => void;
-	activeTab: "sessions" | "workspace" | "permissions";
-}) {
+}: WorkspaceBindingsSummaryProps) {
+interface PaneIdentityCardProps {
+	paneName: string;
+	paneUrl: string;
+	currentSession: AutomationSession | null;
+	hasBinding: boolean;
+	onDisconnect?: () => void;
+	disconnectPending?: boolean;
+}
+
 function PaneIdentityCard({
 	paneName,
 	paneUrl,
 	currentSession,
 	hasBinding,
 	onDisconnect,
 	disconnectPending,
-}: {
-	paneName: string;
-	paneUrl: string;
-	currentSession: AutomationSession | null;
-	hasBinding: boolean;
-	onDisconnect?: () => void;
-	disconnectPending?: boolean;
-}) {
+}: PaneIdentityCardProps) {
+interface WorkspacePanesTabProps {
+	workspaceId: string | null;
+	onClose: () => void;
+	onSwitchToSessions: () => void;
+}
+
 function WorkspacePanesTab({
 	workspaceId,
 	onClose,
 	onSwitchToSessions,
-}: {
-	workspaceId: string | null;
-	onClose: () => void;
-	onSwitchToSessions: () => void;
-}) {
+}: WorkspacePanesTabProps) {

As per coding guidelines, **/*.{ts,tsx}: Prefer interface for defining object shapes in TypeScript.

Also applies to: 482-496, 586-594

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`
around lines 410 - 422, Extract the inline prop object types into named
interfaces: create an interface WorkspaceBindingsSummaryProps for
WorkspaceBindingsSummary (replace the inline type block in the function
signature), and do the same for the other two components reported at lines
482-496 and 586-594 (give them clear names like <ComponentName>Props matching
each component), mirroring the style of the existing SessionConnectModalProps;
update the function/component signatures to use the new interfaces and export
them if they will be reused.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/CdpEndpointCard/CdpEndpointCard.tsx`:
- Around line 60-70: The commands chromeDevtoolsCmdClaude,
chromeDevtoolsCmdCodex, browserUseCmdClaude and browserUseCmdCodex interpolate
unescaped dynamic values (data.httpBase and data.browserUseConfigPath) which can
contain spaces or shell metacharacters; update the code to shell-quote/escape
these dynamic values before embedding them (e.g., a small helper like
quoteForShell that escapes single quotes and wraps the value in single quotes)
and use that helper when building those four command strings so the resulting
copy-paste commands are safe on macOS and other shells.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/PermissionsTab/PermissionsTab.tsx`:
- Around line 232-243: The Input for editing the preset name (controlled by
draftName, disabled by isBuiltin and updated via setDraftName/setDirty) and the
Switch controls in this component lack accessible names; add an explicit
association by giving the Label an htmlFor/id on the Input (or add a clear
aria-label on the Input) and add descriptive aria-label or aria-labelledby
attributes to each Switch instance so screen readers can identify their purpose;
ensure IDs are unique and the labels describe the control (e.g., "Preset name"
for the Input and specific permission names for each Switch).

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`:
- Around line 442-447: The current logic treats panes with a binding but no live
session as "unassigned"; instead detect and surface a separate "stale" /
"session ended" state. Update the counts and branching that use browserPanes,
bindingsByPane and liveSessionIds: compute stalePanes = browserPanes.filter(p =>
bindingsByPane[p.id] && !liveSessionIds.has(bindingsByPane[p.id])); compute
unassignedPanes = browserPanes.filter(p => !bindingsByPane[p.id]); compute
connectedPanes = browserPanes.filter(p => bindingsByPane[p.id] &&
liveSessionIds.has(bindingsByPane[p.id])); then replace uses of
connected/unassigned (and any labels like "Connect" shown in the
SessionConnectModal, and the code paths around needsSetup, PaneIdentityCard
rendering) so stale panes render the same "Session ended" state as
PaneIdentityCard instead of being shown as Unassigned/Connect.

---

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx`:
- Around line 410-422: Extract the inline prop object types into named
interfaces: create an interface WorkspaceBindingsSummaryProps for
WorkspaceBindingsSummary (replace the inline type block in the function
signature), and do the same for the other two components reported at lines
482-496 and 586-594 (give them clear names like <ComponentName>Props matching
each component), mirroring the style of the existing SessionConnectModalProps;
update the function/component signatures to use the new interfaces and export
them if they will be reused.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04ebacbc-6fd0-4bf6-9ef7-b40a20205454

📥 Commits

Reviewing files that changed from the base of the PR and between b890e94 and b7b7ba3.

📒 Files selected for processing (3)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/SessionConnectModal.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/CdpEndpointCard/CdpEndpointCard.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/BrowserPane/components/SessionConnectModal/components/PermissionsTab/PermissionsTab.tsx

MocA-Love and others added 6 commits April 22, 2026 05:09
…トカット

- CdpEndpointCard: Example setup コマンド群を "▾ Example setup" トグル配下に移動し、デフォルト collapsed に。一度設定すれば再表示が不要な情報なのでノイズを減らす
- summary bar: Workspace がタブになったので "Switch to Workspace view →" ボタンを廃止、代わりに "Show setup commands" ボタンを設置
- ボタン押下で Sessions タブに切替えつつ revealSetupToken を bump → CdpEndpointCard 側で Example setup セクションを自動展開
- Summary bar は permissions タブでも表示し、"Show setup commands" ボタンの位置を固定
- PermissionsTab / WorkspacePanesTab の min-h/max-h 固定値を撤去し h-full + min-h-0 に変更。DialogContent 固定高の flex 子要素として正しく伸縮するようになり、PermissionsTab のトグルリストが正しくスクロールし Save/Activate が常に可視化される
- CdpEndpointCard に PlaceholderSetupCommandsCard を追加。実際の WebSocket/HTTP base が確定する前でも setup コマンドのテンプレートを見せる (<port> / <BROWSER_USE_CONFIG_PATH> のプレースホルダ付き)
- SessionConnectModal 右カラムで setupRevealToken > 0 かつ選択セッションが未 attach の時にこのカードを表示
- ユーザー動線: pane が未 bind → summary bar "Show setup commands" → 右カラムに template カード → dismiss (×) で閉じる
タブを素早く閉じた際に openDocument の pending request が disposeWorkspace に
よって reject される競合は想定内のライフサイクルイベントであり、バグではない。
SessionDisposedError クラスを導入し、sentryMiddleware の既存フィルタパターンに
揃える形で除外することで Sentry のノイズを削減する。

Fixes SUPERSET-DESKTOP-K
Fixes SUPERSET-DESKTOP-M
- CdpEndpointCard: httpBase / browserUseConfigPath を POSIX shell single-quote して、スペースや特殊文字を含むパスでもコピーしたコマンドが壊れないように
- PermissionsTab: Label↔Input を htmlFor/id で接続、各 Switch に aria-label を付与
- WorkspacePanesTab: stale binding (binding は存在するが live session が落ちた状態) を amber ドット + "Session ended — rebind or disconnect" + "Rebind" ボタンで別状態として表示。PaneIdentityCard と同じ扱いに揃えた
- WorkspaceBindingsSummary: stale の件数を amber バッジで表示し unassigned から分離
@MocA-Love MocA-Love merged commit 38a022e into main Apr 21, 2026
14 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