Repository navigation
refactor(window): 优化窗口置顶装配体验、交互稳定性与非Windows环境零影响 - #234
Merged
lioensky merged 1 commit intoOct 6, 2026
Merged
Conversation
- [装配边界收敛] 仅面向加载 preloads/utility.js 的官方受管子窗口(超级骰子、音乐、备忘录等),废除对非受管沙箱的不稳定注入 - [深度休眠机制] 优化 utility 窗口的 MutationObserver 挂载机制,装配完成后断开整树监听,收敛为极浅层观察,正文渲染 0 消耗 - [非Win环境零影响] Preload 层暴露同步 canPin 本地门禁,macOS/Linux 首帧即保持原生 3 键布局,无 IPC 往返、无 DOM 插入、0 资源开销 - [单向广播与通道隔离] 状态由主进程 window-pinned-changed 广播统一驱动,避免 executeJavaScript 抢占 V8 微任务栈,内置 150ms 防连击锁 - [拖拽节流与防抖重排] 引入硬件级拖拽节流,移动期间仅首帧提升一次,松手 120ms 后按 AABB 碰撞面积自动重排,杜绝高频 CPU 占用 - [测试全绿] Preload 注册表契约、窗口置顶调度与 UI System 测试全部 PASS
Ldl-h
force-pushed
the
feat/window-pin-governance-and-parity
branch
from
October 6, 2026 17:15
2c4fac8 to
6b8fd07
Compare
RoxyAsahi
pushed a commit
to RoxyAsahi/VCPChat
that referenced
this pull request
Oct 7, 2026
… literal colour check:ui-system was red on the side pane branch. tool-presentation.css had 101 selectors outside .vcp-ui-scope, an !important on the reduced-motion rule and two fixed 11px sizes; components.css (from upstream lioensky#234) fell back to a hard-coded indigo because --vcp-ui-primary is not a token. Every tool presentation selector now sits under .vcp-ui-scope (the chat messages container already carries it, and the file is alone in its layer, so the uniform specificity bump changes no cascade). The reduced-motion rule reuses the shimmer selector instead of !important, the 11px sizes use --vcp-ui-text-xs, and the pinned window button uses the accent token. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCGGgmHsCToooXTgSXpmq9
RoxyAsahi
pushed a commit
to RoxyAsahi/VCPChat
that referenced
this pull request
Oct 7, 2026
… literal colour check:ui-system was red on the side pane branch. tool-presentation.css had 101 selectors outside .vcp-ui-scope, an !important on the reduced-motion rule and two fixed 11px sizes; components.css (from upstream lioensky#234) fell back to a hard-coded indigo because --vcp-ui-primary is not a token. Every tool presentation selector now sits under .vcp-ui-scope (the chat messages container already carries it, and the file is alone in its layer, so the uniform specificity bump changes no cascade). The reduced-motion rule reuses the shimmer selector instead of !important, the 11px sizes use --vcp-ui-text-xs, and the pinned window button uses the accent token. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCGGgmHsCToooXTgSXpmq9
RoxyAsahi
pushed a commit
to RoxyAsahi/VCPChat
that referenced
this pull request
Oct 7, 2026
… literal colour check:ui-system was red on the side pane branch. tool-presentation.css had 101 selectors outside .vcp-ui-scope, an !important on the reduced-motion rule and two fixed 11px sizes; components.css (from upstream lioensky#234) fell back to a hard-coded indigo because --vcp-ui-primary is not a token. Every tool presentation selector now sits under .vcp-ui-scope (the chat messages container already carries it, and the file is alone in its layer, so the uniform specificity bump changes no cascade). The reduced-motion rule reuses the shimmer selector instead of !important, the 11px sizes use --vcp-ui-text-xs, and the pinned window button uses the accent token. (Ported from 2200d12 on the integration PR; components.css part dropped because the pin rule it touched is not on this branch.) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SADzqzusVz3S3z7qBUSy8M
RoxyAsahi
pushed a commit
to RoxyAsahi/VCPChat
that referenced
this pull request
Oct 7, 2026
Second half of 2200d12 from the integration PR: the pin rule arrived with the upstream lioensky#234 merge, so it now applies here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SADzqzusVz3S3z7qBUSy8M
RoxyAsahi
pushed a commit
to RoxyAsahi/VCPChat
that referenced
this pull request
Oct 7, 2026
…s.css fix The base now carries upstream lioensky#234, whose components.css falls back to a literal colour, so check:ui-system was red again on the merge. Both files now match 2200d12 on the integration branch (#2), which fixes that and scopes the tool card styles, so the two branches merge without a conflict. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019DFRovoZHMzeheXKkLNWKG
RoxyAsahi
pushed a commit
to RoxyAsahi/VCPChat
that referenced
this pull request
Oct 7, 2026
… literal colour check:ui-system was red on the side pane branch. tool-presentation.css had 101 selectors outside .vcp-ui-scope, an !important on the reduced-motion rule and two fixed 11px sizes; components.css (from upstream lioensky#234) fell back to a hard-coded indigo because --vcp-ui-primary is not a token. Every tool presentation selector now sits under .vcp-ui-scope (the chat messages container already carries it, and the file is alone in its layer, so the uniform specificity bump changes no cascade). The reduced-motion rule reuses the shimmer selector instead of !important, the 11px sizes use --vcp-ui-text-xs, and the pinned window button uses the accent token. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCGGgmHsCToooXTgSXpmq9 (cherry picked from commit 2200d12)
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.
变更说明 (Overview)
针对此前贡献的窗口置顶(Always-On-Top)与层级调度功能做进一步的体验优化与稳定性收敛:
详细改动 (Details)
装配边界收敛,消除事件死锁
VCPUI.WindowControls原生受控,二是通过utility.js精确装配超级骰子、音乐、备忘录等官方独立窗口;对于非受管沙箱窗口保持纯净,不再做外部注入。
DOM 监听深度休眠 (Deep Sleep)
pinButton.js的挂载状态机:置顶按钮在标题栏装配成功后,立即断开全局MutationObserver监听,仅对直接容器保持极浅层监控;非 Windows 平台物理级零影响
utilityAPI.canPin(),首帧在 V8 内部计算完成(win32 && !isEmbeddedSurface),无需异步 IPC 往返;单向事件流驱动与通道隔离
wc.executeJavaScript字符串注入,统一改为轻量 IPC 广播(window-pinned-changed),避免争抢渲染端 V8 微任务栈;拖拽硬件级节流与防抖排序
测试验证 (Verification)
tests/preload-registry.test.jsPASS (100%)tests/window-pin-service.test.jsPASS (100%)scripts/test-ui-system.mjsPASS (100%)