Repository navigation
fix(composer): fade the transcript instead of painting an opaque dock band - #1015
Merged
Merged
Conversation
Owner
|
Conflict resolution and validation update:
The remote JS Unit tests check is still red in |
… band `.composer-dock-docked` painted `--ds-bg-primary` across its full width to hide transcript rows that had scrolled below the floating shell (issue #728, D603). That band is a fixed built-in colour no theme region can reach: a theme that fills `.main-pane` or `.thread-scroll` got a hard-edged rectangle of the workspace colour across the bottom of the chat, and the only lever was `--ds-bg-primary` itself, which every other primary surface follows. The dock now paints nothing and `.thread-scroll` masks its own content out across the composer reserve, so a themed conversation surface stays visible behind the shell. The mask sits on the scroller rather than on `.thread-wrap` because the minimap rail, the jump-to-latest button, the settle veil and the navigation status are `.thread-wrap` children that must stay fully painted. Its stops are anchored to the same `dock-height + 16px` trailing reserve `.thread-content` already holds, so a transcript pinned to its end keeps its last row fully opaque and only rows crossing the boundary fade. The dock's own plates (ask-tool card, plan approval bar, queued prompts, shell) are opaque siblings of `.thread-wrap`, so they are unaffected. The theme surface regression now pins the dock to fully transparent and asserts the mask tracks `--composer-dock-height`; both assertions fail against the previous implementation. Renderer CSS, the regression probe and the matching spec/decisions entries only: no scroll state, protocol, persistence, theme schema, or permission change. refs #728
Keep the model picker light-mode shadow unchanged while routing it through the design-token guard, and express its unit line height with the existing leading scale so the current main lint gate passes.
…-transcript-jump The traffic-light-reserve test asserts that work-panel.css must not restate the traffic-light footprint literal. Use a calc expression based on --st-composer-dock-height instead.
vastsa
force-pushed
the
fix/composer-dock-themeable-occlusion
branch
from
September 24, 2026 17:42
fb0a857 to
4840b72
Compare
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.
问题
.composer-dock-docked横跨整幅宽度绘制不透明的--ds-bg-primary,用来遮住滚到悬浮胶囊下方 / 圆角外侧的转写稿行(#728 / D603)。它确实解决了「漏字」,但代价是:.main-pane(regionmain)或.thread-scroll(regionthread)时,聊天底部会出现一块硬边矩形;--ds-bg-primary本身,而所有其它主表面都跟着它走,改它等于全应用一起动。改动
apps/desktop/src/styles/composer.css.composer-dock-docked的background由var(--ds-bg-primary)改为transparentapps/desktop/src/styles/chat-shell.css.thread-scroll增加自渐隐遮罩,两个色标锚在--composer-dock-heightscripts/e2e/theme-surfaces.js、scripts/e2e-theme-surfaces.mjs--ds-bg-primary且不透明」,改为「停靠区必须全透明」+「遮罩随--composer-dock-height变化」;夹具补一个.thread-scrolldocs/spec/04-ux/08-component-spec.md、docs/spec/06-delivery/04-e2e-test-plan.md、docs/spec/08-meta/decisions-log.md(+docs/zh-CN镜像)为什么遮罩挂在
.thread-scroll而不是.thread-wrap:.thread-wrap的直接子节点不止滚动容器(ChatTranscript.tsx:224-359),还有.minimap-rail(bottom: dock+16px)、.jump-latest-btn(dock+12px)、.transcript-settle-veil(inset: 0)和.transcript-navigation-loading。挂在外层会把缩略导航和「跳到最新」按钮一起渐隐。为什么色标对齐
dock + 16px:.thread-content的底部预留正是padding-bottom: calc(dock-height + 16px)(chat-shell.css:258),所以滚到底时最后一行完全在渐隐带之上 —— 静止态零代价,只有滚动途中的行会淡出。输入框上方渲染面的核对结论
ask 工具卡片、Plan/Goal 审批条、排队提示、增强失败提示、输入胶囊都在
.composer-stack里,是.thread-wrap的兄弟节点,遮罩碰不到;而且它们本来就自带 composer 底板与投影 ——composer.css:52-62与563-566的注释明确写着「the dock itself is transparent, so this plate uses the composer elevated fill and shadow」。本 PR 等于把这些面板原本的设计前提恢复回来。自动补全面板、权限菜单、模型菜单 portal 到document.body,错误通知挂.chat-surface,均不受影响。验证
pnpm build:jsapps/desktop/out/renderer)pnpm test:e2e:composer-occlusionok:true,6/6 pass(light/dark × default/custom)pnpm test:e2e:theme-surfacesok:true,6/6 passpnpm --filter @pi-desktop/desktop typechecktranscript-style、theme-surface-tokens、home-empty-layout、macos-sidebar-vibrancy等)pnpm lint:biomepnpm check:pr-baseorigin/main21dcd3ddbb61是 HEAD 的祖先)E2E 实测输出:dock 计算背景
rgba(0, 0, 0, 0)、box-shadow: none;--composer-dock-height取 120px/200px 时遮罩色标偏移为[136, 118]/[216, 198],即h+16与h-2。反向验证:把旧实现(不透明带 + 无遮罩)塞回去再跑同一探针,断言立刻失败并报出
dock paints a backing band again、transcript mask is not a two-stop fade at 120px/200px: none—— 新断言确实能在旧代码上失败。未通过的检查(均与本 PR 无关,相关文件与
origin/main逐字节一致)pnpm lint:apps/desktop/src/styles/ui-kit.css:349使用字面量border-radius: 4px,被check-style-tokens.mjs判违规。pnpm docs:check:check:locales报04-ux/07-ui-design-system.md的中文镜像来源声明无效。apps/desktop全量node --test:2781 项中 82 项失败,集中在 macOS 签名 / 公证 / DMG staple、logger、npm 工具链等区域(Windows 上必然失败)。所有能观察到本改动的测试文件已单独跑过,115/115 通过。环境说明
宿主检出缺少
packages/voice-runtime等新包的node_modules,且两侧都没有 Electron 二进制:为在 worktree 内跑 E2E,我执行了一次pnpm install --offline --frozen-lockfile并补装 Electron 二进制(先安全移除了临时 junction)。主检出的node_modules未被改动(已验证 root / apps/desktop / docs 三处目标仍存在),且提交只包含上述 10 个文件。已知取舍
mask-image叠在will-change: scroll-position的滚动容器上,滚动性能建议在真机再确认一次。若掉帧,退路是把滚动区收在胶囊之上(纯布局方案),本 PR 未包含。.main-pane同色,观感不变)。备注
调研过程中发现的
packages/i18npt-BR 缺键问题,已由同时段合入的 #1011(fix(i18n): add missing pt-BR table action strings)修复。decisions-log.md里D603被两处占用(Windows portable ZIP 与本文所述的 dock 遮挡),本 PR 的新决策取D624,未改动既有条目。refs #728