Skip to content

fix(kimi-web): full-width chat column and Ctrl+S save-dialog interception - #2369

Open
Tolik-Trek wants to merge 4 commits into
MoonshotAI:mainfrom
Tolik-Trek:fix/web-chat-width-ctrl-s
Open

fix(kimi-web): full-width chat column and Ctrl+S save-dialog interception#2369
Tolik-Trek wants to merge 4 commits into
MoonshotAI:mainfrom
Tolik-Trek:fix/web-chat-width-ctrl-s

Conversation

@Tolik-Trek

Copy link
Copy Markdown

Related Issue

None — the problems are explained below.

Problem

Two annoyances in the browser web UI (kimi web):

  1. On wide screens the chat column is capped at a fixed reading width, leaving large empty margins on both sides of the window. There is no way for the column to use the available width.
  2. The message input advertises "Ctrl+S to inject into the running turn", but the shortcut only calls preventDefault() while a turn is actually running. Pressing Ctrl+S / Cmd+S at any other time falls through to the browser, which opens its Save Page dialog.

What changed

  • The chat reading column now follows the pane width instead of a fixed pixel cap, so the message list and the composer dock use the full window width on large screens.
  • Ctrl+S / Cmd+S in the composer is always swallowed (preventDefault() moved out of the running check); steering into the running turn still only fires when a turn is actually running.

Both changes are confined to apps/kimi-web. Verified: typecheck clean, test 653/653 passed, check:style introduces no new findings.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. (A CSS value change plus a one-line reorder of an existing key handler; this package has no component tests — the existing suite passes.)
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

The reading column was capped at 760px, leaving wide empty margins on large screens. Let it follow the pane width instead.
…dialog

preventDefault ran only while a turn was running, so an idle Ctrl+S/Cmd+S fell through to the browser and opened the Save Page dialog. Always swallow the shortcut; steering still only fires when a turn is running.
@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0d9835e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

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

@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: 7e44ece315

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

--read-max: 760px;
/* The reading column follows the pane width — no fixed max-width cap, so
wide windows don't leave empty margins on both sides. */
--read-max: 100%;

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 Keep regular chat content capped by the reading token

As committed, --read-max: 100% makes regular assistant prose and user bubbles expand to 94%/78% of whatever desktop pane width is available, while the web design-system view still defines --p-content-max as the chat reading-column max width and states that regular chat prose stays within that 760px column. On large monitors this regresses readability and also bypasses the tokenized layout contract; if full-width prose is intended, the design-system contract should be updated together, otherwise keep the normal stream capped and reserve wider growth for the existing table/content exceptions.

AGENTS.md reference: apps/kimi-web/AGENTS.md:L11-L11

Useful? React with 👍 / 👎.

With the reading column no longer capped at a fixed width, the outline rail's old anchor (the 760px column edge) left it floating in the middle of the widened content. Pin the rail to the pane's right edge inside the scrollbar gutter, reveal labels leftward over the content on hover, and measure the expanded fit in that direction.
…e Page

The composer's keydown only fires while the composer is focused, so a Ctrl+S/Cmd+S pressed anywhere else still fell through to the browser's Save Page dialog. A capture-phase preventDefault in App.vue's global keydown now swallows the shortcut everywhere; steering stays in the composer's handler.
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.

1 participant