Skip to content

feat(web): add kimi-web2 design-first UI prototype (Kimi Design System)#1379

Open
wbxl2000 wants to merge 2 commits into
mainfrom
feat/kimi-web2-design-prototype
Open

feat(web): add kimi-web2 design-first UI prototype (Kimi Design System)#1379
wbxl2000 wants to merge 2 commits into
mainfrom
feat/kimi-web2-design-prototype

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — this PR came from an internal design-team initiative; the problem is explained below.

Problem

The current kimi-web UI drifted away from the Kimi Design System (blue-accent SaaS look, border-based states, ad-hoc spacing). The design team shipped a design skill (tokens + component contracts), and we needed a way to evaluate a from-scratch, spec-faithful UI without touching the production Vue app — and to preview it directly from a PR (e.g. via pr.new).

What changed

Adds apps/kimi-web2/ — a zero-dependency, no-build (vanilla HTML/CSS/JS) rewrite of the kimi-web UI, built purely from the Kimi Design System:

  • Design: kimiDark neutral emphasis (blue reserved for brand/data), fill-based states (no border-based selection), 0.5px hairline separators, PingFang-first typography, 8/10/12/16/20 radius scale, light + dark themes.
  • Offline design review: open index.html directly (or via pr.new preview) — everything renders from stub data: sidebar with workspaces/sessions, chat stream (thinking / code / tool calls / approval / question cards), composer (slash-menu, @-mention, permission/modes/model pickers), settings (4 pages), search (Cmd+K), login, add-workspace, right detail panel, mobile shell.
  • Real end-to-end: live.js implements the minimal REST + WS client for /api/v1 (endpoints documented in its header). node serve.mjs serves the app and proxies the API same-origin (server CORS is allowlist-based), so http://localhost:8101/?token=<server token> shows real workspaces/sessions/history with live events; without a token it stays in stub mode.

This approach fits Kimi Code because it evaluates the redesign as an isolated, reviewable artifact: no build system, no workspace package (not in the pnpm workspace / not bundled into the CLI), zero impact on apps/kimi-web or releases.

Preview: open this PR in pr.new and serve apps/kimi-web2/index.html — stub mode reproduces the full design.

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. (Design prototype — no test harness; verified manually in-browser, light + dark + mobile.)
  • Ran gen-changesets skill, or this PR needs no changeset. (No changeset: apps/kimi-web2 is not a workspace package and does not enter the CLI bundle or any release artifact.)
  • Ran gen-docs skill, or this PR needs no doc update. (Prototype only; usage documented in apps/kimi-web2/README.md.)

…Kimi Design System

A zero-dependency, no-build web UI for kimi-code rebuilt from scratch
following the Kimi Design System (kimiDark neutral emphasis, fill-based
states, hairline separators). Runs fully offline on stub data for design
review, and connects to a real kimi-code server (REST + WS under /api/v1)
via the bundled same-origin proxy (serve.mjs) for an end-to-end preview.
@changeset-bot

changeset-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 92acd07

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

@wbxl2000 wbxl2000 marked this pull request as ready for review July 5, 2026 03:28
@pkg-pr-new

pkg-pr-new Bot commented Jul 5, 2026

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

commit: 92acd07

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

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

Comment thread apps/kimi-web2/app.js
Comment on lines +252 to +253
var convo = S.conversations[sid];
convo.push({ type: 'user', text: text });

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 Guard sends before live history exists

When connected to a real server, live.js clears S.conversations and then lazily fetches messages for the selected session after S.set({ currentSessionId: ... }); during that fetch window, or after switching to any unloaded server session, S.conversations[sid] is still undefined. Pressing Send then throws on convo.push(...) before KimiLive.send can post the prompt, so live mode loses the user's send until history finishes loading. Initialize the conversation array here (as convo(sid) does elsewhere) before appending the user block.

Useful? React with 👍 / 👎.

- copy-web-assets.mjs now copies the static apps/kimi-web2 app into
  dist-web (no Vue build step needed); dev-only files are excluded.
- live.js: on http(s) pages, try the same-origin server even without a
  token; a 401 opens the token dialog, which persists the token and
  reloads — so the server-hosted build connects out of the box.
- Verified end-to-end against a protected local server (401 -> token
  dialog -> live workspaces/sessions/history over REST + WS).
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

❌ Nix build failed

    kimi-code> dist/assets/hack-DbPARsA_.js                                                      81.11 kB │ gzip:  26.24 kB
    kimi-code> dist/assets/cose-bilkent-S5V4N54A-CwMB-9zf.js                                     81.70 kB │ gzip:  22.39 kB
    kimi-code> dist/assets/swift-D82vCrfD.js                                                     86.69 kB │ gzip:  14.71 kB
    kimi-code> dist/assets/fortran-free-form-BxgE0vQu.js                                         88.97 kB │ gzip:  11.28 kB
    kimi-code> dist/assets/csharp-DSvCPggb.js                                                    90.19 kB │ gzip:  10.79 kB
    kimi-code> dist/assets/racket-BqYA7rlc.js                                                    92.39 kB │ gzip:  15.08 kB
    kimi-code> dist/assets/less-B1dDrJ26.js                                                      97.63 kB │ gzip:  14.79 kB
    kimi-code> dist/assets/blade-2xfisSek.js                                                    104.98 kB │ gzip:  28.05 kB
    kimi-code> dist/assets/objective-c-DXmwc3jG.js                                              105.41 kB │ gzip:  23.35 kB
    kimi-code> dist/assets/php-Csjmro_R.js                                                      113.09 kB │ gzip:  28.69 kB
    kimi-code> dist/assets/sequenceDiagram-3UESZ5HK-CZmHj9CB.js                                 116.86 kB │ gzip:  30.78 kB
    kimi-code> dist/assets/asciidoc-Ve4PFQV2.js                                                 131.53 kB │ gzip:   9.33 kB
    kimi-code> dist/assets/mdx-Cmh6b_Ma.js                                                      136.11 kB │ gzip:  23.58 kB
    kimi-code> dist/assets/architectureDiagram-3BPJPVTR-nKXpKmeO.js                             149.43 kB │ gzip:  41.86 kB
    kimi-code> dist/assets/DesignSystemView-CuFVgmGX.js                                         164.51 kB │ gzip:  34.30 kB
    kimi-code> dist/assets/objective-cpp-CLxacb5B.js                                            171.97 kB │ gzip:  30.74 kB
    kimi-code> dist/assets/javascript-wDzz0qaB.js                                               174.83 kB │ gzip:  16.60 kB
    kimi-code> dist/assets/tsx-COt5Ahok.js                                                      175.54 kB │ gzip:  16.59 kB
    kimi-code> dist/assets/jsx-g9-lgVsj.js                                                      177.79 kB │ gzip:  16.72 kB
    kimi-code> dist/assets/typescript-BPQ3VLAy.js                                               181.08 kB │ gzip:  16.11 kB
    kimi-code> dist/assets/angular-ts-BrjP3tb8.js                                               183.82 kB │ gzip:  16.70 kB
    kimi-code> dist/assets/vue-vine-BoDAl6tE.js                                                 190.05 kB │ gzip:  18.04 kB
    kimi-code> dist/assets/index-dSjz-vs8.js                                                    210.36 kB │ gzip:  66.67 kB
    kimi-code> dist/assets/katex-DnlPpQZa.js                                                    260.01 kB │ gzip:  77.04 kB
    kimi-code> dist/assets/katex-HP8lGamR.js                                                    261.31 kB │ gzip:  77.25 kB
    kimi-code> dist/assets/wolfram-lXgVvXCa.js                                                  262.39 kB │ gzip:  77.07 kB
    kimi-code> dist/assets/cytoscape.esm-nFXppDBa.js                                            442.57 kB │ gzip: 141.36 kB
    kimi-code> dist/assets/mermaid.core-D2EmxeHj.js                                             606.20 kB │ gzip: 144.04 kB
    kimi-code> dist/assets/wardley-L42UT6IY-Clchgx5F.js                                         612.65 kB │ gzip: 144.85 kB
    kimi-code> dist/assets/wasm-CG6Dc4jp.js                                                     622.34 kB │ gzip: 231.16 kB
    kimi-code> dist/assets/cpp-UfJy6YNI.js                                                      626.08 kB │ gzip:  44.90 kB
    kimi-code> dist/assets/emacs-lisp-CXvaQtF9.js                                               779.88 kB │ gzip: 196.54 kB
    kimi-code> dist/assets/index-552cw27c.js                                                  1,296.14 kB │ gzip: 417.39 kB
    kimi-code> 
    kimi-code> (!) Some chunks are larger than 500 kB after minification. Consider:
    kimi-code> - Using dynamic import() to code-split the application
    kimi-code> - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
    kimi-code> - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    kimi-code> ✓ built in 25.69s
    kimi-code> file:///build/source/apps/kimi-code/scripts/copy-web-assets.mjs:22
    kimi-code>     throw new Error(`Kimi web assets were not found at ${source}.`);
    kimi-code>           ^
    kimi-code> 
    kimi-code> Error: Kimi web assets were not found at /build/source/apps/kimi-web2.
    kimi-code>     at assertWebSource (file:///build/source/apps/kimi-code/scripts/copy-web-assets.mjs:22:11)
    kimi-code>     at async file:///build/source/apps/kimi-code/scripts/copy-web-assets.mjs:26:1
    kimi-code> 
    kimi-code> Node.js v24.15.0
    error: Cannot build '/nix/store/55gamcf56vghcqdvfmghfhq84p54lxxq-kimi-code-0.22.3.drv'.
           Reason: builder failed with exit code 1.
           Output paths:
             /nix/store/giq9jnzlxcc3lk18dns6nqpq6l1yh0w5-kimi-code-0.22.3
           Last 25 log lines:
           > dist/assets/katex-DnlPpQZa.js                                                    260.01 kB │ gzip:  77.04 kB
           > dist/assets/katex-HP8lGamR.js                                                    261.31 kB │ gzip:  77.25 kB
           > dist/assets/wolfram-lXgVvXCa.js                                                  262.39 kB │ gzip:  77.07 kB
           > dist/assets/cytoscape.esm-nFXppDBa.js                                            442.57 kB │ gzip: 141.36 kB
           > dist/assets/mermaid.core-D2EmxeHj.js                                             606.20 kB │ gzip: 144.04 kB
           > dist/assets/wardley-L42UT6IY-Clchgx5F.js                                         612.65 kB │ gzip: 144.85 kB
           > dist/assets/wasm-CG6Dc4jp.js                                                     622.34 kB │ gzip: 231.16 kB
           > dist/assets/cpp-UfJy6YNI.js                                                      626.08 kB │ gzip:  44.90 kB
           > dist/assets/emacs-lisp-CXvaQtF9.js                                               779.88 kB │ gzip: 196.54 kB
           > dist/assets/index-552cw27c.js                                                  1,296.14 kB │ gzip: 417.39 kB
           > 
           > (!) Some chunks are larger than 500 kB after minification. Consider:
           > - Using dynamic import() to code-split the application
           > - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
           > - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
           > ✓ built in 25.69s
           > file:///build/source/apps/kimi-code/scripts/copy-web-assets.mjs:22
           >     throw new Error(`Kimi web assets were not found at ${source}.`);
           >           ^
           >
           > Error: Kimi web assets were not found at /build/source/apps/kimi-web2.
           >     at assertWebSource (file:///build/source/apps/kimi-code/scripts/copy-web-assets.mjs:22:11)
           >     at async file:///build/source/apps/kimi-code/scripts/copy-web-assets.mjs:26:1
           >
           > Node.js v24.15.0
           For full logs, run:
             nix log /nix/store/55gamcf56vghcqdvfmghfhq84p54lxxq-kimi-code-0.22.3.drv

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