Blur never actually applied. GPUI's Windows backend drives SetWindowCompositionAttribute's ACCENT_POLICY, not the DWM system backdrop: Transparent maps to ACCENT_ENABLE_TRANSPARENTGRADIENT (transparent, no blur) and Blurred to ACCENT_ENABLE_ACRYLICBLURBEHIND. wallpaper.rs pinned the appearance to Transparent and relied on DWMWA_SYSTEMBACKDROP_TYPE, which the accent policy overrides — so the window went see-through without a trace of blur. Pick the appearance from the setting, drop the DWM call so a single mechanism owns compositing, and write Opaque once before the target appearance: Win11's DWM caches the acrylic layer, and without tearing the accent policy down first, turning blur off left the blur on screen. Sidebar tab rows used w_full inside the overflow-hidden scroll list, so the percentage width never resolved and rows fell back to shrink-to-fit — row width tracked the file name, and rows carrying an icon shifted their status slot right by one icon. Use an explicit pixel width derived from the sidebar width, clip overflow, and derive the label budget from that same number so truncation cannot push the row wider again. Add "import terminal directory" as the pinned first row of the default-shell dropdown, mirroring the old shell's Display::import_terminal_directory (scan, upsert, save) with the blocking IO on a background task. Imported profiles now appear in that dropdown too, so an import has a visible result. Restore the Alacritty attribution dropped when the acknowledgements were rewritten for GPUI: the terminal core's provenance in the tech-stack table, a paragraph beside the GPUI credit, and the derivation notice pointing at THIRD-PARTY-NOTICES. Document the Markdown rendering capabilities, and record the two gpui-component input patches in the workspace manifest.
161 lines
8.9 KiB
TOML
161 lines
8.9 KiB
TOML
[workspace]
|
||
members = [
|
||
"nebula_app",
|
||
"nebula_terminal",
|
||
"nebula_config",
|
||
"nebula_config_derive",
|
||
"nebula-completions",
|
||
"nebula_hook",
|
||
"nebula_gpui",
|
||
"nebula_settings",
|
||
"nebula_split",
|
||
]
|
||
resolver = "2"
|
||
|
||
[workspace.package]
|
||
edition = "2024"
|
||
rust-version = "1.85.0"
|
||
|
||
[profile.release]
|
||
# fat LTO 会用顶层 opt-level 重跑全程序 codegen,把下面的热路径 O3 钉子
|
||
# 冲掉;thin + codegen-units=1 保住钉子,体积差距只有个位数百分点。
|
||
lto = "thin"
|
||
debug = 0
|
||
strip = "symbols"
|
||
incremental = false
|
||
codegen-units = 1
|
||
# 发布包体积预算:安装包 <30MB。冷代码(协议栈、序列化、CLI、SSH 等
|
||
# 几百个依赖)按体积编译;渲染/塑形/布局/VT 热路径在下面逐个钉回 O3,
|
||
# 手感不受影响。改动这里必须重新跑 scripts/tests/package-release.tests.ps1。
|
||
opt-level = "s"
|
||
|
||
[profile.release.package]
|
||
resvg = { opt-level = 3 }
|
||
rustybuzz = { opt-level = 3 }
|
||
taffy = { opt-level = 3 }
|
||
ttf-parser = { opt-level = 3 }
|
||
smol = { opt-level = 3 }
|
||
gpui = { opt-level = 3 }
|
||
gpui-component = { opt-level = 3 }
|
||
nebula_terminal = { opt-level = 3 }
|
||
nebula = { opt-level = 3 }
|
||
image = { opt-level = 3 }
|
||
|
||
# Debug 壳仍要承担真实终端负载:GPUI 布局/字体塑形和 VT 解析若以
|
||
# opt-level 0 运行,窗口拖拽与持续输入都会出现发布版没有的延迟。
|
||
# 外部依赖统一 O2(Zed 同款策略:图形栈/图像解码/Unicode 处理散布在
|
||
# 几十个 crate 里,逐个点名永远漏),少数塑形/布局热点保持 O3;
|
||
# workspace 成员不受 "*" 影响,主 crate 继续增量 debug。
|
||
[profile.dev]
|
||
codegen-units = 16
|
||
debug = "limited"
|
||
split-debuginfo = "unpacked"
|
||
|
||
[profile.dev.package]
|
||
"*" = { opt-level = 2 }
|
||
resvg = { opt-level = 3 }
|
||
rustybuzz = { opt-level = 3 }
|
||
taffy = { opt-level = 3 }
|
||
ttf-parser = { opt-level = 3 }
|
||
smol = { opt-level = 3 }
|
||
gpui = { opt-level = 3 }
|
||
gpui_macros = { opt-level = 3 }
|
||
nebula_terminal = { opt-level = 3 }
|
||
|
||
[workspace.dependencies]
|
||
mlua = { version = "0.11.4", features = ["lua54", "vendored", "serialize", "send"] }
|
||
serde_path_to_error = "0.1.20"
|
||
toml = "0.9.11"
|
||
toml_edit = "0.24.0"
|
||
|
||
# TODO: Drop this pin and return to the crates.io release once the fix ships there.
|
||
[patch.crates-io]
|
||
x11-clipboard = { git = "https://github.com/quininer/x11-clipboard.git", rev = "19ab2163cf0bd0db607e827a5214571990307866" }
|
||
# Keep the 0.30.13 API/rwh_06 surface while backporting winit upstream
|
||
# 488c036a's Windows 11 mixed-DPI positioning fix. The upstream revision has
|
||
# since moved to a different EventLoop API and cannot be used directly here.
|
||
winit = { path = "third_party/winit-0.30.13" }
|
||
|
||
# ---- gpui / gpui-component fork(C 路线,nebula_gpui)----------------------
|
||
#
|
||
# 版本配对(发布线):gpui-component 0.5.1(含 -assets / -macros)编译在
|
||
# crates.io 的 gpui 0.2.2 上——longbridge 仓库 v0.5.1 的 workspace 依赖就是
|
||
# `gpui = "0.2.2"`,不是 zed git。nebula_gpui/Cargo.toml 用 "=0.2.2" /
|
||
# "=0.5.1" 精确 pin;[patch] 要求版本匹配,fork 上的版本号保持不动。
|
||
#
|
||
# 下面两个 fork 的 `nebula` 分支基于 crates.io 发布基点(读自 registry 包内
|
||
# 的 .cargo_vcs_info.json,包名/版本已在基点 rev 上核对过)。gpui 保持发布
|
||
# 基点;gpui-component 仅带 popover 紧凑阴影补丁:
|
||
# Kuddev/zed nebula @ 69e2130295c2649963eb639fc70b4f2ee8ea1624
|
||
# (= zed-industries/zed 发布 gpui 0.2.2 的 rev,
|
||
# crates/gpui;上游发布时 dirty=true,若首次编译出现
|
||
# 与 registry src 的差异以 diff 为准补一个对齐 commit)
|
||
# Kuddev/gpui-component nebula @ a59f704c497d6e6e628ec2d401466d825d4a51b2
|
||
# (= longbridge/gpui-component v0.5.1 + popover
|
||
# 单层紧凑阴影;不修改 gpui)
|
||
#
|
||
# 加补丁 = 提交到 fork 的 nebula 分支 → push → 更新下面的 rev(永远 pin
|
||
# exact rev、不 pin branch)。每个补丁注明原因 + upstream PR 链接,上游合并
|
||
# 即撤;升级配对版本 = rebase nebula 分支到新发布基点。gpui 的仓内兄弟 crate
|
||
# (gpui_macros、sum_tree、zed-reqwest 等)经 git 仓库内 path 依赖自动解析,
|
||
# 无需逐个 patch。
|
||
#
|
||
# 升级基点到 gpui-component 0.5.2+ 时的回归检查单(0.5.1 上这些行为本来是对的,
|
||
# 是 0.5.2 重构 button 颜色推导时弄丢的,届时把下面两个 fix 带上):
|
||
# 1. ButtonVariant::Custom 的 text_color 必须回 colors.foreground(0.5.2
|
||
# 回归成背景色 colors.color,透明底按钮字直接隐形)→ 3826fafacd3c
|
||
# 2. hovered()/active() 必须读 ButtonCustomVariant::hover/active(0.5.2
|
||
# 回归成从 color 派生,透明底按钮没有任何悬停/按下反馈)→ 469ab7a44f72
|
||
# 3. 新增的 text/inline_flow.rs:shape_line 前把 \n\r 换成空格(gpui
|
||
# shaper 遇换行 panic;替换保 byte 长度,run 偏移不失效)
|
||
# 本地 fork 工作拷贝在 ../gpui-component-fork。
|
||
#
|
||
# 上游行为备忘(不是补丁,是调用侧要知道的事):`Scrollable`
|
||
# (scroll/scrollable.rs 的 overflow_*_scrollbar)不是就地加滚动条,而是把
|
||
# 被包装元素的 StyleRefinement 整个 clone 到它新建的外层 div,再把原元素
|
||
# 样式清空、只补 flex_1,然后塞进一层 `overflow_y_scroll` 的 scroll-area。
|
||
# 后果:真正承载 children 的那层退回 gpui 默认的 Display::Block 且宽度不
|
||
# 确定,children 上的 `w_full`(width:100%)无从解析、回落到 max-content,
|
||
# 于是每个子块按自己的内容宽度收缩,看起来就是"分组宽度参差、控件既不贴
|
||
# 左也不贴右"(2026-08-17 设置页实测 A/B 确认)。**调用侧约定:滚动区内
|
||
# 先放一层 `v_flex().w_full()`,内容写在它里面**——竖向 flex 的子项走交叉
|
||
# 轴 stretch 拿宽度,绕开百分比解析。settings_pane.rs 的设置正文即按此写。
|
||
#
|
||
# 补丁清单(nebula 分支,rebase 新基点时逐条核对):
|
||
# 1. popover 单层紧凑阴影(a59f704c,见上)。
|
||
# 2. TextView 数学公式钩子(本地 nebula-math 分支,待 push 后恢复 rev pin):
|
||
# markdown 解析启用 math 构造;新增 text/math.rs 的 set_math_renderer
|
||
# 全局注册点;InlineNode/Node 增加数学节点并在渲染时调钩子,未注册时
|
||
# 回退现状(inline=code 文本、block=CodeBlock)。TeX 引擎/栅格化/绘制
|
||
# 全部住在 nebula_app::gpui_shell::math_view,fork 只有接线层。上游
|
||
# 0.6 线出现 MarkdownPlugin/Custom block 后应迁过去并撤掉本补丁。
|
||
# 3. TextView 阅读器 GitHub 化(同分支,随 2 一起 push):软换行按
|
||
# CommonMark 合并为空格(CJK 相邻直连);图片 URL 分流(http(s)/data
|
||
# 走 URI、绝对路径读盘、相对路径按 TextViewStyle::image_base 解析);
|
||
# HTML `align="center"` 居中(Paragraph/Heading 的 align_center);
|
||
# 同一 <p> 内多枚 <img> 徽章同段横排不再逐图切段;<br/> 按文档序断行
|
||
# (旧逻辑先 push Break 再统一 flush 文本,A<br/>B 画成 <br/>AB);
|
||
# <a><img/></a> 链接徽章不再整个丢失(图片转移并挂 link)。除
|
||
# image_base 外全部是 GitHub 语义对齐的纯 bug 修,上游 PR 候选,合并
|
||
# 即撤。
|
||
# 4. Input 水平滚动回不到行首(input/element.rs,光标越出左边界的分支):
|
||
# 原式 `scroll_offset.x - cursor_pos.x` 没有解方程,而是把当前偏移再减
|
||
# 一次光标位置,于是光标每次往左移动内容反而更往左跑,长值永远滑不到
|
||
# 开头(用户 08-19 在 tab 重命名框上报)。改成 `-cursor_pos.x`,与右
|
||
# 边界分支同样的解法,也与同函数 is_selected_all 分支里既有的正确写法
|
||
# 一致。纯 bug 修,上游 PR 候选,合并即撤。
|
||
# 5. Input 拖选缺自动滚动(input/state.rs,新增 autoscroll_for_drag):
|
||
# index_for_mouse_position 把「鼠标到内容原点的距离」换算成字符下标,而
|
||
# 内容原点已含滚动偏移,于是要选到更前面的字符就得把鼠标再往可视框左边
|
||
# 挪同样多的像素——输入框贴在侧栏左侧时根本没这段空间(撞屏幕边),长
|
||
# 文本永远拖不到开头。改为越界即按越出距离推进滚动(复用既有的
|
||
# update_scroll_offset,边界 clamp 现成)。补丁 4 修的是键盘移动那条路,
|
||
# 这条修的是鼠标拖选,两者都要。上游 PR 候选,合并即撤。
|
||
#
|
||
# ⚠ 临时状态:gpui-component 走本地 path patch(nebula-math 分支工作树),
|
||
# 便于数学补丁的本地迭代;验收后 push 到 Kuddev/gpui-component 并恢复
|
||
# `git + rev` 精确 pin(gpui 不受影响,仍是 rev pin)。
|
||
gpui = { git = "https://github.com/Kuddev/zed", rev = "69e2130295c2649963eb639fc70b4f2ee8ea1624" }
|
||
gpui-component = { path = "../gpui-component-fork/crates/ui" }
|
||
gpui-component-assets = { path = "../gpui-component-fork/crates/assets" }
|