refactor(web): group components into area subdirectories - #1036
Merged
Conversation
Move the 40 feature-specific components out of the flat components/ into chat/, settings/, dialogs/, and mobile/ subdirectories, leaving 9 shared layout components at the top level. Recompute every relative import (no path alias in the web app), refresh the line-1 path comments, and update the layout description in AGENTS.md. No behavior change; typecheck / test / build / lint all pass.
🦋 Changeset detectedLatest commit: 1bc7ecf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Part of the
apps/kimi-webrefactor tracked inweb-refactor-plan.md(directory reorg was the last backlog item after the god-component split). No standalone issue.Problem
apps/kimi-web/src/components/held 49 SFCs in a single flat directory, making it hard to navigate and to see which components belong to which area.What changed
Group the 40 feature-specific components into four area subdirectories, leaving 9 shared/layout components at the top level:
components/chat/(27) — conversation/chat UI:ChatPane,ChatHeader,ChatDock,Composer,ConversationPane,ConversationToc,Markdown,ThinkingBlock,ThinkingPanel,ToolCall,DiffView,QuestionCard,ApprovalCard,SlashMenu,MentionMenu,SwarmCard,AgentCard,AgentGroup,AgentDetailPanel,TasksPane,QueuePane,GoalStrip,TodoCard,ActivityNotice,StatusPanel,OpenInMenu,SideChatPanel.components/settings/(5) — settings & configuration:SettingsDialog,ModelPicker,ProviderManager,LanguageSwitcher,Onboarding.components/dialogs/(5) — modal dialogs & sheets:AddWorkspaceDialog,NewSessionDialog,SessionsDialog,LoginDialog,BottomSheet.components/mobile/(3) — mobile-specific shell:MobileTopBar,MobileSettingsSheet,MobileSwitcherSheet.Sidebar,WorkspaceGroup,SessionRow,GlobalLoading,MoonSpinner,ResizeHandle,Terminal,WarningToasts,FilePreview.Also:
@//#/alias). 40 files moved viagit mv(history preserved); ~80 import paths updated across the moved components andApp.vue.apps/kimi-web/AGENTS.md.No behavior change. Files moved via
git mv; only import paths and the path comments changed.Verification
pnpm --filter @moonshot-ai/kimi-web typecheck— pass (vue-tsc --noEmit)pnpm --filter @moonshot-ai/kimi-web test— 83 passedpnpm --filter @moonshot-ai/kimi-web build— passoxlint --type-awareoncomponents/+App.vue— 0 errors (16 warnings are pre-existing in the moved files' original code, e.g.DiffView.vue/FilePreview.vue; the move introduces no new ones)Checklist
vue-tsc --noEmitguarantees every import resolves, plus the existing 83 pure-logic tests pass.)gen-changesetsskill, or this PR needs no changeset. (Added.changeset/web-components-subdirs.md,patchon@moonshot-ai/kimi-code.)gen-docsskill, or this PR needs no doc update. (Updatedapps/kimi-web/AGENTS.mdlayout section.)