fix(Log): CI 状态图标防闪烁 + 准实时刷新(颜色随 #40 已合入)#41
Merged
Conversation
- 闪烁根因:log/ciData 每次触发整块 innerHTML 重建、且 graphData 刷新清空 CI 缓存
导致重拉循环 → 全列图标反复消失重现。
- 就地补丁:新增 applyCiData 仅改受影响行 .ci 槽位(状态类不变时保留元素,旋转
动画不重启、零重绘),不再 renderedFirst=-1 重建可见行。
- 稳定缓存:graphData 不再清空 ciByHash(CI 状态以不可变 hash 为键),仅重置请求
去重集合,杜绝每次 git 状态变化引发的重拉。
- 准实时刷新:新增 20s 定时器仅复拉可见行中 pending(运行中)提交(host 30s TTL
网络门控),转终态后停拉;响应经 applyCiData 就地补丁,不闪烁。
- Tooltip 子项颜色:tipGlyph 包裹 .g-{state}(绿/红/黄/灰),与头部及行图标语义一致。
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
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.
背景
PR #37/#40 合入后,Log 视图 CI 状态图标存在两个体验问题:
log/ciData)都触发可见行整块innerHTML重建;且每次graphData刷新(如 Checkpointer 自动快照等 git 状态变化)都清空整个 CI 缓存,引发「清缓存 → 重拉 → 整行重建」的循环,导致红/绿图标反复消失重现。tipGlyph包裹.g-{state})修复并合入 base,本 PR 不再重复。修复(借助 UI/UX Skills 设计,遵循 reduce-reflows / content-jumping / state-transition / reduced-motion)
applyCiData:CI 数据到达时仅改受影响行的.ci槽位(replaceChild/appendChild),绝不重建整行/整页,从根源消除全列闪烁;状态类未变(如 pending 复拉、计数更新)时保留原元素,旋转动画不重启、零重绘。graphData刷新不再清空ciByHash(CI 状态以不可变 commit hash 为键,跨刷新有效),仅重置请求去重集合 —— 已缓存的提交重绘时立即可见图标,杜绝每次 git 状态变化引发的重拉。applyCiData就地补丁,pending→终态切换不闪烁。变更范围
src/adapter/webview/log-webview.ts(+78 / −15),cherry-pick 自工作分支修复 commit,干净叠加于 base(含 feat(Log): 提交记录显示 GitHub CI 最终状态(绿勾/红叉 + 悬停 Tooltip 明细) #37/feat(Log): Log 视图新增 Checkpointer 选项并默认剔除自动快照提交 #38/chore(Release): 发布 v0.0.5 首个 MVP 正式版 #39/fix(Log): CI Tooltip 各检查项状态图标按通过/失败/运行中上色 #40),冲突仅为一行注释,已解决。验证
pnpm run check-types+pnpm run lint+pnpm run test:unit(280 项)全绿。origin/feature/1.x.x最新(c9f6dd4,已含 fix(Log): CI Tooltip 各检查项状态图标按通过/失败/运行中上色 #40 上色修复)。🤖 Generated with Claude Code