docs: simplify release notes and exclude internal notes

This commit is contained in:
kuddev committed 2026-07-19 18:01:44 +08:00
1 parent a412688458
commit 504b961a4b
5 files changed
+44 -175

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ tocodex-docs/
/docs/nebula-command-center-and-unique-features.md
/docs/nebula-ui-quality-audit.md
/docs/wgpu-renderer-and-motion-plan.md
/TASKS.md
# Secrets / credentials / environment — must never be committed
.env
+40 -52
View File
@@ -4,75 +4,63 @@ Every release entry is provided in English and Simplified Chinese.
每个版本条目均同时提供英文和简体中文说明。
## Unreleased
## 0.6.0 - Unreleased / 未发布
### English
#### Added
- **Native mathematics in Markdown documents** — inline $...$ and display $$...$$ formulas are parsed and laid out entirely in Rust, then drawn as cached glyphs and rule quads with the bundled Latin Modern Math font. Fractions, roots, scripts, limits, matrices, scalable delimiters, Greek letters, common operators, and Unicode prose inside formulas work without a WebView, JavaScript runtime, image export, or external TeX process.
- **Math rendering screenshot fixture** — the README now shows a verified native-math screenshot, while `docs/math-rendering-test.md` provides its reusable source document covering inline formulas, Greek letters, relations, arrows, fractions, radicals, scripts, calculus, delimiters, matrices, cases, aligned equations, vector calculus, long formulas, blank rows, Unicode prose, and the explicit dollar-fence boundary.
- **A built-in font fallback** — Maple Mono Normal NF CN is now embedded in Nebula as a runtime fallback, so the interface remains readable when the system font has not been installed. The system-installed font is still preferred, the installation reminder remains dismissible, and the portable archive still includes the original font under `fonts` for normal installation.
- **Choose the directory shown in Files and Git** — the Files drawer can now select a custom root with the native folder picker, and the Git view follows the same root. The choice lasts until the current window closes; “Follow current directory” immediately returns to the focused terminal directory.
- **Four SSH sign-in modes** — each saved host can now use Automatic, Password, Private Key, or Keyboard-interactive authentication. Automatic mode tries configured keys before password and interactive prompts, while an explicitly selected mode stays strict and does not silently switch methods.
- **Private-key sign-in** — choose one or more OpenSSH, PEM, or PPK private keys from the host editor. Key paths stay on the local machine, encrypted-key passphrases are stored in Windows Credential Manager by key fingerprint, and public-key files are rejected with a clear message.
- **SFTP file transfer** — open SFTP from an SSH host's right-click menu and reuse the same authenticated connection. The remote drawer supports editable paths, filtering, refresh, file and folder uploads, file and folder downloads, new folders, rename, recursive delete, symlink targets, progress, cancellation, and visible errors.
- **Pull from the Git drawer** — the right-side Git view now has a Pull button beside Stage, Commit, and Push. Pulls use fast-forward-only mode so Nebula never creates an unexpected merge commit.
- **Font installation reminder** — Nebula now checks for Maple Mono Nerd Font at every launch. If it is missing, a dismissible reminder can open the bundled `fonts` folder, making it easier to fix missing icons and square glyphs without blocking the terminal.
- **Native math formula support** — Nebula can now display inline $...$ and display $$...$$ formulas directly in Markdown. Fractions, roots, scripts, limits, matrices, scalable brackets, Greek letters, common operators, and Unicode text are supported. Formulas are rendered locally in Rust with the bundled math font, without a web component, formula images, or an external TeX program.
- **Math formula test document** — the README now includes a verified screenshot, and `docs/math-rendering-test.md` provides a reusable test page covering common symbols, complex formulas, long formulas, blank rows, Unicode text, and dollar-fence boundaries.
- **File-drawer directory actions** — the Files drawer can move to its parent directory, open a new terminal at the displayed directory, and drag a file or folder into the terminal to insert its safely quoted full path without executing it.
- **Frequent-directory workflows** — Nebula remembers directories that the shell actually entered. Frequently used locations are promoted in path completion and inline suggestions, and the command palette can open a new terminal directly in a visited directory.
#### Fixed
- **Markdown always stays inside its reading column** — paragraphs wrap at words and CJK characters, overlong unbroken text is hard-wrapped, failed formulas wrap as visible TeX source, and oversized native formulas are fitted to the existing 860 px reading column instead of being clipped.
- **Multiline display formulas survive blank rows** — standalone $$ fences can now contain blank lines and explanatory Unicode prose. Code fences and YAML metadata remain untouched, while the math block keeps a range into the original UTF-8 source.
- **Dollar fences define the math boundary** — only paired $...$ and $$...$$ ranges are parsed as mathematics. Bare TeX commands, non-dollar delimiters, and quoted TeX code examples remain ordinary Markdown text and still wrap inside the reading column.
- **Formula arrows and radicals keep their intended geometry** — ASCII `->` is normalized only after a dollar fence has confirmed a formula, and radical overbars now follow the OpenType/TeX ascender and gap rules without a visible seam at the surd.
- **Document typography is more consistent and math is clearer** — Markdown headings use the regular CJK outline with strong theme ink instead of uneven synthetic bold, and math glyphs use pixel-aligned placement plus contrast-corrected grayscale coverage for sharper small-size strokes.
- **Paste stays in the split pane that started it** — right-click paste, Ctrl+V, and multiline-paste confirmation retain the originating pane identity. The confirmation overlay no longer lets mouse coordinates or Enter redirect the text into a neighboring split.
- **Numpad Enter behaves like the main Enter key** — the numeric keypad Enter key now follows the normal command-submission path instead of being routed through the paste action.
- **The selected default shell now applies at launch** — the first terminal pane reads the same default-shell setting as a new tab. An explicit command-line command still takes priority, so setting PowerShell 7 no longer starts with Windows PowerShell and switches only after opening another tab.
- **Resize no longer loses bottom rows or moves the input cursor** — the terminal grid, pane layout, renderer, and ConPTY now share the final row and column count after stretching, maximizing, showing an error, or opening search. Reserved message/search rows are no longer accidentally added back before the PTY resize.
- **Safer maximized and fullscreen boundaries** — startup maximize/fullscreen is applied only after the first visible frame, character resize increments are cleared for those states, and the invisible resize border no longer captures edge clicks while the window cannot be resized.
- **Markdown wrapping and formula containment fix** — paragraphs, Chinese text, long unbroken content, failed formula source, and oversized formulas now remain inside the reading column instead of overflowing or being cut off.
- **Multiline math and recognition boundary fix** — display formulas can contain blank rows and Unicode explanations, while only paired $...$ and $$...$$ ranges are treated as math. Bare TeX and quoted code remain ordinary Markdown.
- **Formula geometry and clarity fix** — arrows are converted only inside formulas, radical bars connect cleanly to the root symbol, Markdown headings use consistent weight, and small mathematical symbols have clearer edges.
- **Split-pane paste routing fix** — right-click paste and Ctrl+V always send text to the pane where the paste started, even after the pointer or focus moves across a split.
- **Enter penetration fix** — while multiline-paste confirmation is visible, Enter handles that confirmation only and never reaches the terminal behind it or a neighboring split. Approved text remains bound to the pane that opened the confirmation.
- **Split Markdown input penetration fix** — keyboard, pointer, and scrolling input used by a Markdown document no longer reaches a neighboring or background terminal in a split window.
- **Numpad Enter routing fix** — the numeric keypad Enter key now submits commands in the same way as the main Enter key instead of triggering paste behavior.
- **SFTP split-session routing fix** — opening the file panel from a split SSH terminal now uses that pane's authenticated destination, so the panel does not connect to a different host after titles, commands, or focus change.
- **Shell prompt lifecycle fix** — Nebula now preserves existing PowerShell and Bash prompt hooks, command exit status, pipeline status, and prompt behavior while still reporting directory changes and command completion.
- **Default-shell picker fix** — confirming a shell in the default-shell picker now saves it as the default instead of opening it as a new terminal.
- **AI integration removal fix** — removing integrations now continues through every supported tool even when one user configuration is damaged, avoiding stale hooks that point to an uninstalled Nebula executable.
#### Improved
- **Bounded math memory and frame cost** — formula parsing, node counts, nesting, matrix cells, draw operations, glyph dimensions, the layout cache, and the fixed-size glyph atlas all have explicit limits. Only visible document lines are expanded into draw work, and repeated formulas reuse cached layouts and glyphs.
- **A cleaner portable archive** — the ZIP root now contains only `nebula.exe` and `README.md`. Runtime helpers, fonts, documentation, and licenses are grouped under `runtime`, `fonts`, `docs`, and `licenses`, and Nebula resolves the new runtime layout automatically.
- **Safer transfers** — uploads and downloads stream in 256 KiB chunks instead of loading whole files into memory. Files are written to temporary paths first and moved into place only after the transfer succeeds, while failed or cancelled transfers clean up their partial files.
- **A much smaller download** — the portable ZIP is now about half its previous size, while keeping the bundled font, ConPTY runtime, notification helper, documentation, and licenses intact.
- **Large Markdown math document improvements** — Markdown files containing many formulas load quickly and remain responsive while scrolling. Nebula processes the visible area, reuses repeated formulas, and limits unusually complex input so memory use stays stable during long reading sessions.
- **SFTP workflow improvements** — the SFTP panel now supports parent-directory navigation, drag-and-drop upload, and a background context menu for refresh, uploading files or folders, and creating a directory. Multi-file drops are grouped into one transfer instead of cancelling one another.
### 简体中文
#### 新增
- **Markdown 文档支持原生数学公式** — 行内 $...$ 和块级 $$...$$ 公式现在全部由 Rust 解析和排版,再使用内置 Latin Modern Math 字体以缓存字形和规则线 quad 直接绘制。分数、根式、上下标、极限、矩阵、伸缩括号、希腊字母、常用运算符以及公式中的 Unicode 说明文字都可以显示,整个过程不依赖 WebView、JavaScript、公式图片或外部 TeX 进程。
- **数学渲染截图样例** — README 已展示经过验证的原生数学截图,并新增对应的可复用源文档 `docs/math-rendering-test.md`;文档集中覆盖行内公式、希腊字母、关系符号、箭头、分式、根式、上下标、微积分、伸缩括号、矩阵、分段函数、多行对齐、向量分析、长公式、空行、Unicode 说明文字以及美元围栏边界,方便直接打开截图回归。
- **内置了字体显示兜底** — Maple Mono Normal NF CN 现在会随主程序一起内置。即使用户忘了安装系统字体,界面也能正常显示;已经安装的系统字体仍然优先,缺少字体时的提醒依旧可以关闭,便携包里的 `fonts` 目录和原始字体文件也继续保留,方便按正常方式安装。
- **文件和 Git 可以切换查看目录了** — 文件抽屉新增原生目录选择器,选中的目录也会同步用于 Git 页面。这个选择只保留到当前窗口关闭;点击“跟随”后会立即重新跟随当前终端所在目录。
- **四种 SSH 登录方式** — 每个已保存主机都可以选择自动、密码、密钥或交互式认证。自动模式会先尝试配置的私钥,再尝试密码和交互式提示;手动选择某种方式后则只使用该方式,不会失败后悄悄切换。
- **私钥登录** — 主机编辑器现在可以选择一把或多把 OpenSSH、PEM 或 PPK 私钥。Nebula 只保存本机密钥路径,加密私钥的口令会按密钥指纹存入 Windows 凭据管理器;如果误选 `.pub` 公钥,也会直接提示重新选择私钥。
- **SFTP 文件传输** — 在 SSH 主机右键菜单中即可打开 SFTP,并复用同一条已认证连接。远端抽屉支持手动路径、筛选、刷新、上传文件和文件夹、下载文件和文件夹、新建文件夹、重命名、递归删除、符号链接目标、传输进度、取消和可见错误提示。
- **Git 抽屉可以拉取了** — 右侧 Git 页面在暂存、提交和推送旁新增“拉取”按钮。拉取只接受快进更新,不会在用户不知情时自动生成合并提交。
- **忘装字体会直接提醒** — Nebula 每次启动都会检查 Maple Mono Nerd Font。没有安装时会弹出可关闭的提醒,也可以一键打开随包提供的 `fonts` 文件夹,不会再让缺失图标和方框字悄悄混进正常界面。
- **Markdown 数学公式支持** — Nebula 现在能够直接显示行内 $...$ 和块级 $$...$$ 公式,支持分数、根式、上下标、极限、矩阵、伸缩括号、希腊字母、常用运算符和 Unicode 文字。公式由 Rust 和内置数学字体在本地完成显示,不需要网页组件、公式图片或外部 TeX 程序。
- **数学公式测试文档** — README 已加入经过验证的效果截图,`docs/math-rendering-test.md` 提供可重复使用的测试页面,覆盖常用符号、复杂公式、长公式、空行、Unicode 文字和美元围栏边界。
- **文件目录快捷操作支持** — 文件抽屉可以返回上级目录、在当前显示目录中新建终端,也可以把文件或目录拖入终端,插入经过安全引用的完整路径而不会自动执行。
- **常用目录支持** — Nebula 会记录 Shell 实际进入过的目录,让常用位置优先出现在路径补全和行内建议中;也可以从命令面板直接在访问过的目录中新建终端。
#### 修复
- **Markdown 内容始终留在阅读列内** — 普通段落会按单词和中文字符换行,连续超长文本会强制折行,解析失败的公式会以可见 TeX 源码继续换行,过宽的原生公式则会收敛到现有 860 px 阅读列内,不再被右侧裁掉。
- **块级公式可以跨越空行** — 独立 $$ 围栏现在可以包含空行和 Unicode 说明文字;代码围栏与 YAML 元数据保持原样,数学块仍然引用原始 UTF-8 源码范围。
- **美元围栏明确数学边界** — 只有成对的 $...$ 和 $$...$$ 才会进入数学解析;裸露 TeX、非美元定界符和引用中的 TeX 代码都保持普通 Markdown 文本,同时继续在阅读列内换行。
- **箭头和根号的几何更准确** — 只有确认处于美元围栏公式内部时才把 ASCII `->` 归一化为数学箭头;根号横线改按 OpenType/TeX 的上升部和间距规则布局,不再与根号字形出现接缝。
- **文档字重更统一,数学字形更清楚** — Markdown 标题改用规则 CJK 轮廓配合主题强调色,避开局部粗细不一的合成粗体;数学字形增加整像素定位和灰度覆盖补偿,小字号细笔画更清晰。
- **粘贴会留在发起操作的分屏** — 右键粘贴、Ctrl+V 和多行粘贴确认都会保留原始 pane 身份;确认层显示时,鼠标坐标和 Enter 也不会再把内容重定向到相邻分屏。
- **数字小键盘 Enter 与主 Enter 一致** — 小键盘最右侧 Enter 现在走正常命令提交路径,不再进入粘贴动作。
- **启动时也会使用用户选择的默认 Shell** — 第一个终端面板现在和新标签页读取同一份默认 Shell 设置;命令行明确指定的命令仍然优先。选择 PowerShell 7 后,不会再先打开 Windows PowerShell,只有新标签页才变成 7。
- **拉伸窗口后底部和输入光标不再错位** — 拉伸、最大化、显示错误提示或打开搜索后,终端网格、面板布局、渲染器和 ConPTY 会共用最终行列数;消息栏和搜索栏已经占用的行不会在 PTY resize 前被错误加回来。
- **最大化和全屏的窗口边界更稳了** — 启动时会等首帧可见后再应用最大化或全屏,这两种状态下会取消字符级拉伸步进,也不会再让不可用的隐藏 resize 边框抢走边缘点击。
- **Markdown 换行与公式越界修复** — 普通段落、中文、连续长文本、解析失败的公式源码和过宽公式都会留在阅读列内,不再越界或从右侧被裁掉。
- **多行公式与识别边界修复** — 块级公式可以包含空行和 Unicode 说明文字,同时只有成对的 $...$ 和 $$...$$ 才会识别为数学公式;裸露 TeX 和引用代码仍按普通 Markdown 显示。
- **公式几何与清晰度修复** — 箭头只在公式内部转换,根号横线能够与根号主体完整连接,Markdown 标题字重保持统一,小字号数学符号的边缘也更加清楚。
- **分屏粘贴路由修复** — 右键粘贴和 Ctrl+V 始终把内容发送到发起粘贴的分屏,即使鼠标或焦点随后移动到其他分屏也不会改错目标。
- **Enter 穿透修复** — 多行粘贴确认框显示时,Enter 只处理当前确认,不会再发送到后方终端或相邻分屏;确认后的内容仍然只进入发起粘贴的分屏。
- **分屏 Markdown 输入穿透修复** — 在分屏窗口中查看 Markdown 文档时,文档使用的键盘、鼠标和滚动操作不再发送到相邻或后方终端。
- **数字小键盘 Enter 修复** — 小键盘最右侧 Enter 现在与主 Enter 一样提交命令,不再触发粘贴行为。
- **SFTP 分屏连接修复** — 从 SSH 分屏打开文件面板时,会使用该分屏已经认证的连接目标,不再因标题、命令或焦点变化连接到其他主机。
- **Shell 提示符生命周期修复** — Nebula 在报告目录变化和命令完成状态时,会保留已有的 PowerShell、Bash 提示符 Hook、命令退出状态和管道状态,不再破坏用户原有提示符工具。
- **默认 Shell 选择修复** — 在默认 Shell 选择器中确认后会正确保存设置,不再把所选 Shell 当成新终端直接打开。
- **AI 集成移除修复** — 移除集成时,即使某一项用户配置损坏,Nebula 也会继续清理其他工具,避免残留指向已卸载程序的 Hook。
#### 改进
- **数学内存和每帧开销都有明确上限** — 公式源码、解析事件、节点数、嵌套深度、矩阵单元格、绘制操作、字形尺寸、布局缓存和固定大小字形图集都设置了边界;文档只为可见区域生成绘制工作,重复公式会复用布局与字形缓存。
- **便携包不再乱糟糟** — ZIP 根目录现在只保留 `nebula.exe` 和 `README.md`;运行组件、字体、文档和许可证分别放进 `runtime`、`fonts`、`docs` 与 `licenses`,Nebula 会自动识别新的运行组件位置。
- **传文件更稳妥** — 上传和下载按 256 KiB 分块流式传输,不会把整个大文件一次性塞进内存。文件会先写入临时位置,完整成功后才替换正式文件;失败或取消时也会清理未完成的临时文件。
- **下载包瘦了一半左右** — 字体、ConPTY 运行组件、通知助手、文档和许可证都还在,便携包体积从约 33.2 MB 降到了约 16.8 MB。
- **大型 Markdown 数学文档加载改进** — 包含大量公式的 Markdown 文档能够快速打开并保持流畅滚动。Nebula 只处理当前可见区域、复用重复公式,并限制异常复杂的输入,让长时间阅读时的内存占用保持稳定。
- **SFTP 操作改进** — SFTP 面板新增返回上级目录、拖放上传,以及包含刷新、上传文件、上传目录和新建目录的空白区域右键菜单;一次拖入多个文件时会合并为同一批传输,不会互相取消。
## 0.4.0 - 2026-07-14
@@ -123,12 +111,12 @@ Every release entry is provided in English and Simplified Chinese.
- **Right-click menus feel lighter** — menus now use a soft theme-aware shadow, a subtle border, and a short open/close animation. Tab color labels and swatches also have more natural spacing.
**中文:** 右键菜单加上了跟随主题的柔和阴影、细边框和短促的开合动画,层次更自然;标签页颜色名称和色块之间也留出了更舒服的间距。
### Architecture, Research, And Verification / 架构、调研与验证
### Architecture, Reliability, And Verification / 架构、可靠性与验证
- **Cleaner internal structure** — context menus, text editing, SSH UI state, and shared visual values now live in separate modules, making later changes easier to understand and less likely to affect unrelated parts of the app.
**中文:** 右键菜单、文本输入、SSH 界面状态和通用视觉配置已经拆到各自的模块里,后续修改更容易看懂,也更不容易误伤其他功能。
- **UX review and competitor research** — added a source-backed review of common user expectations, covering normal, empty, and error states, safe recovery after destructive actions, focus behavior, and font/icon reliability. A separate report compares Kaku, kitty, zap, and Tabby across their interface, workflows, SSH, file tools, protocols, and backup design.
**中文:** 新增了一份结合现有代码的体验审查,重点检查正常、空白和出错时是否好理解,误删后能不能找回,焦点是否自然,以及字体和图标能否稳定显示;另一份报告则对比了 Kaku、kitty、zap 和 Tabby 的界面、工作流、SSH、文件工具、协议与备份设计。
- **Product experience verification** — normal, empty, and error states were reviewed together with destructive-action recovery, focus behavior, and font and icon reliability, making common workflows easier to understand and recover.
**中文:** 完成正常、空白和错误状态的产品体验检查,并覆盖误操作恢复、焦点行为、字体和图标可靠性,让常用流程更容易理解,也更容易从错误中恢复。
- **More regression tests** — new tests cover the terminal bottom edge, split views, link underlines, transparent cursor and selection colors, overlapping links, menu placement, SSH deletion recovery, text editing, theme-family switching, and control-state priority. Current result: **188 passed; 0 failed**.
**中文:** 新增回归测试,覆盖终端底部显示、分屏、链接下划线、透明窗口中的光标与选区、重叠链接、菜单位置、SSH 删除恢复、文本输入、主题系列切换和操作状态优先级。当前结果:**188 项通过,0 项失败**。
@@ -143,8 +131,8 @@ Every release entry is provided in English and Simplified Chinese.
- **Complete UI redesign** — the top bar and left sidebar now form a continuous L-shaped chrome shell, with a unified visual language across settings, the command palette, confirmation dialogs, and drawers.
**中文:** 全面重设计窗口 UI:顶部栏与左侧栏组成连续 L 形 chrome,并统一设置、命令面板、确认框和抽屉的视觉语言。
- **Windows Terminal-style tab interaction** — tabs support animated reordering, dragging into the active terminal to create a split, edge docking previews, and matching pointer feedback.
**中文:** 深度还原 Windows Terminal 标签交互:支持动画排序、拖入当前终端形成分屏、边缘停靠预览和对应的鼠标反馈。
- **Flexible tab interaction** — tabs support animated reordering, dragging into the active terminal to create a split, edge docking previews, and matching pointer feedback.
**中文:** 标签页支持动画排序、拖入当前终端形成分屏、边缘停靠预览和对应的鼠标反馈。
- **Files and Git drawer** — adds a right-side directory tree and Git workspace with filtering, expansion, path dragging, file status, commit/push actions, and new full-color file-type icons.
**中文:** 新增右侧目录树与 Git 工作区,支持筛选、展开、路径拖拽、文件状态、提交/推送操作以及新的彩色文件类型图标。
- **Markdown/GFM viewer** — adds read-only rendering for headings, lists, tables, task lists, code blocks, block quotes, links, and scrollable documents.
-1
View File
@@ -399,7 +399,6 @@ Nebula 内置 Lua 5.4,使用 `require 'nebula'` 与
路径优先级、Windows/Linux 位置、数组、模块与重载说明见
[Lua 配置指南](docs/lua-configuration.md)。
Nebula 的目标用户、核心场景,以及相对 Warp、kitty、Tabby、WezTerm 的取舍,
### 🧩 技术栈
| 层级 | 技术 |
-118
View File
@@ -1,118 +0,0 @@
# 当前任务(2026-07-14)
- [ ] 使用真实 SSH 服务器验证直连认证顺序、首次连接确认、输入输出、Resize 和实际连接耗时。
- [ ] 验证远端 `nebula-hook` 的部署/发现方式,确认 Claude、Codex、OpenCode 在 SSH Pane 内能触发本地通知。
- [x] 为 SSH 条目与 Tab 实现统一的原生右键菜单组件和短促开合动画;外部点击、Esc、普通按键和窗口失焦可自然释放轻量菜单。
- [x] SSH 菜单:连接、复制地址、编辑、删除;不再提供右键置顶。删除已补来源说明、二次确认、8 秒 Undo / Ctrl+Z、凭据延迟清除及设置页长期恢复入口。
- [x] Tab 菜单:复制标签页、左右分屏、上下分屏、重命名、关闭和颜色选择。
- [x] Tab 左侧窄光条只在用户明确设置自定义颜色后显示;默认不显示侧边条(按用户 2026-07-14 最新要求覆盖旧设计)。
- [x] 保存并恢复 Tab 自定义颜色及必要的会话元数据。
- [x] 自绘输入框统一支持 Ctrl+A / Ctrl+C / Ctrl+V;全选后输入/粘贴替换,选择有可见背景;隐藏密码仅允许粘贴,显示后才允许复制。
- [x] 侧栏按 `D:/下载/gemini-code-1784017517204.html` 收敛:TABS / SSH HOSTS 使用真实小字号层级,两个加号仅标题 hover 时显现,Tabs 下拉改为竖向三点。
- [x] `cargo check -p nebula` 与 `cargo test -p nebula` 通过(174 passed,0 failed;2026-07-14)。
- [x] 建立 `display/design_tokens.rs`(4px 空间阶梯、字号、控件尺寸、动画和统一状态枚举),菜单动画与侧栏层级已开始实际引用;SSH UI 状态类型已从 `display/mod.rs` 拆至 `display/ssh_ui.rs`。
- [ ] 继续把 `display/mod.rs` 中 SSH 方法/绘制、确认弹窗和其他大块职责拆到子模块,并逐屏迁移散落的局部数值到 design tokens。
- [ ] 完成 Debug 运行检查和真实窗口交互验收(hover-only 控件、菜单脱焦、删除/撤销/恢复、输入框快捷键和 DPI 字体观感)。
- [ ] 验收完成后重打 0.3.0 Release,并替换现有发布压缩包。
---
# Nebula 任务交接(2026-07-12 17:10 写于会话结束前)
> 交接给新对话。持久记忆里有同步副本(`nebula-task-handoff` 记忆),本文件更详尽。
> 已交付包:`target/release/nebula.exe`(16:59+,含下述两个已完成修复 + 诊断日志)。
> 不要为了检查代码反复关闭用户正在查看的 Nebula。只有在用户同意进行 Release 重打、且运行实例确实占用目标 exe 时,才单独说明后关闭对应实例。
## ✅ 本轮已完成(已在包里)
### 1. 标题/缩放文字"拥挤粘连+虚胖"— 已修
- 根因:crossfont::Size 单位是 **pt**,`Size::new(base_size.as_px() * scale)` 把 px 当 pt,字号多乘 96/72=1.333 → 字形比步进宽 33% → 标题粘成墨块。
- 修复:`glyph_cache.font_size = base_size.scale(scale)`(renderer/mod.rs `draw_doc_text` 内,~467 行)。
- 用户验证方法:md 标题/设置面板标题应字距正常且整体小一号(之前虚胖);侧栏 SSH 提示真正变小(0.85× 之前实际渲染 1.13×)。
### 2. 鼠标选择"只能选整行/拖拽粒度错"— 已修(代码完成,待用户手感验证)
- 根因:`on_mouse_press` 中 click-state 被**双重推进**——chrome 块(原 ~1238)推一次更新时间戳,`ChromeHit::None` 落下后终端块(原 ~1401)再推一次,elapsed≈0 → 每次终端单击必然升级 DoubleClick/TripleClick → 词/行粒度选择与拖拽。
- 修复(input/mod.rs):
- 新增 `advance_click_state()`:press 入口调用**恰好一次**(WT `_numberOfClicks` 模型)。
- 补 WT 位置约束:两次点击须落在系统双击矩形内(`GetSystemMetrics(SM_CXDOUBLECLK)/2`),时间用系统 `GetDoubleClickTime()`(Cargo.toml 已加 windows-sys feature `Win32_UI_Input_KeyboardAndMouse`)。
- `Mouse` 新增 `last_click_pos` 字段(event.rs)。
- Shift+点击 = 扩展现有选区(WT 行为),不再清空。
- 测试 `input_delay` 引用改为 `multi_click_time()`;7 个 click 测试失败为**遗留**(mock display() unimplemented,input/mod.rs:2286 panic),非回归。
## 🧊 已沉淀暂缓:#6 抽屉/目录树 → TUI 历史刷新风暴(用户 07-12 指示"别死磕,先做别的")
已埋诊断日志(`nebula_link_log` → `%APPDATA%\Nebula\nebula_debug.log`):
- display/mod.rs handle_update HUD 处:`grid_resize <cols>x<lines> px=.. pad_x/pad_r/pad_y cell=.. drawer=.. sidebar=.. reserved=..`
- window_context/split.rs `apply_view_pty`:`pty_resize cols=.. lines=.. view_px=..`
复现脚本:`scripts/drawer_repro.ps1`(启动+自动点抽屉按钮各一次,间隔 2s;FindWindowW 按 title "nebula" 找不到窗口那次是 race,重跑即可)。
**⚠️ 上轮误判已推翻(07-12 二次侦察):**
> 上轮写"异常 B:抽屉状态自发振荡、无人点击也振荡"是**错的**。真相:日志里每对 84↔120 的 grid_resize 前后都紧跟一条 `link_release`——那是 `drawer_repro.ps1` 脚本的模拟点击,不是自发的。**根本没有自发振荡**,别再往"每帧派发 toggle / session 恢复反复 toggle"方向查了。
**真正的实锤(重新读日志得出):单击一次 = 开+关两次 toggle。**
```
[..419.485] grid_resize 84x20 ... drawer=462 ← 开
[..419.485] pty_resize cols=84
[..419.616] link_release ← 脚本第 1 次点击的 release
[..419.812] grid_resize 120x20 ... drawer=0 ← 立刻又关(约 300ms 内)
[..419.813] pty_resize cols=120
```
每次点击都产生"开(drawer=462)→约300ms→关(drawer=0)"成对 resize,即**一次物理点击触发了两次 toggle_side_panel**。press 和 release 各调一次是头号嫌疑:
- `on_mouse_press` 顶栏按钮路径 input/mod.rs:1368-1381(`ChromeHit::PanelFiles/PanelGit → toggle_side_panel`)
- `on_mouse_release` 里是否有对称的第二次分发(tab-drag `end_tab_drag`→Click、或 chrome 命中在 release 再跑一遍)→ **下一步只需读 on_mouse_release 全程 + arm/end_tab_drag,确认 press 已 return 后 release 不该再命中同一按钮**。
- 另一嫌疑:`ChromeHit::PanelFiles` 命中矩形与抽屉打开后某元素重叠,开抽屉后同一坐标又命中"关"。
**异常 A(独立问题,仍未解):`cell=13x40` — 行高 40px 偏大**(宽 13 正常约配 26 高)。
- 计算链已定位:display/mod.rs:4936 `compute_cell_size` → `(metrics.line_height + offset_y).floor()`;metrics 来自 glyph_cache.rs:112 `rasterizer.metrics(key, font.size())`,font.size() 已 `.scale(scale_factor)`(display/mod.rs:1444)。
- 存疑:cell_width=13 说明 average_advance 未被 DPI 双乘,但 line_height=40 偏大 → line_height 单独异常。**下一步**:加日志打印 `metrics.average_advance / metrics.line_height / offset` 原始值,看是 crossfont 返回的 line_height 本身比例失调,还是 config.font.offset.y 被设过大。注意用户设置 `powerline=1`,排查是否 powerline/字体 fallback 拉高行盒。
- 用户运行时设置(`%APPDATA%\Nebula\nebula_settings.txt`):theme=SilverLight, shell=powershell, powerline=1, keep_session=0, background=#ffffff。
**修复原则(留给复工时):** press 已处理的点击,release 必须 early-return,不得二次 toggle;toggle 目标状态幂等(相同 open 值不 set_dimensions)。PTY resize settle 机制已就绪(window_context.rs:1931 leading-edge 300ms + 150ms trailing)——源头去重后风暴应自愈。
## 📋 待办(按用户优先级:先 bug 后新功能)
### #7 SSH 弹外部 conhost 黑窗(bug,未开工)
- 现象:点 SSH host,`C:\Windows\System32\OpenSSH\ssh.exe` 独立黑窗弹出,密码在外部输入。
- 根因判断:`spawn_tab_ssh`(window_context.rs:816)经 `nebula.exe ssh <host>`(main.rs:108 → `ssh::run(options.args)`,ssh.rs)。nebula.exe 是 GUI 子系统进程、无控制台可继承 → 子进程 ssh.exe 被分配新可见 conhost。
- 下一步:读 `ssh::run`;候选修法:包装进程入口 AttachConsole/AllocConsole(隐藏窗口);或 PTY 直接跑 ssh(需另路注入远端集成);或 CreateProcess 时正确传递 pseudoconsole。
### #2-#5 执行器下拉 + WT 同款默认 Shell 设置(✅ 07-12 完成,含 #5 默认 shell picker)
- 执行器下拉已交付:`shell_detect.rs`(Tabby 探测逻辑移植,缓存于 `Display::nebula_detected_shells`)、chevron 按钮(`ChromeHit::NewTabMenu`)、palette profiles-only 菜单、`TabRequest::NewShell`。
- #5 默认 Shell(WT parity)已交付,全链路:
- 存储:`shell=<id>` 支持富 id(cmd/pwsh/nu/wsl:X)。`NebulaRuntimeSettings.shell_id: Option<String>` 原样读写(settings.rs),2 值枚举 `NebulaShell` 继续跟踪 PTY 集成执行器族(powershell/bash 的提示符注入基座)。
- 生效:`spawn_tab` → `default_shell_override()`(window_context.rs:800)经 `shell_detect::resolve_id` 解析;powershell/bash 族返回 None 走 PTY 自有 bootstrap。
- UI:设置页"默认 Shell"行点击 → `open_default_shell_picker()`(palette 置 `picking_default`,confirm 返回 `SetDefaultShell` 而非 launch)→ `set_default_shell()` 持久化。行值显示 icon+名称(`display_name_for_id`,无 IO,每帧安全)。旧 `cycle_shell` 2 值轮换已删除。
- palette 行现携带 `(icon, label, hint)` 三元组,shell 行画 Nerd Font 图标(icon_for_id)。
- 顺手修复:keyboard.rs 重复 `LaunchShell` arm、input/mod.rs 重复 `NewTabMenu` arm(均为前次会话残留的 unreachable pattern)。
- 验证:cargo build 0 error;测试 137 passed / 8 failed(8 个失败与干净基线完全一致 = 遗留 mock 问题,palette 测试 9/9 过)。
### #2-#5 原侦察记录(已实现,留档)
- 需求:tabs 加号旁下箭头 → 菜单列执行器(PowerShell/pwsh/CMD/Git Bash/WSL 发行版)→ 点击用该 shell 开新 tab。参考 Tabby(源码 D:\temp_build\tabby)。**不造轮子**。
- 现成管线:`Profile{name,command,args,cwd}`(config/ui_config.rs:684)、`TabRequest::NewProfile(usize)`→`spawn_tab_profile`(window_context.rs:787)→`spawn_pane_detached_with(shell override)`(1078);右键加号已弹菜单=命令面板 profiles-only(`open_profile_menu` display/mod.rs:2162;palette `LaunchProfile(i)`→keyboard.rs:539)。
- 检测逻辑(照搬 Tabby tabby-electron/src/shells/*.ts,已读):
- PowerShell:知名路径顺序探测 `%LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe` → `%ProgramFiles%\PowerShell\7\pwsh.exe` → `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`,args `-nologo`
- pwsh:注册表 HKLM `SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\pwsh.exe` 默认值
- CMD:`cmd.exe`
- Git Bash:HKLM→HKCU `Software\GitForWindows` `InstallPath` → `{path}\bin\bash.exe --login -i`
- WSL:HKCU `Software\Microsoft\Windows\CurrentVersion\Lxss` 枚举子键读 `DistributionName` → `%windir%\system32\wsl.exe -d <name>`;无 Lxss 但 system32\bash.exe 存在 → "WSL/Bash on Windows"
- 注册表:windows-sys feature `Win32_System_Registry` 已在依赖(或加 winreg,Cargo.lock 已有)
- UI:chrome.rs `ChromeTabLayout` 加 chevron rect(plus 是 TABS header 右端 s(20) 方块,chrome.rs:299;chevron 放其左),`ChromeHit::NewTabMenu`,hit chrome.rs:429 旁,hover chrome.rs:860 旁,图标 chrome.rs:1010(`draw_centered_icon` + codicon chevron-down)。
- 路由:菜单名单 = 检测项+config.profiles 合并(一个函数三处共用);新 `TabRequest::NewShell{name,shell}`,keyboard.rs:539 做 index→请求映射;Ctrl+Shift+数字(keyboard.rs:273)保持 config.profiles 语义。
### #9 设置改为内容区 tab(新功能,用户已细化)
- 设置作为 tabs 列表一项,点设置按钮 → 设置页在中间内容区打开(VS Code 风格,废除悬浮模态)。
- 设置 tab 激活时:右上角文件/git 抽屉按钮**隐藏**、抽屉功能禁用。
- 参考先例:OpenDoc 查看器 tab(TabEntry.doc 字段、markdown_view)是现成的"非终端 tab"。
### #10 快捷键扩充 + 一键跳转(新功能)
- 对齐 WT;核对 Alt+1..9 / Ctrl+1..9 切 tab 是否真实生效(设置页写着有);[[keyboard.bindings]] 自定义已有配置系统,扩默认表+文档化;"点击一下自动连接/启动"与执行器下拉、SSH hosts 一键行合并交付。
### #11 大文件拆分(重构,用户点名"顺手做")
- display/mod.rs ~4900 行、input/mod.rs ~2500、event.rs ~2900、window_context.rs ~2000。沿 chrome.rs/settings.rs/split.rs 子模块先例按职责拆。
- 顺带修 8 个遗留测试失败(input 点击测试的 mock display() unimplemented → 解耦 chrome 命中)。
## 环境与流程
- 效果验证:用户装包截图反馈;渲染问题用"量截图"法(列投影+自相关量步进/墨宽,见 nebula-render-crispness 记忆第 6 条)。
- 诊断日志常开:`%APPDATA%\Nebula\nebula_debug.log`(grid_resize/pty_resize/link_press 等)。修完 #6 后考虑移除或门控这两条 resize 日志。
- dist 打包需带 conpty.dll + OpenConsole.exe(target/release 已有,7/2 版本)。
- 上轮遗留:设置面板标题层级(真粗体+字号梯度已上车,看效果再调)。
+3 -4
View File
@@ -1,9 +1,8 @@
# Nebula Lua Configuration
Nebula uses vendored Lua 5.4 for programmable configuration. The API follows
the productive shape of WezTerm's configuration experience, but it is a
Nebula API rather than a compatibility layer: use `require 'nebula'`, and do
not expect an existing `.wezterm.lua` to run unchanged.
Nebula uses vendored Lua 5.4 for programmable configuration. It provides a
native Nebula API rather than a compatibility layer: use `require 'nebula'`
and generate a configuration with `nebula config init`.
Lua configuration is executable local code. Only use configuration files and
modules that you trust. Nebula does not download or execute remote