Skip to content

chore: split web and desktop apps out to the code-app repo#1733

Open
liruifengv wants to merge 2 commits into
mainfrom
chore/split-web-desktop
Open

chore: split web and desktop apps out to the code-app repo#1733
liruifengv wants to merge 2 commits into
mainfrom
chore/split-web-desktop

Conversation

@liruifengv

@liruifengv liruifengv commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No tracking issue — the problem is explained below. Pairs with #1732.

Problem

The web UI and the Electron desktop app are now developed in the code-app repo (apps/web / apps/desktop there). Keeping their sources in this repo means two diverging copies and a release pipeline that rebuilds artifacts the other repo owns.

What changed

  • Remove the apps/kimi-web and apps/kimi-desktop sources (-65k lines).
  • The package build no longer builds the web bundle or stages dist-web (copy-web-assets.mjs removed). dist-web ships as a committed artifact synced from code-app — that is chore: track dist-web web bundle as a committed artifact #1732.
  • Remove the desktop release CI (desktop-build.yml, the desktop-artifacts release job) and the root dev:web / dev:desktop scripts; drop onlyBuiltDependencies: electron (nothing left in the workspace depends on electron).
  • smoke.mjs stops asserting that dist-web exists so CI passes before chore: track dist-web web bundle as a committed artifact #1732 lands; the assertion can be restored afterwards.
  • Update the flake.nix workspace lists, the root typecheck chain, ci.yml, _native-build.yml, pkg-pr-new.yml, the docker e2e node_modules mounts, the AGENTS.md project map, and the changeset README package list.

Merge note: the SEA native build and the Nix build embed apps/kimi-code/dist-web and fail if it is missing, so land #1732 together with (or before) this PR, and avoid cutting a release in between.

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 — deletion-only; verified locally: pnpm install, CLI tsc --noEmit, check-nix-workspace, sherif, and a full pnpm build all pass.)
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update. (User-facing docs are unaffected: kimi web behavior is unchanged once chore: track dist-web web bundle as a committed artifact #1732 lands.)

Remove the apps/kimi-web and apps/kimi-desktop sources, which now live in the code-app repo.

- Drop the kimi-web build step and copy-web-assets.mjs from the package build; apps/kimi-code/dist-web becomes a committed artifact synced from code-app (follow-up change).
- Remove the desktop release CI (desktop-build.yml, the desktop-artifacts release job) and the root dev:web / dev:desktop scripts.
- Drop electron from onlyBuiltDependencies; nothing in the workspace depends on it anymore.
- smoke.mjs no longer asserts dist-web exists; restore the assertion once the committed artifact lands.
- Update the flake.nix workspace lists, the AGENTS.md project map, and the changeset README package list.
@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a9bc43c

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 Minor

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 Jul 15, 2026

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

commit: dfaf663

@github-actions

Copy link
Copy Markdown
Contributor

❌ Nix build failed

Hash mismatch in pnpmDeps:

Hash
specified sha256-dqniDBWjKjtTcr+zKhtilkKXdNMfiwnfrqH/7Cg4eZ0=
got sha256-ajDJNbO6//b0Qt7SdKOW1FwhI6mJLcvS5RYI8ACxy1E=

Please update flake.nix with the got hash.

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

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

},
"scripts": {
"build": "pnpm -C ../kimi-web run build && tsdown && node scripts/copy-native-assets.mjs && node scripts/copy-web-assets.mjs",
"build": "tsdown && node scripts/copy-native-assets.mjs",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore dist-web generation for clean builds

In a clean checkout of this commit, apps/kimi-code/dist-web is not tracked, and this build script no longer creates it. The server still falls back to apps/kimi-code/dist-web outside SEA mode and kap-server rejects startup when index.html is absent; the SEA build's collectWebAssets also fails before producing native artifacts. Please keep generating/copying the web bundle here, or add the committed artifact in the same change, so kimi web, pkg.pr previews, release, and Nix/native builds do not run or ship without web assets.

Useful? React with 👍 / 👎.

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