Conversation
…3415) * Fix code TUI copy * Handle more keyboard shortcuts * fix(desktop): match VS Code terminal clipboard handling
…perset-sh#3421) The hover icon swap was silently broken because isOpen was read via a one-shot collections.get() call instead of a live query, so the component never re-rendered when rightSidebarOpen changed.
…ditor) (superset-sh#3418) react-hotkeys-hook skips events whose target is contentEditable unless enableOnContentEditable is set. CodeMirror 6 renders its editor as a contenteditable element, so app chords like cmd+w stopped firing when focus was in the v1 file editor — meta+w never reached the CLOSE_TERMINAL handler that closes the focused pane. Default enableOnContentEditable: true in useHotkey, mirroring the existing enableOnFormTags default. Callers can still opt out via options.
…rs selectable (superset-sh#3432) Global `user-select: none` on body blocks copying error text on full-page error states. Matches the pattern already used by v1 WorkspaceInitializingView.
📝 WalkthroughWalkthrough複数のファイルでキーボードショートカットと入力インタラクションが強化されました。ターミナルコンポーネントに選択全部およびクリップボード操作の短縮キー処理が追加され、スタイリングでテキスト選択機能が有効化され、ホットキーリスナーはコンテンツ編集可能要素での動作が改善されました。 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Terminal as Terminal Handler
participant Interceptor as Keyboard Interceptor
participant XTerm
participant Host as Host Clipboard
User->>Terminal: keydown イベント発生
Terminal->>Interceptor: キーボードイベント渡す
Interceptor->>Interceptor: shouldSelectAllShortcut()で判定<br/>(Cmd+A on macOS)
alt 選択全部コマンド
Interceptor->>XTerm: selectAll() 実行
Interceptor-->>Terminal: 処理完了
else shouldBubbleClipboardShortcut()で判定
Interceptor->>Interceptor: プラットフォーム固有の<br/>クリップボード操作か判定
alt ホストが処理すべき
Interceptor->>Host: false を返すで<br/>ホストに処理譲渡
Host->>Host: コピー/ペースト実行
else XTermが処理
Interceptor->>XTerm: デフォルト処理へ進む
end
else その他のキー
Interceptor->>XTerm: 既存の処理ロジック実行
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/clipboardShortcuts.test.ts (1)
2-24:makeEventの戻り型を明示して型追従性を上げるのを推奨します。
ClipboardShortcutEventに将来プロパティ追加が入った時、テスト側の追従漏れをコンパイル時に検知しやすくなります。♻️ 提案差分
import { describe, expect, it } from "bun:test"; import { shouldBubbleClipboardShortcut, shouldSelectAllShortcut, + type ClipboardShortcutEvent, } from "./clipboardShortcuts"; function makeEvent( overrides: Partial<{ code: string; metaKey: boolean; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; }>, -) { +): ClipboardShortcutEvent { return { code: "KeyC", metaKey: false, ctrlKey: false, altKey: false, shiftKey: false, ...overrides, }; }🤖 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/Terminal/clipboardShortcuts.test.ts` around lines 2 - 24, Annotate makeEvent with the explicit return type ClipboardShortcutEvent and make its overrides parameter Partial<ClipboardShortcutEvent> so the test will fail to compile if the event shape drifts; import or reference ClipboardShortcutEvent from the module that defines it (e.g., the clipboardShortcuts module), and if that type is not exported, export it there (or create a local type alias) before using it in makeEvent; update the function signature to return ClipboardShortcutEvent and adjust the overrides type accordingly.
🤖 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/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/clipboardShortcuts.test.ts`:
- Around line 2-24: Annotate makeEvent with the explicit return type
ClipboardShortcutEvent and make its overrides parameter
Partial<ClipboardShortcutEvent> so the test will fail to compile if the event
shape drifts; import or reference ClipboardShortcutEvent from the module that
defines it (e.g., the clipboardShortcuts module), and if that type is not
exported, export it there (or create a local type alias) before using it in
makeEvent; update the function signature to return ClipboardShortcutEvent and
adjust the overrides type accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ee47510b-ea09-4d2f-8405-85f7a2539d63
📒 Files selected for processing (7)
apps/desktop/src/renderer/components/UpdateRequiredPage/UpdateRequiredPage.tsxapps/desktop/src/renderer/hotkeys/hooks/useHotkey/useHotkey.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/RightSidebarToggle/RightSidebarToggle.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/pending/$pendingId/page.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/clipboardShortcuts.test.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/clipboardShortcuts.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts
All 9 upstream commits have been individually cherry-picked via PR#159~#163: | Upstream | Our PR | Description | |---|---|---| | d656b7e (superset-sh#3415) | #159 (PR#1) | terminal clipboard handling | | 31fcf19 (superset-sh#3416) | #162 (PR#4) | v1 split pane startup sizing fix | | 039edf2 (superset-sh#3403) | #161 (PR#3) | Cmd+Alt+Arrow spatial pane focus | | b18a00c (superset-sh#3421) | #159 (PR#1) | v2 right sidebar toggle reactive | | 3dd1de2 (superset-sh#3420) | #161 (PR#3) | v2 diff viewer + tab title resolution | | b42a114 (superset-sh#3418) | #159 (PR#1) | CodeMirror hotkey enablement | | c925f4d (superset-sh#3422) | #160 (PR#2) | unbound defaults + restore prev/next tab/workspace | | bb12c09 (superset-sh#3419) | #163 (PR#5) | version bump 1.5.3 | | 47efa73 (superset-sh#3432) | #159 (PR#1) | pending/update-required error selectable | Fork-specific features preserved: - auto-updater (IS_FORK, GitHub Releases API) - QuitMode/cleanupMainWindowResources lifecycle - GitHubSyncService, SpreadsheetViewer - BROWSER_RELOAD / BROWSER_HARD_RELOAD / SEARCH_IN_FILES hotkeys - HotkeyCategory "Browser" - v1 deep-link navigation (useSearch/WorkspaceSearchParams) - v1 tRPC-based PREV/NEXT_WORKSPACE handlers - v1 CLOSE_TERMINAL/CLOSE_TAB hotkey handlers - v2 extra state (rightSidebarOpenViewWidth, showPresetsBar)
Upstream Merge PR#1 - 安全パッチ取り込み
upstream (superset-sh/superset) から安全に取り込める4コミットを cherry-pick します。
取り込むコミット
改善内容の詳細
1. ターミナルクリップボード (superset-sh#3415)
何が問題だったか:
どう直したか:
2. v2 右サイドバートグルの reactivity (superset-sh#3421)
何が問題だったか:
どう直したか:
3. CodeMirror 内でのホットキー発火 (superset-sh#3418)
何が問題だったか:
どう直したか:
4. エラーテキストを選択可能に (superset-sh#3432)
何が問題だったか:
どう直したか:
フォーク影響評価
テスト計画