upstream/2026-04-26 PR-F1: sidebar + low-risk 3 commits 取り込み#442
upstream/2026-04-26 PR-F1: sidebar + low-risk 3 commits 取り込み#442
Conversation
* Update web footer year * Use dynamic footer copyright years --------- Co-authored-by: Town Hall <codetown@Town-Hall.localdomain>
📝 Walkthrough概要ダッシュボードサイドバーのコンポーネント構造をリファクタリングし、セクション(グループ)の名前変更状態をコンテキストで一元管理するプロバイダーを導入しました。複数のコンポーネントを削除・再構成し、新しいアクションドロップダウンコンポーネントを追加しました。UIのラベルを「Section」から「group」に変更し、ワークスペースのアイコンを更新しました。 変更内容
コード査読の推定作業量🎯 3 (Moderate) | ⏱️ ~25 分 関連する可能性のあるPR
ウサギからのポエム
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsx (1)
30-38: 保留 rename がリクエスト先のセクション削除/未マウントで残留する可能性の確認。
requestSectionRename後にそのセクションが unmount された場合(例: 作成直後に別操作で削除された等)、pendingRenameSectionIdは対象が再マウントされるまで残り続けます。通常運用では問題ないと思われますが、削除パスやプロジェクト切替時に意図せず別タイミングで rename UI が走らないかは念のため動作確認をお勧めします。必要に応じてセクション一覧から消えた id を検出してクリアする補助フックを追加する余地もあります。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsx` around lines 30 - 38, requestSectionRename と clearPendingSectionRename がセットする pendingRenameSectionId が、対象セクションが削除またはアンマウントされたまま残る可能性があるため、DashboardSidebarSectionRenameContext 内でセクション一覧の変更を監視し、pendingRenameSectionId が現在のセクション一覧に存在しない場合に自動でクリアする処理を追加してください; 具体的にはコンテキストまたは同ファイル内で useEffect を追加して sections(またはセクション ID の配列)と pendingRenameSectionId を依存にし、pendingId が sections に含まれていなければ setPendingRenameSectionId(null) を呼んでクリアし、requestSectionRename / clearPendingSectionRename の既存ロジックはそのまま残すようにしてください。apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/SectionActionsMenuItems/SectionActionsMenuItems.tsx (1)
156-163: Trash アイコンの className をiconClassNameとcn()で合成すると重複を解消できる
iconClassName(L43) のロジックがここで再実装されています。@superset/ui/lib/utilsのcnを使えば DRY に書けます。♻️ 提案
- <LuTrash2 - className={ - kind === "context" - ? "size-4 mr-2 text-destructive" - : "size-4 text-destructive" - } - /> + <LuTrash2 className={cn(iconClassName, "text-destructive")} />別途
import { cn } from "@superset/ui/lib/utils";を追加してください。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/SectionActionsMenuItems/SectionActionsMenuItems.tsx` around lines 156 - 163, The Trash icon duplicates the className logic already captured by iconClassName (defined as iconClassName) — replace the inline conditional on LuTrash2 with cn(iconClassName, conditional-class) to dedupe and reuse the existing logic; add the import for cn from "@superset/ui/lib/utils", update the LuTrash2 usage to pass the composed className via cn(iconClassName, kind === "context" ? "mr-2" : ""), and remove the duplicated conditional string building so SectionActionsMenuItems uses the single source of truth (iconClassName) for icon styling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/SectionActionsMenuItems/SectionActionsMenuItems.tsx`:
- Around line 156-163: The Trash icon duplicates the className logic already
captured by iconClassName (defined as iconClassName) — replace the inline
conditional on LuTrash2 with cn(iconClassName, conditional-class) to dedupe and
reuse the existing logic; add the import for cn from "@superset/ui/lib/utils",
update the LuTrash2 usage to pass the composed className via cn(iconClassName,
kind === "context" ? "mr-2" : ""), and remove the duplicated conditional string
building so SectionActionsMenuItems uses the single source of truth
(iconClassName) for icon styling.
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsx`:
- Around line 30-38: requestSectionRename と clearPendingSectionRename がセットする
pendingRenameSectionId
が、対象セクションが削除またはアンマウントされたまま残る可能性があるため、DashboardSidebarSectionRenameContext
内でセクション一覧の変更を監視し、pendingRenameSectionId が現在のセクション一覧に存在しない場合に自動でクリアする処理を追加してください;
具体的にはコンテキストまたは同ファイル内で useEffect を追加して sections(またはセクション ID の配列)と
pendingRenameSectionId を依存にし、pendingId が sections に含まれていなければ
setPendingRenameSectionId(null) を呼んでクリアし、requestSectionRename /
clearPendingSectionRename の既存ロジックはそのまま残すようにしてください。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d0829194-1c07-4adc-a35d-498bf41ab4a2
📒 Files selected for processing (24)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/DashboardSidebar.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarProjectSection/components/DashboardSidebarProjectContextMenu/DashboardSidebarProjectContextMenu.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarProjectSection/hooks/useDashboardSidebarProjectSectionActions/useDashboardSidebarProjectSectionActions.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/DashboardSidebarSection.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContent/DashboardSidebarSectionContent.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContent/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/DashboardSidebarSectionContextMenu.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/DashboardSidebarSectionActionsDropdown/DashboardSidebarSectionActionsDropdown.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/DashboardSidebarSectionActionsDropdown/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/SectionActionsMenuItems/SectionActionsMenuItems.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/components/SectionActionsMenuItems/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContextMenu/types.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionHeader/DashboardSidebarSectionHeader.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceContextMenu/DashboardSidebarWorkspaceContextMenu.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceIcon/DashboardSidebarWorkspaceIcon.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/SortableSectionHeader/SortableSectionHeader.tsxapps/desktop/src/renderer/routes/_authenticated/hooks/useDashboardSidebarState/useDashboardSidebarState.tsapps/web/src/app/(dashboard-legacy)/components/Footer/Footer.tsxpackages/email/src/components/layout/StandardLayout/components/Footer/Footer.tsx
💤 Files with no reviewable changes (4)
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContent/index.ts
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/index.ts
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/DashboardSidebarSection.tsx
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/components/DashboardSidebarSectionContent/DashboardSidebarSectionContent.tsx
3 PR (#442, #443, #444) で取り込み済みの 9 commits を git 履歴上もマージ済みに記録する。 内容差分は無し (merge -s ours)。 取り込み内容: - 6b96acd Improve sidebar group management UX (superset-sh#3745) - a4079e7 Update dashboard sidebar workspace icons (superset-sh#3755) - d3753d0 [codex] Use dynamic footer copyright years (superset-sh#3754) - ce606be Handle browser passthrough during v2 resize (superset-sh#3744) - b1e1eb7 Refactor v2 workspace page (superset-sh#3747) - 8693869 [codex] move v2 toggle to experimental settings (superset-sh#3748) - ef3f381 Revert "fix(desktop): refit v2 terminal after font settle (superset-sh#3742)" (superset-sh#3750) - 手動移植 (vibrancy patch 維持) - 25b2d52 Show terminal sessions from all workspaces in dropdown (superset-sh#3751) - 62737db fix v1 terminal resize repaint (superset-sh#3756)
Summary
upstream (superset-sh/superset) の追加コミットを取り込む PR-F1。本バッチ (PR-F) では 9 コミットを 3 PR に分割して取り込む方針で、本 PR は sidebar 系 + 低リスク 3 件 をまとめる。base は
main、後続 PR-F2 (v2 workspace/browser)・PR-F3 (terminal) は本 PR の上に積み上げる。取り込み内容
6b96acd2aDashboardSidebarSectionRenameProviderによる作成直後 inline rename / 上位レイン (ungrouped + group header) の deterministic reindexing による tabOrder 安定化。a4079e7edRxDot、remote は TablerTbCloud/TbCloudOffに置換。PR / workspace state の icon 優先順位は維持。d3753d07anew Date().getFullYear()化。Fork 側のコンフリクト解決
useDashboardSidebarWorkspaceItemActions.ts(6b96acd2a)import セクションで衝突。
getDeleteFocusTargetWorkspaceId/getFlattenedV2WorkspaceIds/navigateToV2Workspaceを使った独自の「workspace 削除後フォーカス遷移」実装。handleDeleted内でgetDeleteFocusTargetWorkspaceId(getFlattenedV2WorkspaceIds(collections), workspaceId)→navigateToV2Workspace(focusTargetId, navigate)の流れで動作。useNavigateAwayFromWorkspaceフックに集約し、新規useDashboardSidebarSectionRenameでrequestSectionRenameを提供。handleCreateSection末尾でrequestSectionRename(sectionId)を呼ぶ実装。統合方針: fork 独自の delete navigation 実装 (
getDeleteFocusTargetWorkspaceId系) を維持しつつ、upstream のrequestSectionRename機能だけ追加。useNavigateAwayFromWorkspaceの import はこのファイルでは使われないため取り込まない (他ファイルで利用)。その他の auto-merge 成功領域 (
DashboardSidebar.tsx,useDashboardSidebarState.ts,DashboardSidebarSectionHeader.tsx,SortableSectionHeader.tsx,DashboardSidebarSectionContextMenu.tsx,useDashboardSidebarProjectSectionActions.ts,DashboardSidebarWorkspaceContextMenu.tsxほか) は手動介入なし。新規追加 (DashboardSidebarSectionRenameContext,SectionActionsMenuItems,DashboardSidebarSectionActionsDropdown,types.ts) と削除 (DashboardSidebarSection.tsxほか旧 section 系) は cherry-pick のとおり。a4079e7ed/d3753d07aは conflict なし。Fork 固有機能ヘルスチェック
/tmp/prF-baseline/fork-features.txtと一致)ansi_up/@vscode/ripgrep/@xyflow/react健在TERMINAL_OPTIONS/SUPERSET_WORKSPACE_NAME/moonshot-ai.kimi-code/MainWindowEffects/INCEPTION_AUTH_PROVIDER_ID/v1MigrationState/TiptapPromptEditor健在dmg.size="4g"維持、port-scanner win32 維持db=0035_add_automations/local-db=0072_service_status_definitions) 維持sortOrder/pinDefault(host-service git.ts) 健在検証
bun install: ✅ (5765 packages)bun run typecheck: ✅ (28/28 successful)bun run lint: ✅ (Biome: 4383 files, no fixes applied)bun run --filter @superset/desktop compile:app: ✅ (electron-vite build, 3m 5s, exit 0)Codex 事前調査
/tmp/prF-codex-preanalysis.mdで 9 commits 全件の cherry-pick 判定 / 衝突予測 / fork 固有機能リスク評価を実施。本 PR の 3 件はいずれも単体での conflict 規模が小さい (or 無し) ため、まとめて取り込み。後続バッチ
upstream/batch-2026-04-26-pr-f2): v2 workspace / browser 系 ([codex] Handle browser passthrough during v2 resize superset-sh/superset#3744ce606be84, [codex] Refactor v2 workspace page superset-sh/superset#3747b1e1eb742, [codex] move v2 toggle to experimental settings superset-sh/superset#3748869386993)upstream/batch-2026-04-26-pr-f3): terminal 系 (Revert "[codex] Refit v2 terminal after font settle" superset-sh/superset#3750ef3f38111手動移植, Show terminal sessions from all workspaces in dropdown superset-sh/superset#375125b2d52e6, [codex] fix v1 terminal resize repaint superset-sh/superset#375662737db31)Test plan
getDeleteFocusTargetWorkspaceId) が機能して次の workspace に遷移する (削除した workspace を見ていた場合)RxDot、remote cloud がTbCloud/ offline がTbCloudOffに変わっているSummary by CodeRabbit
リリースノート
新機能
UI改善
その他の改善