Skip to content

upstream/2026-04-26 PR-F3: terminal 3 commits 取り込み (#3742 revert 手動移植)#444

Merged
MocA-Love merged 3 commits intoupstream/batch-2026-04-26-pr-f2from
upstream/batch-2026-04-26-pr-f3
Apr 26, 2026
Merged

upstream/2026-04-26 PR-F3: terminal 3 commits 取り込み (#3742 revert 手動移植)#444
MocA-Love merged 3 commits intoupstream/batch-2026-04-26-pr-f2from
upstream/batch-2026-04-26-pr-f3

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

Summary

upstream (superset-sh/superset) の追加コミットを取り込む PR-F3 (本バッチ最終)。terminal 系 3 件をまとめる。base は PR-F2 (upstream/batch-2026-04-26-pr-f2)。マージ後 behind upstream/main = 0 に到達予定。

ユーザー方針: fork 固有のものは残しつつ upstream は積極取り込み。font-settle revert (ef3f38111) は WebGL vibrancy patch を残し、font-settle 機構のみ撤去 する手動移植。

取り込み内容

Commit upstream PR 概要 規模
4892e67a9 superset-sh#3750 PR superset-sh#3742 (font-settle 後 v2 terminal refit) を Revert。onRendererChange callback / clearTextureAtlas / LoadAddonsOptions / waitForTerminalFont / scheduleFontSettleRefit / _disposeFontSettle / _onResize / _clearTextureAtlas / _fontSettleToken を撤去。 3 files / +12 -129
a8f36fc5f superset-sh#3751 v2 terminal session dropdown を全 workspace 横断表示に拡張。paneData.workspaceId をペインデータに追加し、ensureSession / statPath / 外部エディタ / lifecycle cleanup が session の所属 workspace を尊重。terminal.listSessions から workspaceId 引数を撤去 (全件返す)。kill / remove の confirmation dialog 撤廃 (toast のみ)。 6 files / +316 -137
cccd88013 superset-sh#3756 v1 terminal cache の resize/repaint パスを修正。fitAndRefresh() ヘルパー集約、pinned-bottom / scrolled viewport state 維持、cols/rows 実変化時のみ backend resize 通知、ResizeObserver と live container を cache 内で管理。 1 file / +43 -31

Fork 側のコンフリクト解決

terminal-addons.ts (4892e67a9)

1 hunk のみ残った (auto-merge は LoadAddonsOptions / clearTextureAtlas / loadAddons(terminal) への引数縮小をすべて受け入れ済)。

  • HEAD: installRectangleRendererAlphaPatch(webglAddon) (FORK NOTE 付、WebGL vibrancy 透過パッチ) + options.onRendererChange?.() 呼び出し
  • upstream Revert: 両方なし

統合: fork 独自の installRectangleRendererAlphaPatch と FORK NOTE は維持options.onRendererChange?.() は撤去 (関数シグネチャから options も消えるため呼び出せない)。

TerminalPane.tsx (a8f36fc5f)

2 hunk を手動解決。

  • Hunk 1: HEAD が独自に追加した fileDragBehavior / fileOpenMode の useQuery 2 件を保持。HEAD の useOpenInExternalEditor(workspaceId) 呼び出しは下の hunk で sessionWorkspaceId 引数に置き換わるため削除。
  • Hunk 2: HEAD の fork legacy guard (paneData.terminalId ?? crypto.randomUUID()useMemo で安定化、旧 pane data 形式 {sessionKey,cwd,launchMode} 互換) を維持しつつ、upstream の sessionWorkspaceId = paneData.workspaceId ?? workspaceIduseOpenInExternalEditor(sessionWorkspaceId)追加統合。FORK NOTE で workspace 横断対応の意図と fallback 経路を明記。
// FORK NOTE: Guard against legacy pane data format {sessionKey, cwd, launchMode}
// saved in local DB before the terminalId migration.
const terminalId = useMemo(
    () => paneData.terminalId ?? crypto.randomUUID(),
    [paneData.terminalId],
);
// FORK NOTE: paneData.workspaceId fallback for cross-workspace terminal
// sessions (#3751). Older pane data without workspaceId falls back to
// the current workspace.
const sessionWorkspaceId = paneData.workspaceId ?? workspaceId;
const openInExternalEditor = useOpenInExternalEditor(sessionWorkspaceId);

その他 5 ファイル (TerminalSessionDropdown.tsx, usePaneRegistry.tsx, types.ts, useGlobalTerminalLifecycle.ts, host-service/.../terminal.ts) は auto-merge 成功。

v1-terminal-cache.ts (cccd88013)

3 hunk を手動解決。

  • Hunk 1 (CachedTerminal interface): HEAD の resizeDebounceTimer プロパティと upstream の container プロパティ。実装側で resizeDebounceTimer をセットするコードが存在せず dead field 化していたため撤去、upstream の container を採用。
  • Hunk 2 (getOrCreate 初期化): resizeDebounceTimer: null を撤去、container: null を採用。
  • Hunk 3 (ResizeObserver callback): HEAD の inline fit 実装を upstream の fitAndRefresh(entry) ヘルパー呼び出しに置き換え。upstream の fitAndRefresh は viewport state 復元と pinned-bottom 維持を内包しており、HEAD の挙動を上回る品質。
  • 追加クリーンアップ: attachToContainer 内の if (entry.resizeDebounceTimer) { clearTimeout(...); ... } ブロックも dead code として撤去。

これによりフォーク独自の (実装未完だった) debounce 機構を捨てて、upstream の正しい viewport / repaint 制御を採用。

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

  • 19 tRPC procedure: 全件健在
  • ansi_up / @vscode/ripgrep / @xyflow/react 健在
  • TERMINAL_OPTIONS (5) / SUPERSET_WORKSPACE_NAME (15) / moonshot-ai.kimi-code (5) / MainWindowEffects (3) / INCEPTION_AUTH_PROVIDER_ID (3) / v1MigrationState (2) / TiptapPromptEditor (6) 健在
  • desktop 1.5.10、dmg.size="4g" 維持、port-scanner win32 維持
  • drizzle idx (db=0035_add_automations / local-db=0072_service_status_definitions) 維持
  • listBranches sortOrder / pinDefault (host-service git.ts) 健在
  • Terminal vibrancy patch (installRectangleRendererAlphaPatch + FORK NOTE) 完全保持
  • Terminal legacy pane data guard (useMemo + crypto.randomUUID()) 健在

検証

  • bun install: ✅ (no changes)
  • bun run typecheck: ✅ (28/28 successful, 42s)
  • bun run lint: ✅ (Biome: 4398 files, no fixes applied)
  • bun run --filter @superset/desktop compile:app: ✅ (electron-vite build, 3m 6s, exit 0)

Codex 事前調査

/tmp/prF-codex-preanalysis.md で 9 commits 全件の cherry-pick 判定 / 衝突予測 / fork 固有機能リスク評価を実施。本 PR の ef3f38111 は事前調査でも「そのまま cherry-pick 危険、手動移植推奨」と判定された領域で、上記方針通り WebGL vibrancy patch を保護しつつ font-settle 機構だけ撤去。

upstream 取り込み状況

PR-F1 (#442) → PR-F2 (#443) → 本 PR-F3 を順番にマージで behind upstream/main = 0 に到達。最後に git merge -s ours <最後のupstream commit> で記録整合は別 commit で実施 (本 PR 範囲外、main マージ後)。

Test plan

v2 terminal (superset-sh#3750 revert / superset-sh#3751)

  • フォント変更後の v2 ターミナル: refit 機構が無くなっても表示が崩れないか確認 (cell metrics は xterm 側で再計算される)
  • vibrancy 有効時に v2 ターミナルで codex / Claude Code TUI の背景透過が維持される (installRectangleRendererAlphaPatch 健在性)
  • v2 ターミナル: 2 つの workspace を開き、A の dropdown に B のセッションが workspace 別グループで表示される
  • v2 ターミナル: B の detached セッションを A の dropdown から選ぶ → A のペインで attach
  • v2 ターミナル: B の attached セッションを A の dropdown から選ぶ → B に画面遷移してフォーカス
  • v2 ターミナル: kill / remove の confirmation dialog が出ず toast だけ出る
  • v2 ターミナル: 旧 pane data ({sessionKey,cwd,launchMode}) の workspace でも legacy guard が効いてクラッシュしない

v1 terminal (superset-sh#3756)

  • v1 ターミナル: ウィンドウリサイズ後に表示が正しく repaint される (空白行や stale 表示が出ない)
  • v1 ターミナル: スクロール途中でリサイズしても viewport 位置が維持される
  • v1 ターミナル: 末尾固定状態でリサイズすると末尾固定が維持される
  • v1 ターミナル: フォントサイズ変更後の re-fit が正常に走る
  • v1 ターミナル: cols/rows 変化なしの ResizeObserver 通知では backend resize が 発火しない

)

* Show terminal sessions from all workspaces in dropdown

Terminal pane now tracks the session's owning workspaceId in pane
data, so switching to a detached session in another workspace
preserves cleanup attribution. The session dropdown groups sessions
by workspace, and selecting an attached session from a different
workspace navigates to that workspace with the terminal focused.
Removed the confirmation dialogs around kill/remove since toast
feedback is sufficient.

* Invalidate terminal sessions even when kill fails
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9cbaee68-b4f2-4fca-bb3c-e88f1ec481a8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upstream/batch-2026-04-26-pr-f3

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 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 MocA-Love merged commit d0d58be into upstream/batch-2026-04-26-pr-f2 Apr 26, 2026
11 of 13 checks passed
MocA-Love added a commit that referenced this pull request Apr 26, 2026
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)
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