Skip to content

refactor(web): extract WorkspaceGroup from Sidebar#998

Merged
wbxl2000 merged 2 commits into
mainfrom
refactor/web-split-sidebar
Jun 23, 2026
Merged

refactor(web): extract WorkspaceGroup from Sidebar#998
wbxl2000 merged 2 commits into
mainfrom
refactor/web-split-sidebar

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — internal refactor, no user-facing behavior change.

Problem

Sidebar.vue was ~1098 lines, mixing the session column chrome (header, search, new-chat button), the workspace-group rendering (a repeated unit), and the floating workspace menus. The per-group rendering was the largest repeated block and made the file hard to navigate.

What changed

Extract the workspace group rendering into a new WorkspaceGroup.vue component:

  • Sidebar.vue 1098 → 899 lines.
  • New WorkspaceGroup.vue (305 lines) renders one workspace group: header (folder icon, name / rename input, kebab , + add), path line, session rows (SessionRow), show-more button, and empty state.
  • WorkspaceGroup receives the group data and parent state as props and forwards interactions up as emits (13 props, 12 emits). The floating menus (gh-menu, ws-menu), search, header, and new-chat button stay in Sidebar.vue.
  • Group-scoped CSS moved into WorkspaceGroup.vue so styling is identical; classes and DOM structure are byte-for-byte unchanged.

No behavior change, no emit-signature change. Verified with typecheck, test (26), build, and oxlint (0 errors / 0 warnings on the changed files).

This is the first slice of the big-component split from the web refactor plan; further Sidebar extraction (menus) and the other large components (ChatPane, ConversationPane, Composer) are follow-ups.

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. (N/A — pure refactor; no component-test infra in apps/kimi-web. Covered by typecheck + existing pure-logic tests.)
  • Ran gen-changesets skill, or this PR needs no changeset. (Patch on @moonshot-ai/kimi-code; @moonshot-ai/kimi-web is ignored and bundled into the CLI.)
  • Ran gen-docs skill, or this PR needs no doc update. (No user-facing behavior change.)

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 880fc16

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

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

commit: 880fc16

@wbxl2000 wbxl2000 merged commit 3e4793d into main Jun 23, 2026
9 checks passed
@wbxl2000 wbxl2000 deleted the refactor/web-split-sidebar branch June 23, 2026 05:33
@github-actions github-actions Bot mentioned this pull request Jun 23, 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