Skip to content

upstream merge 2026-05-08 PR 5: v2 diff pane / file pane polish#459

Merged
MocA-Love merged 2 commits intomainfrom
upstream/batch-2026-05-pr5-v2-diff-pane
May 8, 2026
Merged

upstream merge 2026-05-08 PR 5: v2 diff pane / file pane polish#459
MocA-Love merged 2 commits intomainfrom
upstream/batch-2026-05-pr5-v2-diff-pane

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

@MocA-Love MocA-Love commented May 8, 2026

Summary

upstream 同期バッチ第 5 弾。v2 diff pane / file pane polish (2 commits)

進捗: PR1+2+3+4 完了、PR5 で 31 / 223 (4 まだ未マージ)。

取り込み内容

upstream PR SHA 概要
superset-sh#3899 68b60e4 v2 diff pane header / file path / unmodified-lines strip の polish (Copy contents → Copy path 置換 + DiffPaneHeaderExtras 切り出し + bg-muted/30 chrome)
superset-sh#3911 66ae5e2 diff file path を truncate + file pane に copy-path action

Fork 側のコンフリクト解決

Fork 固有機能ヘルスチェック

  • 19 tRPC githubExtended procedure 健在
  • terminal-host / aivis / todo-agent / vscode-shim 触らず
  • isSpreadsheetFile spreadsheet 早期 return 維持
  • migration max idx 変動なし

Test plan

  • sub-agent 委譲で全 conflict resolve (Codex/Claude が dual で確認)
  • bun run typecheck exit 0 (28/28 tasks)
  • bun run lint exit 0 (4456 files)
  • CI green
  • CodeRabbit review

次の PR

PR 6: CLI v1 / SDK / packages 大型バッチ

Summary by CodeRabbit

新機能

  • Diffペインに表示スタイル切り替え機能を追加(Unified/Split表示の選択可能)
  • ファイルヘッダーにパスコピーボタンを追加

改善

  • 空の状態の表示ロジックと UI を改善
  • Diff ビューアのテーマカラー統合を強化
  • ファイルエントリーのプレースホルダー UI を最適化
  • ヘッダーレイアウトとスタイリングを調整

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack

📝 Walkthrough

ウォークスルー

このPRでは、Diffビューアペインの UI を大幅に改善しており、diff スタイル制御を専用コンポーネント DiffPaneHeaderExtras に抽出し、ファイルヘッダーにパスコピー機能を追加し、ターミナルテーマを統合してスタイリングを改善しています。

変更内容

Diff ビューアー UI リファクタリング

レイヤー / ファイル(s) 概要
Git 装飾定数
apps/desktop/src/renderer/.../utils/gitDecorationColors/*
GIT_STAT_TEXT_CLASSES を追加し、git の追加・削除・修正状態をライト/ダークモード対応の Tailwind テキストカラークラスにマッピング。
Diff ペインヘッダーコントロール
apps/desktop/src/renderer/.../components/DiffPane/components/DiffPaneHeaderExtras/*
新しい DiffPaneHeaderExtras コンポーネントを導入し、統合/分割 diff ビュー切り替えボタンをツールチップと共に表示。
Diff ファイルヘッダー改善
apps/desktop/src/renderer/.../components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx
パスコピー機能を追加、ファイル内容コピーボタンを削除、パスをディレクトリとベースネームに分割、アイコンを更新。
WorkspaceDiff テーマ統合
apps/desktop/src/renderer/.../components/DiffPane/components/WorkspaceDiff/WorkspaceDiff.tsx
ターミナルテーマを統合し、フォント設定クエリを useQuery に更新、diff 背景色と行区切りスタイルの CSS カスタマイズを強化。
Diff ペインレイアウト
apps/desktop/src/renderer/.../components/DiffPane/DiffPane.tsx, apps/desktop/src/renderer/.../components/DiffFileEntry/DiffFileEntry.tsx
空状態のレンダリングを早期リターンに変更、Virtualizer のコンテンツ間隔を調整、プレースホルダーボタンを Button コンポーネントに統一。
再利用可能コンポーネント
apps/desktop/src/renderer/.../components/StatusIndicator/StatusIndicator.tsx, apps/desktop/src/renderer/.../components/FilePane/components/FilePaneHeaderExtras/FilePaneHeaderExtras.tsx
StatusIndicator にオプショナルな iconClassName プロップを追加、FilePaneHeaderExtras にパスコピーボタンを追加。
ペーンレジストリ統合
apps/desktop/src/renderer/.../hooks/usePaneRegistry/usePaneRegistry.tsx
DiffViewModeToggle を削除し、DiffPaneHeaderExtras を使用するよう UI 配線を更新。

推定コードレビュー労力

🎯 3 (中程度) | ⏱️ ~25 分

ポエム

🐇 Diff ビューがきらめいたよ
パスをコピーして、スタイル切り替え
テーマはターミナルから借りてきた
ヘッダーはスマート、ボタンは統一
レイアウトはきれいに、すっきり進化 ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive 説明は提供されたテンプレート構造に完全には従っていませんが、代わりに詳細な技術的内容(取り込み内容、コンフリクト解決、テスト計画)が提供されています。 公式テンプレート(Description、Related Issues、Type of Change、Testing、Screenshots、Additional Notes)に合わせてPR説明を再構成することをお勧めします。
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは主な変更内容(v2 diff pane / file pane のポーランド/改善)を明確に要約し、具体的で関連性があります。
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upstream/batch-2026-05-pr5-v2-diff-pane

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.

Kitenite added 2 commits May 8, 2026 14:06
…-lines strip (superset-sh#3899)

- Match ChangesHeader chrome on each file header (border-y + bg-muted/30)
- Split filename into dir + basename so the basename always stays visible
  on narrow widths instead of being truncated behind ellipsis
- Add a Copy path button next to the filename, drop Copy file contents
- Move StatusIndicator next to the +/- diff stats
- Blend diff body with the terminal pane surface color
- Flatten the "N unmodified lines" expander flush to the pane edges
  (kills pierre/diffs' wrapper / content / expand-button rounding +
  inline gaps for both line-info and line-info-basic separators)
- Standardize icon-button padding, drop the inline DiffViewModeToggle
  in favour of a co-located DiffPaneHeaderExtras component
…e pane (superset-sh#3911)

- DiffFileHeader: basename now also truncates as a fallback so root-level
  files (no directory prefix) no longer overlap the right-side actions.
  Directory still shrinks first via shrink-[1000].
- FilePaneHeaderExtras: add a Copy path button alongside Open in editor,
  matching the diff pane.
@MocA-Love MocA-Love force-pushed the upstream/batch-2026-05-pr5-v2-diff-pane branch from 66ae5e2 to 252714d Compare May 8, 2026 05:07
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.

🧹 Nitpick comments (2)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/StatusIndicator/StatusIndicator.tsx (1)

51-61: ⚡ Quick win

statusstring ではなく FileStatus にして unsafe cast をなくしてください。

status as FileStatus が2箇所にあり、呼び出し側の不正値を型で防げていません。props型を絞るだけで安全性が上がります。

✂️ 提案差分
 export function StatusIndicator({
 	status,
 	className,
 	iconClassName = "w-3 h-3",
 }: {
-	status: string;
+	status: FileStatus;
 	className?: string;
 	iconClassName?: string;
 }) {
 	return (
 		<span
-			className={`flex shrink-0 items-center ${STATUS_COLORS[status as FileStatus] ?? ""} ${className ?? ""}`}
+			className={`flex shrink-0 items-center ${STATUS_COLORS[status] ?? ""} ${className ?? ""}`}
 		>
-			{getStatusIcon(status as FileStatus, iconClassName)}
+			{getStatusIcon(status, iconClassName)}
 		</span>
 	);
 }

As per coding guidelines "Maintain type safety as an agent rule: avoid any unless necessary. This applies to all TypeScript code".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/StatusIndicator/StatusIndicator.tsx
around lines 51 - 61, Change the StatusIndicator props so that status is typed
as FileStatus instead of string and remove the unsafe casts; update the
component signature that currently defines status: string to status: FileStatus,
ensure FileStatus is imported where StatusIndicator is defined, and then call
STATUS_COLORS[status] and getStatusIcon(status, iconClassName) without using "as
FileStatus" so the type system prevents invalid values (affects the
StatusIndicator function, STATUS_COLORS usage, and getStatusIcon invocation).
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx (1)

5-5: ⚡ Quick win

lucide-react に統一することを検討してください(react-icons/lu との混在)

同じファイル内で lucide-react(Line 3: ChevronDown, ChevronRight, Eye, EyeOff)と react-icons/lu の両方から Lucide アイコンを使用しています。LuCheck / LuCopy / LuUndo2 はいずれも lucide-reactCheck / Copy / Undo2 として存在するため、二重依存を排除できます。

♻️ 修正提案
-import { ChevronDown, ChevronRight, Eye, EyeOff } from "lucide-react";
+import { Check, ChevronDown, ChevronRight, Copy, Eye, EyeOff, Undo2 } from "lucide-react";
-import { LuCheck, LuCopy, LuUndo2 } from "react-icons/lu";
-						{copied ? (
-							<LuCheck className="size-3.5" />
-						) : (
-							<LuCopy className="size-3.5" />
-						)}
+						{copied ? (
+							<Check className="size-3.5" />
+						) : (
+							<Copy className="size-3.5" />
+						)}
-							<LuUndo2 className="size-3.5" />
+							<Undo2 className="size-3.5" />

Also applies to: 99-117, 181-184

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx
at line 5, The file mixes lucide-react icons (ChevronDown, ChevronRight, Eye,
EyeOff) with react-icons/lu imports (LuCheck, LuCopy, LuUndo2); replace the
react-icons import with lucide-react equivalents by removing `import { LuCheck,
LuCopy, LuUndo2 } from "react-icons/lu"` and instead import `Check`, `Copy`,
`Undo2` from `lucide-react`, then update all usages of LuCheck/LuCopy/LuUndo2 to
Check/Copy/Undo2 (including the other occurrences noted around lines ~99-117 and
~181-184) so the file uses only lucide-react and the duplicate dependency is
eliminated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/StatusIndicator/StatusIndicator.tsx:
- Around line 51-61: Change the StatusIndicator props so that status is typed as
FileStatus instead of string and remove the unsafe casts; update the component
signature that currently defines status: string to status: FileStatus, ensure
FileStatus is imported where StatusIndicator is defined, and then call
STATUS_COLORS[status] and getStatusIcon(status, iconClassName) without using "as
FileStatus" so the type system prevents invalid values (affects the
StatusIndicator function, STATUS_COLORS usage, and getStatusIcon invocation).

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx:
- Line 5: The file mixes lucide-react icons (ChevronDown, ChevronRight, Eye,
EyeOff) with react-icons/lu imports (LuCheck, LuCopy, LuUndo2); replace the
react-icons import with lucide-react equivalents by removing `import { LuCheck,
LuCopy, LuUndo2 } from "react-icons/lu"` and instead import `Check`, `Copy`,
`Undo2` from `lucide-react`, then update all usages of LuCheck/LuCopy/LuUndo2 to
Check/Copy/Undo2 (including the other occurrences noted around lines ~99-117 and
~181-184) so the file uses only lucide-react and the duplicate dependency is
eliminated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b8450f0d-03c8-4a4a-a948-a3050a29226e

📥 Commits

Reviewing files that changed from the base of the PR and between 78023f6 and 252714d.

📒 Files selected for processing (11)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/StatusIndicator/StatusIndicator.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/DiffPane.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileEntry/DiffFileEntry.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffPaneHeaderExtras/DiffPaneHeaderExtras.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffPaneHeaderExtras/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/WorkspaceDiff/WorkspaceDiff.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/utils/gitDecorationColors/gitDecorationColors.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/utils/gitDecorationColors/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/FilePane/components/FilePaneHeaderExtras/FilePaneHeaderExtras.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/usePaneRegistry.tsx

@MocA-Love MocA-Love merged commit 558595b into main May 8, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

MocA-Love pushed a commit that referenced this pull request May 8, 2026
Recorded as integrated via -s ours after batch PRs #455-#464.

Taken via individual PRs:
- PR  1 (#455): v2 polish 前半 safe set (9 commits)
- PR  2 (#456): v2/host-service polish 中盤 (12 commits)
- PR  3 (#457): sidebar polish + jwt API (5 commits)
- PR  4 (#458): host-service tRPC retry/cache/timeout (3 commits)
- PR  5 (#459): v2 diff pane / file pane polish (2 commits)
- PR  7 (#462): host-service v2 canonical workspace.create + attachment store (PR1 superset-sh#3893 + PR2 superset-sh#3916)
- PR 11 (#463): agents API + onboarding (7 commits + 1 cleanup)
- PR 12 (#464): v1→v2 import flow rewrite (11 commits + 2 follow-ups)
- PR 13 (#460): host-service shell env probe + typo (2 commits)
- PR 16 (#461): marketplace 19 themes (1 commit)

Skipped / deferred (recorded as integrated for behind=0):
- PR  6: CLI v1 launch (superset-sh#3898 + 30+ CLI/SDK followups) — defer to dedicated migration
- PR  9: v2 PR3 (superset-sh#3940) + revert (superset-sh#4017) — net-zero pair
- PR 10: pty-daemon (superset-sh#3896, superset-sh#3971, superset-sh#4054) — fork keeps its terminal-host
- PR 14: Slack MCP-v2 (superset-sh#4197, superset-sh#4208) — depends on mcp-v2/sdk divergence
- PR 15: onboarding remaining (superset-sh#4115, superset-sh#4125, superset-sh#4214, superset-sh#4213, superset-sh#4222, superset-sh#4225) — depends on fork's deleted setup pages

Behind: 0 after this merge.
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.

2 participants