Skip to content

fix: add transitions to open-in menu - #5219

Merged
chengluyu merged 3 commits into
MoonshotAI:mainfrom
kimi-agent-bot:fix/open-in-menu-transition
Nov 22, 2026
Merged

chengluyu merged 3 commits into
MoonshotAI:mainfrom
kimi-agent-bot:fix/open-in-menu-transition

Conversation

@kimi-agent-bot

@kimi-agent-bot kimi-agent-bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Requirement or Bug

Desktop 和 Web 的「在其他应用打开」菜单在打开和关闭时直接出现或消失,缺少过渡动画。本 PR 为菜单补上透明度的渐入渐出效果。

Bug Reproduction Steps

  1. 打开一个本地工作区。
  2. 点击「在其他应用打开」按钮右侧的下拉箭头,观察菜单出现的过程。
  3. 点击菜单外部或调整窗口大小,观察菜单关闭的过程。
  4. 修复前,菜单在两种操作中都立即出现或消失。

Root Cause

OpenInMenu 直接通过 v-if 挂载和卸载 Menu,没有用 Transition 包裹,也没有进入和离开状态的样式。本 PR 直接补齐缺失的过渡,不改变菜单的打开、关闭和项目选择逻辑。

Code Changes

  • 在 OpenInMenu 的 Menu 外层加入 Transition,复用现有 menu-pop 命名。
  • 进入时使用标准时长,离开时使用快速时长,仅改变透明度;离开期间禁用指针事件,不加入位移动画。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
「在其他应用打开」菜单的打开和关闭 立即出现或消失 透明度渐入渐出 Desktop 和 Web 中使用本地工作区或本地文件预览的用户 不需要;仅补齐视觉效果
  • 影响模块:packages/app-components 中的 OpenInMenu,由 Desktop 和 Web 共用。
  • 菜单目录加载、应用选择、快速打开、复制路径、点击外部关闭和 Escape 关闭逻辑均未改变。
  • 验证:openInTarget 13 条测试通过;Desktop 类型检查通过;全仓 lint 通过;重复代码检查通过。
  • 本次属于查缺补漏,不新增 changeset,不更新用户文档。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 280c878

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T07:32:42.193597Z 280c878 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@280c878
npx https://pkg.pr.new/@moonshot-ai/kimi-code@280c878

commit: 280c878

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdb4d95da5

ℹ️ 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".

:key="target.id"
:active="target.id === quickTargetId"
@click="handleOpenTarget(target.id)"
<Transition name="menu-pop">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add the missing Desktop changeset

For Desktop and Web users opening a local workspace or file preview, this changes the menu from appearing immediately to fading in and out, but the commit contains no .changeset file. Because kimi-code-app changesets feed the Desktop release notes and update dialog, this user-visible fix would ship without the required changelog entry; add a patch changeset for kimi-code-app.

AGENTS.md reference: AGENTS.md:L170-L170

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 280c87829e

ℹ️ 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".

:key="target.id"
:active="target.id === quickTargetId"
@click="handleOpenTarget(target.id)"
<Transition name="menu-pop">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add regression coverage for the menu transition

This is explicitly a bug fix, but the commit only changes the production component and adds no test that mounts OpenInMenu; the existing openInTarget tests cover target selection logic, not whether opening and closing retains the menu long enough for the enter/leave transition. Add a component test that opens the menu and then closes it (for example via an outside click) and asserts the transition state, so removing this wrapper does not silently reintroduce the original immediate disappearance.

AGENTS.md reference: AGENTS.md:L60-L60

Useful? React with 👍 / 👎.

@chengluyu
chengluyu merged commit e12cad1 into MoonshotAI:main Nov 22, 2026
30 checks passed
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Nov 25, 2026
…C preload

Wrap the open-in menu in the upstream menu-pop transition with the
opacity-only enter/leave rules (MoonshotAI#5219), and preload Composer.vue before the
composer menu viewport tests so the first test does not pay for the lazy SFC
compile under Vitest (MoonshotAI#5149). Ledger: 4821 equivalent, 5160 and 5286
not-applicable, 5149 and 5219 ported.
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.

2 participants