fix(asktool): paint the dock question card on the composer plate (#360) - #488
Merged
Merged
Conversation
Issue #360 item 1 ("选择交互面板缺少背景色") reads as a panel with no background because the question card is mounted in the transparent composer dock (Composer.tsx renders it as a direct `.composer-stack` child) yet still painted the in-flow `--ds-tile` wash: a 3.5% ink mix with no shadow, measured at `#f7f7f7` on the reporter's light-theme screenshot. The dock rule's own comment already claimed the card "uses the same decision surface as Plan and Goal approval", while `.plan-approval-bar` in that exact slot paints `--ds-bg-composer` with `--ds-shadow-composer` (`04-ux/03-permission-ux.md` §9, `04-ux/08-component-spec.md` §11.5). - `.composer-stack > .asktool-card` now paints that plate in both palettes. - Its option rows and custom input move to the plate's inlaid tier (`--ds-tile-deep`, no raised shadow) — the layer `.plan-approval-split` already uses on that same plate — so the rows cannot be white on white in the light palette, where `--ds-raised` and `--ds-bg-composer` are both `#ffffff`. The 15 px option mark keeps `--ds-tile-deep`, the sidebar checkbox's mark. - Tokens only: a contributed theme moves the plate and the rows with `--ds-bg-composer` / `--ds-tile-deep`. No protocol, storage, host, permission, migration, or preference change, and no new default (D435). - E2E-078's Chromium probe now renders the dock card and asserts the built-in paint, the shadow, and the contributed-variable cascade in light and dark; `permission-inline.test.mjs` asserts the dock rule and the inlaid rows. Refs #360
Two doc files collided on append (the decisions log and its zh-CN mirror). Main's entry is kept and this branch's entry follows it, renumbered D435 -> D437: D435 is already claimed by feat/chat-wide-layout, so the next free number after main's D436 is the honest choice. The design-system and E2E-plan citations were updated to D437.
Owner
Author
|
Renumbered at integration: the decision entry was D435, but |
Closed
This branch was successfully deployed
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.
Summary
Issue #360 bundles five items. Per the earlier triage (owner's comments + PR #439), item 5 is fixed and items 2–4 are visual taste or product decisions. This PR resolves the one item that is a provable spec/code contradiction — item 1, "选择交互面板缺少背景色".
Item 1: the panel is not missing a background, it is painted on the wrong one
The question card is mounted in the transparent composer dock (
Composer.tsxrenders it as a direct.composer-stackchild; the transcript mount is gone), yet it still painted the in-flow--ds-tilewash — a 3.5% ink mix with no shadow. In the reporter's screenshot that is a#f7f7f7panel on a#ffffffpage (measured from the JPEG: dominant interior#f7f7f7, option rows#ffffff, i.e. exactly--ds-tileover white).Meanwhile the same slot's rule claims otherwise, and so does the spec:
composer.css: "Asktool uses the same decision surface as Plan and Goal approval."04-ux/03-permission-ux.md§9 /04-ux/08-component-spec.md§11.5: a card in the transparent composer dock "paints--ds-bg-composerwith--ds-shadow-composerrather than the in-flow--ds-tilewash"..plan-approval-bar— the card that actually sits in that slot — does paint--ds-bg-composer+--ds-shadow-composer. The question card did not.Fix
.composer-stack > .asktool-cardnow paints that plate, in both palettes.--ds-tile-deep, raised shadow dropped) — the layer.plan-approval-splitalready uses on that same plate. Without that flip the rows would be white on white in the light palette, where--ds-raisedand--ds-bg-composerare both#ffffff. The 15 px option mark keeps--ds-tile-deep(the sidebar checkbox's mark), which reads against the inlaid row exactly as it does against the sidebar.Tokens only, no literals: both layers are existing
--ds-*tokens defined in both palettes, so a contributed theme moves the plate and the rows. Renderer only — no protocol, storage, host, permission, migration, or preference change, and no new default (D435). The transcript/base.asktool-cardrules are untouched.What the other items did not get
#f3f3f3vs#ffffffin light,#000000vs#181818in dark). The screenshots measure a ~4.7% light-theme difference, i.e. a contrast judgement, and the one byte-identical pair (--ds-bg-dock-raised=--ds-bg-primary=#ffffffin light) is documented and intentional (D419, and the 46px chrome band rule). Changing either value changes the built-in look, so it needs the maintainer's call — not a drive-by edit.summonWindow(Mod+Shift+W) is deliberate as the symmetric counterpart ofcloseWindow(Mod+W, D384,04-ux/09-interaction-patterns.md§1.1, and a macOS menu accelerator). Merging removes or repurposes a user-visible default.groupSidebarSessionsByTime: today is headerless, then yesterday / this week / older 14d / archived); the temporary-session list does not, and the sidebar header has no new-session control at all (data-action="new-standalone-session"sits inside the scrolling section). New UI + information architecture, so it needs a decision.Validation
pnpm --filter @pi-desktop/desktop typecheckpnpm build:jspnpm lint(biome +check-style-tokens.mjs)style tokens OKpnpm --filter @pi-desktop/desktop testpnpm docs:checknode scripts/check-architecture.mjspnpm test:e2e:theme-surfacesasktoolCard/asktoolOptionsurfacespnpm test:e2e:layoutPI_DESKTOP_HOST_BINpointed at a built host-core)The Chromium probe is the real verification: built-in paint, the composer shadow, and the contributed-variable cascade are asserted for both palettes, and
permission-inline.test.mjsasserts the dock rule and the inlaid rows so the plate cannot silently regress. Captured renders (PI_E2E_ARTIFACT_DIR) show the layering in both palettes at 2x:.composer-stack > .asktool-card)#ffffff+ composer shadow#212121(96%#212121) + composer shadow#ededed(8% ink)#333333(8% white)#d8d8d8#474747#ededed#333333Evidence strength: computed styles, real Chromium render, and pixel measurements of that render — all green and identical in structure across palettes. No human eyeballed the app window (the change is CSS-only and Electron was exercised through the E2E harness, not by hand).
Refs #360