Skip to content

refactor(composer): project and branch join the footer control row - #2168

Merged
jackwener merged 1 commit into
mainfrom
pr-composer-workspace-chips-12
Aug 4, 2026
Merged

refactor(composer): project and branch join the footer control row#2168
jackwener merged 1 commit into
mainfrom
pr-composer-workspace-chips-12

Conversation

@jackwener

@jackwener jackwener commented Aug 4, 2026

Copy link
Copy Markdown
Member

会话态的连带影响

.maka-composer-left-controls 是新会话和会话态共用的。wrap 现在真的会生效,所以会话里控件较多时(+ · 盾 · 模型切换 · 思考 · 最多三个 mode 标记)也会换行、行高变高,而不是像以前那样溢出到发送按钮下面和卡片外。这是严格变好,不需要额外处理。

标注一下证据等级:四档视口的表是实测;这一段会话态的推论是从同一条 CSS 规则和会话态控件数推出来的,没有单独跑截图

The project and branch pickers sat on a bar of their own above the composer
card while every other send-context control — the + menu, the permission
shield, the model chip — lived in the card's footer row. Same kind of thing,
two addresses, and the pair outside the card read as leftovers rather than
controls. Their menu opened from that bar into empty canvas, which is the
anchoring complaint; moving the trigger fixes the menu with it.

Now they render in `maka-composer-left-controls` after the model pair and
ahead of the mode marks, sharing the row's chip dialect and gap. The menu
internals are untouched.

ComposerWorkspaceRow becomes ComposerWorkspacePickers and returns a fragment
instead of a wrapper div: "row" is the concept being deleted, and the control
row already owns the gap, so a wrapper would be a second spacing authority.

Narrow windows needed a fix to go with it. `maka-composer-left-controls` was
`flex: 0 0 auto`, which sizes to max-content and leaves the `flex-wrap: wrap`
beside it nothing to wrap inside — the row overflowed instead, under the send
button and past the card edge. Invisible with four controls; the pickers add
~224px and a 480px window has a 355px card. It shrinks now, so the row wraps.

Also drops a comment stranded above the deleted rule that described a
"composer send button" fill; no such rule exists anywhere in the file.

Verified: build, typecheck, format:check, lint, dead-css, check:release, and
the @maka/ui suite. Real-window capture at 480/600/760/1100 shows no cluster
overlap and nothing past the card edge; 480 and 600 wrap to two lines, wider
stays one. The active-session test now asserts the picker's own class — the
class it named before was the deleted dock, which would have made it pass
against any markup at all; fault injection confirms it fails without the guard.
@jackwener

Copy link
Copy Markdown
Member Author

Review by maka-审美专家 — 通过:项目/分支 picker 迁入 composer 控制行 chip 方言,孤行及 CSS 删净;预览两态对比过审(一条控制线 / 菜单 chip 锚定)。窄宽度核查挖出既有 flex 死 wrap 缺陷并根治(flex:1 1 auto + min-width:0 + 为何 wrap 曾是死的注释,四档视口实测表);测试从 doesNotMatch 死断言改为位置钉死断言并经故障注入验证会咬。三个自主判断(改名/fragment/孤儿注释)均批准。PR 描述的证据分级(实测/推算标注)符合 #150 立的规矩。CI 11/11 全绿。合入。

@jackwener
jackwener merged commit 3db6bd3 into main Aug 4, 2026
11 checks passed
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