Skip to content

Guard IME composition in the agent session rename input - #17988

Merged
88250 merged 1 commit into
siyuan-note:devfrom
mahirhir:fix-agent-rename-ime
Jul 3, 2026
Merged

Guard IME composition in the agent session rename input#17988
88250 merged 1 commit into
siyuan-note:devfrom
mahirhir:fix-agent-rename-ime

Conversation

@mahirhir

Copy link
Copy Markdown
Contributor

When you rename a session in the agent dock, the rename input commits on Enter and reverts on Escape. Its keydown handler does not check event.isComposing, so a composition-confirming Enter from an IME can reach the handler and blur the input, committing the rename with a half-composed title.

The search input in this same component already returns early on event.isComposing in its keydown handler. This change applies the same guard to the rename input so both inputs handle composition the same way. The check is a no-op when no IME is active.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents IME composition-confirming key events from prematurely committing an agent session rename. It aligns the rename input’s key handling with the existing composition-guard behavior already used by the search input in the same panel.

Changes:

  • Add an early return in the rename input keydown handler when KeyboardEvent.isComposing is true.
  • Ensure Enter/Escape commit/revert behavior does not trigger during active IME composition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@88250
88250 merged commit aee8d51 into siyuan-note:dev Jul 3, 2026
1 check passed
@88250

88250 commented Jul 3, 2026

Copy link
Copy Markdown
Member

感谢你的贡献,思源有你更精彩!
Thank you for your contribution. SiYuan will be more wonderful with you!

88250 pushed a commit that referenced this pull request Jul 4, 2026
Co-authored-by: greymoth <246701683+greymoth-jp@users.noreply.github.com>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants