Repository navigation
feat(desktop): 省略文字全文提示改为页面开启,并按区域朝向内容显示 - #2440
Merged
Merged
Conversation
…ontent Viva's full-text tooltip for text cut short with an ellipsis is now off by default (upstream vivaui/viva#454) and opens on a side a container chooses. - Pin Viva to fork PR Lithe-IDEA/Lithe-viva#64 head 600e6846 until it merges into fork main. - Turn the tooltips on in the PageConfig of the main window, the settings window and the log window, and in the plugin view test pages. - Open them toward the editor from tool windows (right from the left slots, left from the right slots, above from the bottom area), above from the status bar, and to the right from the settings and log window sidebars, so they no longer cover the next rows of a list. - Test the side in each region, capture each region in both themes and both languages, and update the agent note, the feature matrix entry and the screenshot README.
xiaoyumuxi
marked this pull request as ready for review
November 26, 2026 10:03
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 3 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
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
1397af69,可选开启 +EllipsisTooltipOn方向),同步进 fork 的 PR 是 merge: replace the default-on ellipsis tooltip with upstream #454's opt-in one Lithe-IDEA/Lithe-viva#64(head600e6846)。PR 类型 / Type
改动说明 / What changes
背景 / Why
#2418 让以“…”结尾的文字在悬停时显示全文,但提示框一律开在文字下方。在侧栏和工具窗口里,文字下方就是同一列表的下一行,提示会把它们盖住;底部工具窗口更不一致,上面几行开在下方,靠近窗口底边的行放不下才翻到上方。
同时,上游评审要求这项能力在 Viva 里默认关闭,由页面自己开启(vivaui/viva#454)。fork 同步上游后,Lithe 不开启就没有全文提示。
本 PR 让 Lithe 的三个窗口开启全文提示,并按区域指定提示方向:朝向内容,不压住相邻的行。
改动 / Changes
Viva 固定版本(临时)
desktop/go.mod、desktop/go.sum:replace从 fork main7696355e换成 fork PR merge: replace the default-on ellipsis tooltip with upstream #454's opt-in one Lithe-IDEA/Lithe-viva#64 的 head600e6846(v0.6.10-0.20261126085257-600e6846f15a)。fix(maven): detect projects below workspace root #64 合入 fork main 后,要换成 main 上的合并提交再合入本 PR。开启全文提示(
PageConfig.EllipsisTooltips: true)workbench/root.go、设置窗口settingswindow/window.go、日志窗口logwindow/window.go。pluginview/render_test.go、pluginview/view_visual_test.go有自己的PageConfig,单独开启。按区域指定方向(
EllipsisTooltipOn)workbench/shell_view.go:新增slot.tooltipSide(),在shellPanel上设置workbench/chrome_view.go:状态栏行settingswindow/window_view.go:侧栏列logwindow/window.go:侧栏列测试
workbench/ellipsis_side_test.go(新):TestToolWindowEllipsisTooltipsOpenTowardTheEditor,用真实临时仓库把提交工具窗口放在左侧、右侧和底部,悬停被截断的长目录,检查全文和提示所在的一侧。TestStatusBarEllipsisTooltipOpensAbove,检查状态栏文件名的提示开在上方。settingswindow/ellipsis_side_test.go(新):TestSidebarEllipsisTooltipOpensToTheRight,英文侧栏里被截断的 “Build, Execution, Deployment” 的提示开在右侧。logwindow/ellipsis_side_test.go(新):TestSidebarChannelEllipsisTooltipOpensToTheRight,合成插件dev.example.*的长通道名的提示开在右侧。TestVisualCommitEllipsisSides(workbench)、TestVisualSidebarEllipsis(settingswindow,只截英文,因为中文侧栏没有被截断的内置页面名,已逐项确认)、TestVisualLogSidebarEllipsis(logwindow)。文档
docs/assets/ellipsis-hover-full-text/:新增 5 个区域的改动后拼图和对应的改动前拼图(*-before.png),README 增加“提示框开在哪一侧”表、“改动前后对照”表和新场景,删掉过时的“本地 modfile”说明,更新测试命令。.agents/notes/proposed/feature/2026-11-25-ellipsis-hover-full-text.md:按当前状态重写,写明页面开关、三个窗口都要开、方向表、Select 在开关关闭时的行为、依赖状态和风险。仍留在 proposed,等 fix(maven): detect projects below workspace root #64 合入并换成 fork main 的固定版本。ellipsis-hover-full-text.json:补证据路径、方向检查、新测试名,改写依赖说明。两端仍为 partial / pending。不在本 PR 范围内 / Out of scope
类型专属:feat
多平台对齐
pendingplatform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/ellipsis-hover-full-text.json:两端实现状态partial(固定在 fork PR 的 head 上)、验证状态pending,证据路径、owner、验证动作如实填写./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第三节“插件归属与宿主零依赖”的自查命令,结果为空(第一次运行查出日志测试用了真实插件 ID,已改成dev.example.synthetic-language-support并重新截图)dev.example.*名称,提交工具窗口用测试创建的临时仓库UI 验证 / UI evidence
2f6b8d30f;场景为提交工具窗口在左侧、右侧、底部,设置窗口侧栏,日志窗口通道侧栏;深色和浅色主题;中文和英文(设置侧栏只有英文会截断);主窗口为默认尺寸 1280×800,日志窗口和设置窗口用各自的默认尺寸。命令见docs/assets/ellipsis-hover-full-text/README.mddocs/assets/ellipsis-hover-full-text/ui.TooltipBottom,截完后恢复代码,和改动前的 main 一样都开在下方。状态栏改动前就会翻到上方,没有对照图。原生窗口验收没做每张拼图上排深色、下排浅色,左列中文、右列英文(设置侧栏只有英文两张)。
提交工具窗口在左侧
改动前:开在文件行下方,有更多改动时会盖住后面的文件
改动后:开向右侧的编辑器
提交工具窗口在右侧
改动前:开在文件行下方,同上
改动后:开向左侧的编辑器
提交工具窗口在底部
改动前:开在下方,盖住“修订”和提交说明
改动后:开向上方的编辑器
设置窗口侧栏(英文,左深色 / 右浅色)
改动前:开在下方,盖住下一项 “Languages & Frameworks”
改动后:开在右侧的页面上
日志窗口通道侧栏
改动前:开在侧栏下方,越过侧栏边界
改动后:开在右侧的表格上
统一日志系统 / Structured logging
N/A:没有新增或改动生命周期、操作终态、降级或失败路径。
界面文案 / i18n
node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,都通过逻辑归属 / Logic placement
性能与内存 / Performance and memory
N/A:不涉及启动、打开项目、输入、滚动、大文件、长输出或搜索,也不改编辑器模块。指定方向只在容器上多存一个枚举值,提示仍只在悬停时排版。
设置 / Settings
N/A:没有新增或修改设置项。设置窗口只在侧栏列上指定了提示方向。
插件契约 / Plugin contract
N/A:不涉及插件契约、能力版本或宿主方法。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源、缓存或下载物;新增的 PNG 只用于代码评审,产品不加载。
无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/desktop-go.sh test -count=1 ./internal/logwindow/ ./internal/settingswindow/ ./internal/pluginview/ ./internal/workbench/(变基到最新 main 后)scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' -run '^TestVisual(...)$'(README 里的命令)ui.TooltipBottom,运行TestVisual(LogSidebarEllipsis|SidebarEllipsis|CommitEllipsisSides)截“改动前”的图,再用git checkout恢复gofmt -l四个包;scripts/desktop/desktop-go.sh vet -tags 'vivahead lithevisual'四个包node 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/agent-notes/verify-agent-notes.shrg命令状态栏测试的局限: 状态栏贴着窗口底边,不指定方向时提示也会翻到上方,所以
TestStatusBarEllipsisTooltipOpensAbove只能防止提示开到下方,不能证明显式设置本身生效。未能执行的检查和原因:
提交前确认 / Final checks
main创建(已变基到2eec684e6),目标分支main.artifacts/等产物,没有凭据和个人路径