Skip to content

fix(web): let workspace picker fit its content - #1611

Merged
chengluyu merged 5 commits into
mainfrom
feat/debug-web-v2
Jul 13, 2026
Merged

fix(web): let workspace picker fit its content#1611
chengluyu merged 5 commits into
mainfrom
feat/debug-web-v2

Conversation

@chengluyu

@chengluyu chengluyu commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No related issue. This is a focused fix for a reproducible workspace picker layout bug in the web UI.

Problem

The workspace picker measured only the longest shortened path and then used that text width as the width of the entire menu. When all paths were short, the menu became too narrow for workspace names and actions, clipping content and showing a horizontal scrollbar.

What changed

  • Remove the hidden measurement probe, pretext calculations, resize listeners, and reactive width state.
  • Let CSS Grid and width: max-content size the menu from its complete rendered content.
  • Keep the design-system 180px minimum and cap the menu to the conversation pane.
  • Ellipsize labels only when the conversation-pane cap is reached.
  • Add a patch changeset for @moonshot-ai/kimi-code.

Validation

  • pnpm --filter @moonshot-ai/kimi-web typecheck
  • pnpm --filter @moonshot-ai/kimi-web test (27 files, 458 tests)
  • pnpm --filter @moonshot-ai/kimi-web build
  • pnpm --filter @moonshot-ai/kimi-web check:style (passes with the existing warning baseline)
  • pnpm exec oxlint apps/kimi-web/src/components/chat/ConversationPane.vue (no errors; one pre-existing warning)
  • Real-browser intrinsic sizing checks:
    • Short content uses the 180px minimum with no horizontal overflow.
    • Wider content expands the menu to fit.
    • With a 300px sidebar and 460px preview, a 520px conversation pane caps the menu at 488px with 16px clearance on both sides and no horizontal overflow.
    • Light and dark menu states preserve the same sizing behavior.
  • Read-only audit of the original PR diff found no context-specific internal identifiers; this revision only removes measurement code and adds generic CSS.

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. No new component test was added; the existing 458-test web suite and real-browser layout checks cover this focused CSS fix.
  • I have run the gen-changesets skill and added a patch changeset.
  • I have run the gen-docs check. No documentation update is needed for this focused layout fix.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 530e017

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

@chengluyu chengluyu changed the title fix(web): size workspace picker from full content fix(web): let workspace picker fit its content Jul 13, 2026
@chengluyu
chengluyu marked this pull request as ready for review July 13, 2026 11:50
@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

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

commit: 530e017

@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: 2c6fb871a8

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

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-web/src/components/chat/ConversationPane.vue Outdated
@chengluyu
chengluyu merged commit 32cbd0c into main Jul 13, 2026
14 checks passed
@chengluyu
chengluyu deleted the feat/debug-web-v2 branch July 13, 2026 13:39
@github-actions github-actions Bot mentioned this pull request Jul 13, 2026
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