Repository navigation
fix(desktop): keep plan revision editor visible - #5537
Conversation
🦋 Changeset detectedLatest commit: 61f4aa5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5aa10b3d97
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Requirement or Bug
Desktop 与 Web 用户在审批较长 plan 时,点击“修改”后,反馈编辑框可能被压缩到只剩约一行高度,输入内容仍然成功,但编辑区域难以查看和操作。本 PR 让反馈编辑区始终保持完整的三行初始高度,空间不足时由上方 plan 区域滚动让位。
此改动来自内部缺陷报告,没有关联的外部 issue。原始录屏包含真实会话内容,因此未作为公开 PR 素材上传。
Bug Reproduction Steps
Revise。Root Cause
审批卡使用受限高度的纵向 flex 布局。正文的所有直接子项都设置为
flex: 0 1 auto; min-height: 0,plan 区域再使用flex: 1填充空间,反馈区因此也会在卡片达到高度上限后参与收缩。textarea 的
min-height无法阻止祖先 flex item 变小;反馈区内层又使用overflow: hidden,所以 textarea 并未真正变小,而是被祖先裁掉。这是布局分配错误,不是自动增高逻辑或动画时序问题。本 PR 直接修正 flex 与滚动职责,是根本修复,不通过延迟、重试或隐藏 plan 来绕过问题。
Code Changes
has-feedback状态,只在此期间启用正文滚动兜底。flex: none,使长 plan 优先让出空间并内部滚动。kimi-code-apppatch changeset。根据 PR 讨论,本 PR 不保留只能检查 CSS 文本的 jsdom 布局断言,也不新增 UI E2E。现有 Desktop plan 审批旅程继续验证完整交互流程,但不把它表述为真实可见高度的布局回归测试。
Behavior Changes and Affected Users
feedbackOpen时生效受影响模块与覆盖:
ApprovalCard.vue:编辑态 class、flex 优先级和滚动兜底。验证记录
pnpm exec vitest run --reporter=agent apps/desktop/tests/renderer/chat-dock-approval.test.ts:保留的原有测试 1 passed。pnpm --filter kimi-code-app run typecheck:renderer:通过。pnpm lint:通过,0 warnings / 0 errors。pnpm --filter kimi-code-app run e2e --project=approvals-state --no-deps approval-plan-review.spec.ts:构建通过,1 passed。pnpm run check:duplication 0235ca0c06d0f80ea8324c3cb557c4fe99ce1403:通过,无新增重复。Checklist
gen-changesetsworkflow and added a Desktop patch changeset.