Repository navigation
feat(desktop): 标题栏的调试、搜索、设置按钮可拖到左右侧栏 - #2127
Merged
Merged
Conversation
- 目录项新增 alsoOnToolStripes(Core 布局规则),调试、搜索、设置可拖到六个侧栏分区、在侧栏内排序,也能拖回标题栏 - 标题栏右键提供“移动到”;侧栏右键提供“移到标题栏”“移动到”“前移/后移”,不提供“隐藏入口” - 放到侧栏后功能与显示照旧:调试开始调试,搜索打开全局搜索,设置在按钮内侧弹出设置菜单并显示打开状态,提示仍带名称和快捷键 - 日志 surface 跟随所在位置:标题栏为 toolbar,侧栏为 button - 运行和运行配置只留在标题栏 - Core 固定到 Lithe-core-rust#90 的 6e4e02c
…-stripes # Conflicts: # scripts/desktop/build-desktop-core.sh # shared/platform-feature-matrix/features/viva-title-run-debug.json
xiaoyumuxi
marked this pull request as ready for review
November 18, 2026 03:52
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue / Linked issue
Closes #…。d8094c6),本 PR 的PINNED_CORE_REVISION固定到该提交。PR 类型 / Type
改动说明 / What changes
背景 / Why
改动 / Changes
Core 布局规则(Lithe-IDEA/Lithe-core-rust#90,已合入)
ReduceChromeLayout的目录项新增可选字段alsoOnToolStripes。标了这个字段的标题栏按钮可以放进六个侧栏分区,也能移回标题栏。目录与拖放
catalog.go:stripes。itemTitleDebug、itemTitleSearch、itemTitleSettings标上它,作为AlsoOnToolStripes发给 Core。chromeState.allowed(index, zone):区和默认区在同一表面时可以放;标了stripes的按钮还可以放进侧栏。drag.go:dragDetached,可以拖出标题栏。draggingToolButton改用allowed判断。放到侧栏后功能与显示照旧
chrome_view.go:gearMenu(c, box, true)用menu.Beside()),菜单项和标题栏里相同。openGear(c),标题栏和侧栏共用。titleButtonMenu。标了stripes的按钮有“移动到”,列出六个侧栏分区;运行按钮没有这个菜单。stripeButtonMenu):desktop.tools.moveToTitleBar)。stripeMoveMenu,侧栏按钮和标题栏按钮共用。日志
app.go新增chromeSurface(index):按钮在标题栏时返回toolbar,在侧栏时返回button。workspace.searchEverywhere.open)和调试(title.debug,title_run.go)的app.action.performed用它填写surface,事件 ID 和字段都不变。Core 固定版本
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION升到d8094c6(Core main,[Feature] 优化插件市场与插件管理界面 #90 squash 合入,在 [Feature] 增强编辑器与文件树之间的文件定位和去重 #89 的d833d6a之上)。已合并最新main,固定版本注释同时记下 [Feature] 增强编辑器与文件树之间的文件定位和去重 #89 和 [Feature] 优化插件市场与插件管理界面 #90。i18n
desktop.tools.moveToTitleBar(中文“移到标题栏”,英文“Move to Title Bar”),生成结果已提交。测试
title_stripe_test.go(新增):TestTitleButtonsDragOntoTheStripesAndBack:三个按钮拖到侧栏,按侧栏按钮排列,再拖回标题栏;布局文件保存位置。TestTitleRunStaysInTheTitleBar:运行按钮拖不走,也没有“移动到”。TestTitleButtonMenuMovesItOntoAStripeAndBack:标题栏右键“移动到”能移到侧栏;侧栏右键能移回标题栏、能移到其他分区,没有“隐藏入口”。TestSettingsOnAStripeOpensItsMenuBesideIt:设置菜单在按钮内侧弹出,按钮呈打开状态,再按一次关闭。TestSearchAndDebugOnAStripeDoTheirWork:搜索、调试在侧栏上功能照旧,提示带名称,日志surface为button。internal/core/core_test.go:新增“标了的标题栏按钮移到侧栏再移回”,以及alsoOnToolStripes的编码用例。logevents_test.go:新增搜索、调试在侧栏上按下时surface: button的两条用例。visual_title_stripe_capture_test.go(新增,vivahead && lithevisual):无头截图测试,截图在docs/assets/title-buttons-on-stripes/。功能矩阵
workbench-tool-window-docking:说明三个按钮能放到哪里、右键菜单项、放到侧栏后功能照旧、日志 surface 的变化,并把title_stripe_test.go加进两端证据。viva-title-run-debug:注明调试按钮可拖到左右侧栏,运行和运行配置只留在标题栏。不在本 PR 范围内 / Out of scope
pending)。类型专属:feat
多平台对齐
desktop/internal/workbench)和 Rust Core 里,合入后两端同时具备;Windows 实机验收尚未做。platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
workbench-tool-window-docking.json和viva-title-run-debug.json;两端实现状态不变,验证状态保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;没有插件构建步骤或资源路径写进文档UI 验证 / UI evidence
TestVisualTitleButtonsOnStripes,提交b14c240ed,窗口 1100×680,深色中文、浅色英文,7 个场景,共 14 张截图docs/assets/title-buttons-on-stripes/,下方嵌入深色中文截图,浅色英文见 READMEmain相同(三个按钮都在标题栏右上角),所以“默认布局”一张即为改动前的样子,其余是新增交互;明暗主题与中英文都覆盖。macOS 原生窗口与 Windows 实机验收尚未做统一日志系统 / Structured logging
app.action.performed,只是surface随按钮位置在toolbar和button之间取值(两个值都是已有的取值);logevents_test.go有对应用例界面文案 / i18n
desktop.tools.moveToTitleBar,在shared/i18n/补齐中英词条并提交生成结果;通过desktop/internal/i18n读取,没有手改生成文件node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check逻辑归属 / Logic placement
alsoOnToolStripes,Core [Feature] 优化插件市场与插件管理界面 #90);宿主只标目录项,平台层只负责绘制、拖放命中和弹出方向性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存、定时器或依赖;拖动只多一次按位置选择表面的判断,没有改动输入、滚动等热路径。
设置 / Settings
N/A:没有新增或修改设置项。
插件契约 / Plugin contract
N/A:Core #90 只改宿主内部的
workbench.chromeLayout.reduce目录字段,没有改插件契约、能力版本、插件函数协议或宿主方法。发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh无用代码与重构 / Dead code and refactoring
dragLocate、paintDrag、draggingToolButton)改为调用allowed;侧栏“移动到”子菜单抽成stripeMoveMenu,侧栏和标题栏共用验证 / Verification
desktop/:../scripts/desktop/desktop-go.sh test ./... -count=1(合并main后,Cored8094c6)localshellTestClosingAnIntegratedShell…/zsh(两轮分别是RightAfterACommandHangsUpItsJobs和HangsUpTheShellAndItsJobs,shell 的子进程 5 秒内未退出)和workbenchTestCommandInstallManagedRecordsWhereLaterLaunchesFindTheCommand(报告临时目录里有lithe-command-install-*残留)单独重跑os.TempDir(),运行时本机另有一个其他会话的workbench.test在跑,对方的目录会被算进来;前者是负载下的时序问题desktop/:../scripts/desktop/desktop-go.sh test -race ./internal/workbench ./internal/core -run 'Title|Stripe|Chrome|Drag|Reduce|LogEvent' -count=1gofmt -l desktop/internal/workbench desktop/internal/coredesktop/:LITHE_VISUAL_OUTPUT_DIR=… ../scripts/desktop/desktop-go.sh test -tags vivahead,lithevisual ./internal/workbench -run '^TestVisualTitleButtonsOnStripes$' -count=1 -timeout 300scargo test -p lithe-core-rules chrome_layout、cargo clippy -p lithe-core-rules --all-targets -- -D warnings、cargo fmt -- --checknode scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/desktop/verify/verify-runtime-bundle-immutability.shrg(develop-lithe第三节)未能执行的检查和原因:
pending。提交前确认 / Final checks
main创建,并已合并最新main(831e21068);目标分支main