refactor(composer): project and branch join the footer control row - #2168
Merged
Conversation
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.
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 全绿。合入。 |
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.
会话态的连带影响
.maka-composer-left-controls是新会话和会话态共用的。wrap 现在真的会生效,所以会话里控件较多时(+ · 盾 · 模型切换 · 思考 · 最多三个 mode 标记)也会换行、行高变高,而不是像以前那样溢出到发送按钮下面和卡片外。这是严格变好,不需要额外处理。标注一下证据等级:四档视口的表是实测;这一段会话态的推论是从同一条 CSS 规则和会话态控件数推出来的,没有单独跑截图。