Skip to content

fix(desktop): compact AskToolCard height, merge actions into header - #1292

Merged
vastsa merged 14 commits into
vastsa:mainfrom
mingkun968:fix/asktool-card-compact-height
Oct 2, 2026
Merged

vastsa merged 14 commits into
vastsa:mainfrom
mingkun968:fix/asktool-card-compact-height

Conversation

@mingkun968

Copy link
Copy Markdown
Contributor

压缩提问确认卡(AskTool)高度,把确认操作并入头部空白区,聊天输出不再被大面积遮挡。

改动(2 个文件,纯 UI,行为不变):

  • apps/desktop/src/components/AskToolCard.tsx:头部右侧新增操作组(全部拒绝/跳过/下一题/提交,size=sm),删除底部独占按钮行;题号并入问题同行;选项/自定义输入/多题状态/aria 逻辑原样保留。
  • apps/desktop/src/styles/messages.css:卡片 padding 收紧,选项区限高 320px/36vh→208px/24vh(内部滚动),选项字号 md→sm,圆点 8px→6px,头部单行排列(左:标题·进度·状态,右:操作组)。

验证:

  • pnpm --filter @pi-desktop/desktop typecheck 通过
  • pnpm --filter @pi-desktop/desktop lint(check-style-tokens)通过
  • biome lint 因仓库预置嵌套配置错误无法启动(与本改动无关,CI 为准)

vastsa added 2 commits October 2, 2026 08:49
Keep the layout regression assertion aligned with the reduced option viewport so the suite guards the current compact-card behavior.
@vastsa

vastsa commented Oct 2, 2026

Copy link
Copy Markdown
Owner

CI 当前失败项已定位并已在 PR 分支更新:permission-inline.test.mjs 仍断言旧的 320px / 36dvh,现在已调整为新布局的 208px / 24dvh,同时已把最新 main 合入;新集成检查正在运行。

另有一项合入前测试缺口:这次把“跳过 / 下一题 / 提交”按钮从卡片底部移入头部,改变了 DOM 与键盘 Tab 顺序。当前已有测试是源码/CSS 契约,没有覆盖用户经键盘或点击选择选项后推进问题、提交答案的组件交互路径。请补一条组件级交互测试,确认新的操作顺序下仍可完成选择、跳过和提交,再考虑合入。

The header absorbed every confirmation affordance, changing DOM and Tab
order. Mount the production AskToolCard in real Chromium against the real
store slice and walk select/next/submit, skip/submit, decline-all and a
custom answer, asserting the header Tab order and exact resolutions.
@mingkun968

Copy link
Copy Markdown
Contributor Author

交互测试缺口已补上(commit a6e3b3d),另把最新 main 合入:

  • 新增 pnpm test:e2e:asktool-card:沿用 transcript-minimap-jump 的真实 Chromium 模式,挂载生产 AskToolCard+真实 store 切片(仅 stub api.resolveAskTool),覆盖:头部 Tab 顺序(decline→skip→next、无底部旧按钮行)、选择→下一题→提交、跳过→提交(null 语义)、全部拒绝、自定义答案,共 4 次 resolve 断言精确答案,无渲染错误。本地已跑通。
  • 同步加了 E2E 计划文档条目(E2E-ASKTOOL-compact-card-interaction)和 package.json 入口。
  • 之前你推的 permission-inline 契约更新和 main 合并都在分支上,pnpm check:pr-base 通过。

vastsa and others added 7 commits October 2, 2026 11:52
* feat(storage): add safe custom data migration

Move desktop and Chromium state through a cold, verified migration so host and browser data stay consistent across drives. Keep the original roots as backups until explicit cleanup, and limit cache clearing to rebuildable paths.

* docs(adr): index custom storage decision

Keep the architecture decision discoverable and satisfy the docs index check.

* fix(i18n): keep Korean release notes aligned

Place the storage migration highlight in the current release so every locale has the same versioned highlight count.

* test(desktop): follow startup initialization ownership

Assert application identity and early error handlers where the startup split installs them, while preserving the logger wiring check in the composition root.
…pted-in default model

A spawn without a modelKey fell back to the provider default even when
that model was never enabled for AI delegation, so a plugin worker could
run on a model the Task gate would refuse for the same operation
(issue vastsa#1183). The fallback now only picks a model that carries the
availableForSubagents opt-in; with none enabled the spawn fails with
MODEL_NOT_CONFIGURED instead of silently spending an unapproved model.
The Pi 0.99.1 migration replaced the source-aware limit resolution in
enrichProvider's binding mapping with the raw catalog number, so a user
who pinned a 1M context window on a relay model saw the published 128k
value overwrite it on every read (issue vastsa#1176, spec §9.1: a user limit
is never replaced). resolveBindingLimits + modelConfigWithBinding are
restored for the mapping, while catalog-sourced windows keep following
published corrections.
fix(desktop): stop session-collaboration spawn from spending the un opted-in default model
Resolve catalog and user token limits through the provenance helper while keeping model capability shaping out of provider enrichment. This retains hand-typed model overrides and the existing enrichment boundary.
…mits

fix(desktop): keep user-pinned model limits across provider enrichment
@vastsa
vastsa merged commit 8d942ec into vastsa:main Oct 2, 2026
4 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.

3 participants