Skip to content

Move the Git window to the main window, and wrap the editor window as a tool window - #324

Closed
firesahc wants to merge 10 commits into
DetachHead:masterfrom
firesahc:master
Closed

Move the Git window to the main window, and wrap the editor window as a tool window#324
firesahc wants to merge 10 commits into
DetachHead:masterfrom
firesahc:master

Conversation

@firesahc

@firesahc firesahc commented Aug 17, 2026

Copy link
Copy Markdown

Changelog

Central VCS and File Editor hosting

  • Introduced a stable central Version Control surface managed by CentralVcsController.
  • Moved File Editor ToolWindow registration to the platform-level IDE module.
  • Added EditorHostCoordinator and EditorHostAdapter.
  • Ensured FileEditorManagerImpl.mainSplitters has a single stable parent inside the File Editor ToolWindow.
  • Removed competing reassignment of mainSplitters through ToolWindowPane.documentComponent.
  • Preserved editor ownership, disposal, split layout, navigation, and state persistence.
  • Added regression coverage for stable editor host ownership.

Central VCS layout isolation

  • Normalized persisted VCS state to a fixed central presentation.
  • Prevented VCS from participating in ordinary docking, floating, windowed, auto-hide, moving, SideStack, and layout conflict handling.
  • Prevented the central VCS decorator from writing its size into the shared bottom ToolWindow weight.
  • Prevented VCS activation and layout restoration from reading or applying unified Bottom weights.
  • Prevented VCS maximize and stretch operations from resizing unrelated Bottom ToolWindows.
  • Prevented hiding a Bottom ToolWindow with hideSide from deactivating the central VCS surface.
  • Preserved a stable central surface during VCS unavailability, unregistering, and project shutdown.

ToolWindow entry points

  • Added explicit support for product-owned stripe button visibility.
  • Ensured the File Editor ToolWindow remains available on the stripe.
  • Preserved explicit stripe settings across both legacy and new UI layouts.
  • Removed VCS movement and drag actions from the XNext toolbar.
  • Disabled moving VCS content into editor tabs.

VCS Log and Console

  • Continued the ToolWindow-only VCS Log presentation.
  • Removed the obsolete editor visibility predicate from VCS Log content creation.
  • Stopped collecting telemetry for editor-hosted Log UIs that are no longer produced.
  • Continued collecting telemetry for main and ToolWindow Log UIs.
  • Restored lazy VCS Console content creation.
  • Removed permanent Console provider registration.
  • Added regression coverage for closing and recreating Console content.

Release metadata

  • Updated the Rebased version to 1.1.13.2.

Validation and limitations

  • Added ToolWindow, VCS Console, and File Editor host regression tests.
  • git diff --check passes.
  • Full test execution is currently blocked by a local Bazel symlink-forest permission error involving jnidispatch.dll.
  • SVG/JCEF image-provider failures are not addressed in this change range.

中央 VCS 与 File Editor 宿主

  • 引入由 CentralVcsController 管理的稳定中央 Version Control Surface。
  • 将 File Editor ToolWindow 注册从 VCS 插件迁移到平台级 IDE 模块。
  • 新增 EditorHostCoordinatorEditorHostAdapter
  • 确保 FileEditorManagerImpl.mainSplitters 在 File Editor ToolWindow 内只有一个稳定父容器。
  • 删除通过 ToolWindowPane.documentComponent 竞争性重新挂载 mainSplitters 的逻辑。
  • 保留编辑器所有权、销毁、拆分布局、导航和状态持久化逻辑。
  • 新增编辑器宿主稳定性的回归测试。

中央 VCS 布局隔离

  • 将持久化的 VCS 状态统一归一化为固定中央呈现。
  • 阻止 VCS 参与普通停靠、浮动、窗口化、自动隐藏、移动、SideStack 和布局冲突处理。
  • 阻止中央 VCS decorator 将自身高度写入共享的 Bottom ToolWindow 高度。
  • 阻止激活 VCS 或恢复布局时读取、应用统一 Bottom 高度。
  • 阻止 VCS 的最大化和拉伸操作误修改其他 Bottom ToolWindow。
  • 防止使用 hideSide 隐藏 Bottom 窗口时连带停用中央 VCS Surface。
  • 在 VCS 不可用、注销和项目关闭期间保留稳定中央 Surface。

ToolWindow 入口

  • 增加产品自有 Stripe 按钮显式可见性的支持。
  • 确保 File Editor ToolWindow 始终可以通过 Stripe 访问。
  • 在旧 UI 和新 UI 中都保留显式 Stripe 配置。
  • 从 XNext 工具栏移除 VCS 的移动和拖动操作。
  • 禁止将 VCS 内容移动到编辑器标签中。

VCS Log 与 Console

  • 继续采用 ToolWindow-only 的 VCS Log 呈现方式。
  • 删除 VCS Log 内容创建中已经过时的编辑器可见性 predicate。
  • 停止收集当前不会再产生的编辑器内 Log UI 遥测数据。
  • 继续收集主界面和 ToolWindow 内 Log UI 的遥测数据。
  • 恢复 VCS Console 的懒加载内容创建。
  • 删除永久注册的 Console provider。
  • 新增 Console 内容关闭后重新创建的回归测试。

发行版本信息

  • 将 Rebased 版本更新为 1.1.13.2

验证与限制

  • 新增 ToolWindow、VCS Console 和 File Editor 宿主回归测试。
  • git diff --check 已通过。
  • 完整测试目前被本机 Bazel symlink forest 权限错误阻塞,具体涉及 jnidispatch.dll
  • SVG/JCEF 图片 Provider 闪退问题不属于本次更新范围。

Rebased keeps Version Control in a dedicated central host, so VCS Log tabs must no longer compete with the File Editor host.

Remove the obsolete VCS Log virtual-file and editor-provider path, migrate persisted editor tabs to the tool window on load, and normalize SHOW_IN_EDITOR to false. Keep tab restoration, actions, settings, and empty-editor shortcuts aligned with the tool-window content manager.
Keep Version Control registered for actions and shortcuts while routing its decorator through an idempotent CentralVcsHost. Normalize persisted state and ignore dock, float, move, auto-hide, and side-stack operations so the logical ToolWindow record cannot diverge from its central parent.

Expose the existing editor splitters as a non-closeable File Editor tool window without changing editor ownership or disposal. Add regression coverage for the locked VCS layout and keep other tool windows on their normal behavior.
Allow ToolWindow EP declarations to override both bundled-plugin defaults and persisted stripe visibility. This lets product-owned tool windows retain stable entry points across upgrades while leaving unspecified registrations on the existing behavior.

Cover both new and old UI registration paths, including a stored layout that previously hid the button.
File Editor is the route back to editor splitters when no files are open, so declare its stripe button explicitly instead of relying on bundled-plugin defaults.

Use the folded-document file type icon in both legacy and new UI icon sets, and cover the extension declaration to prevent the entry point from disappearing again.
@firesahc

Copy link
Copy Markdown
Author
PixPin_2026-08-18_00-58-26 PixPin_2026-08-18_00-58-40 PixPin_2026-08-18_00-59-33 PixPin_2026-08-18_00-59-55

The Log content is now hosted by the Version Control tool window, so the SHOW_IN_EDITOR setting no longer controls its availability predicate. Keep the setting and migration state for workspace compatibility.
Editor-hosted Log UIs are no longer produced by the current layout, leaving the editor tab telemetry path permanently empty. Continue collecting metrics for the main and tool-window Log UIs.
Create the VCS Console Content only when it is first shown, matching the current ChangesViewContentManager lifecycle. Remove the permanent provider registration and cover close-and-recreate behavior with a focused regression test.
@firesahc

firesahc commented Aug 17, 2026

Copy link
Copy Markdown
Author
PixPin_2026-08-18_03-49-39

Keep the editor splitters under one platform-owned File Editor host and install a stable central VCS surface. Remove competing document-component reassignment and isolate central VCS state from ordinary tool window sizing, layout restoration, and side-stack handling.
Keep the fixed central Version Control surface out of XNext move and drag actions and prevent its contents from being moved into editor tabs. Ordinary tool windows retain their existing actions.
@firesahc firesahc reopened this Aug 18, 2026

@DetachHead DetachHead left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

before i continue my review, can you please disclose how much of this PR was LLM generated?

displayText = "Android Studio Narwhal | 2025.1.1",
imagePath = "/studio-splash-screens/Narwhal-stable.png",
versionName = "2025.1.1.13",
versionName = "2025.1.1.13.2",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this is for android studio, which we don't touch in rebased

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I know, but I couldn't find exactly where to change the version number. I found this by searching for 1.1.13.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The version number isn't that important. If it's not needed, I can forcibly push the changes for modification.

Comment thread build.txt
@@ -1 +1 @@
262.SNAPSHOT No newline at end of file
263.SNAPSHOT No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this is the upstream build number, we dont touch this either

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ok

@firesahc

Copy link
Copy Markdown
Author

There's still a bug where an SVG tab crashes, but this isn’t a problem caused by this update.

  1. The root cause is that the JCEF dependency was only partially removed
    The current Images plugin descriptor has removed the JCEF dependency, but the old ImageFileEditorProvider still directly loads JBCefApp.
    So when opening an SVG, you get: NoClassDefFoundError: com/intellij/ui/jcef/JBCefApp
    This means the editor provider failed to create, not that the editor component was just hidden.

  2. The remote master has this issue too
    The remote master still uses the same old implementation:
    So from the current remote master perspective, this problem is an "existing issue on the remote." But it actually comes from Rebased's incomplete JCEF removal, not from the original IntelliJ behavior.

  3. Version 1.1.13 has already fixed it
    The 1.1.13 commit 4eb5737 changed things to:

  • The base Images plugin no longer directly references JCEF;
  • JCEF implementation is put into an optional images.jcef module;
  • Uses the SvgImageViewerProvider extension point;
  • Falls back to the normal image editor if JCEF is missing.
    So 1.1.13 doesn't crash on SVGs because it includes the proper module split, which the current master hasn't synchronized yet.

@firesahc

Copy link
Copy Markdown
Author

before i continue my review, can you please disclose how much of this PR was LLM generated?在我继续评审之前,能否透露一下这份PR中有多少是LLM生成的?

The implementation plan and specific levels were found by me, but the implementation details and some bug fixes were done by gpt-5.6-sol.

@DetachHead

Copy link
Copy Markdown
Owner

this project doesn't accept AI generated code, sorry. see https://github.com/DetachHead/rebased?tab=contributing-ov-file#ai-code-policy

@DetachHead DetachHead closed this Aug 18, 2026
@firesahc

firesahc commented Aug 18, 2026

Copy link
Copy Markdown
Author

Okay🥲, but you can install the release and try it out. I think from a user experience perspective, it's a really good idea.

https://github.com/firesahc/rebased/releases/tag/v1.1.13

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