Skip to content

refactor(workbench): one quiet composer toolbar - #2388

Merged
DeliciousBuding merged 2 commits into
masterfrom
feat/composer-cleanup
Oct 19, 2026
Merged

DeliciousBuding merged 2 commits into
masterfrom
feat/composer-cleanup

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

What changed

The composer was three stacked rows of the same two facts: a mainchain pill strip (Agent 未选 / 目标 … / 需填写内容), a bordered toolbar repeating the same agent and target pickers, and a bulleted status list repeating the target a third time. Plus an Enter keycap that looked like a button. Screenshot proof of the "before" state is in the issue thread.

Now it is one card: input on top, one flat toolbar at the bottom, one quiet status line under it.

  • Mainchain strip deleted (component + four label helpers + mainchainStrip chrome flag + the derived-state fields that only fed it). The pickers already render the same labels, and the disabled send button already carries the blocker.
  • Pickers are content-sized ghost controls. The native <select> now overlays the visible label invisibly, so the chevron sits next to the text instead of floating at the end of a fixed 9.5–11rem box.
  • Enter keycap and the toolbar divider removed; the toolbar sits flush right against the send button.
  • Status telemetry collapsed from bullets on two wrapped lines to one truncating line at 60% muted ink.
  • Underlying bug fixed: the hand-rolled *, *::before, *::after { margin: 0; padding: 0 } reset in tokens-base.css was unlayered, so it beat every @layer utilities rule. Every Tailwind margin utility in the repo (mx-auto, ml-auto, mb-1, space-*) was silently a no-op. The reset now lives in @layer base; that is why the send button finally sits on the right edge.

Verification

  • tsc -b shared / workbench / web: clean.
  • Vitest: shared 151 files / 2758 tests, workbench 163 / 1605, web 33 / 275 — all pass (347 files / 4638 tests).
  • lint:css (stylelint, fail-closed) clean; eslint 0 errors (pre-existing warnings only).
  • verify-doc-ssot.py ok; git diff --check clean.
  • Web visual QA shell gate: 4 shots, overflow=false in all, re-run after the reset change to prove the newly-effective margins did not shift the rest of the shell.
  • Chat capture (visual:qa:chat): 1440x810 light+dark, 768x900, plus composer empty / multiline / mention / approval / attachment states in both themes; contract overflow=false.

Notes

The two composer integration tests that asserted the removed strip's strings now assert behaviour instead: mention chip present, target select holds the chosen id, send disabled until there is text.

DeliciousBuding and others added 2 commits October 20, 2026 01:16
An unlayered *, *::before, *::after { margin: 0; padding: 0 } reset wins over every @layer utilities rule, so m-*, mx-auto and space-* silently did nothing. Move the reset into @layer base and note the invariant in the design-system SSOT.

Co-authored-by: Codex <codex@delicious233.com>
The composer stacked a mainchain pill strip, a bordered toolbar and a bulleted status list under the input: three rows restating the same agent/target/readiness facts, plus an Enter keycap that read as a button.

- Drop the mainchain strip; the agent and target pickers already show the same labels and the disabled send button carries the blocker.
- Delete the strip component, its four label helpers, the chrome flag and the derived-state fields that only fed it.
- Pickers become flat ghost controls sized to their content; the native select overlays them invisibly so the chevron sits next to the label instead of at the end of a fixed-width box.
- Status telemetry collapses to one truncating line at 60% muted ink.

Co-authored-by: Codex <codex@delicious233.com>
@DeliciousBuding
DeliciousBuding merged commit 40adc96 into master Oct 19, 2026
33 checks passed
@DeliciousBuding
DeliciousBuding deleted the feat/composer-cleanup branch October 19, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant