Files
Genarrative/apps/ai-game-creator-shell/tests
suzmii 870d6457bc
Project CI / Backend tests (pull_request) Failing after 26s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m45s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m30s
Project CI / Repository checks (pull_request) Failing after 14s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m4s
Project CI / Frontend tests (pull_request) Successful in 2m51s
Project CI / AI game creator shell web tests (pull_request) Failing after 4m12s
Project CI / Native shell tests (pull_request) Successful in 10m32s
输入区工具条改回唯一一行:润色钮并入工具条,nowrap + 实测 min-width
- 口径:工具条只允许一行——`@` / `+` / 「AI 润色 / 恢复原文」/ 模型 / 语音 / 发送 六颗控件平铺,任何面板宽下都不换行、不堆叠、不重叠;宽度不够时按 `min-width` 横向溢出可见,发送钮仍在可视区内
- 换行来源(首轮为「避免重叠」加的 wrap):styles.css:11893 `.project-chat-composer-controls`(6 类)`flex-wrap: wrap`、styles.css:11933 `.project-chat-composer-controls-left` `flex-wrap: wrap`、styles.css:13747 `.conversation-model-select` `flex-wrap: wrap` → 三处都改 `nowrap`;左组补 `flex: 0 0 auto`(固定 28px 动作钮不参与收缩,否则槽位被压窄会把润色钮挤到模型钮上)
- 润色钮进工具条:`ResourceReferenceInput` 新增 `actionsPortalTarget`(portal 目标,不传时行为不变,策划面照旧),`DirectProjectComposer` 在左组 `+` 之后放挂点 `.project-chat-composer-controls-actions` 并传入 → 空输入态不再为它留一行;输入盒第二行只剩「润色状态」(无内容时 0 高,`gap` 的 row 分量 6→0、状态自带 `margin-top: 6px`)
- min-width 算式(落到两个元素):控件排 `.project-chat-composer-controls` = `@`28 + `+`28 + 润色28 + 模型钮 64(`min-width: 64px`,名字省略号)+ 语音28 + 发送28 = 204,加 5×8px 列间距 = 244,再留 8 余量 → **252px**;外壳 `form.project-chat-composer.is-direct-codex` = 252 + 左右内边距 12×2 + 边框 1×2 → **278px**。夹具实测:自然宽度 290.4、七档(240…900)控件 `top` 差值 ≤1px、两两相交 0 处、`outsideControlsRow` 空
- 低于 min-width:外壳保持 278px、**内容按自身宽度溢出可见**(面板与 composer 都不裁切,选它而不是给工具条 `overflow-x: auto` 是因为工具条里挂着模型菜单浮层,加滚动容器会把它裁掉——#600 的老问题);240px 实测发送钮 rect 仍在窗口内且 `elementFromPoint` 命中它
- 测试:`chatDialogFrameLayout.test.ts` 新增「工具条只有一行…」——七个宽度下 `flex-wrap` 必须 `nowrap`(右组本来就不换行)、控件排 `min-width: 252` / 外壳 `min-width: 278`、组件源码里润色钮渲染在控件排之后的挂点;最高高度算式按新结构更新为 222。**改前红已记录**:把三个源文件 stash 回旧实现后单跑,`240px 下工具条必须保持单行: expected 'wrap' to be 'nowrap'` 与 `expected 228 to be 222` 两条同时红
- 校验:`npx vitest run tests/appSurface.test.ts tests/chatDialogFrameLayout.test.ts` → **225 passed / 9 skipped**;`agc:typecheck` pass 3 / fail 0;eslint、prettier、encoding 5280 files、spacetime-schema 91 tables、`git diff --check` 全绿;对照图与 PR 正文已更新

Refs #600, PR #607
2026-10-06 00:19:17 +08:00
..