feat(web): add kimi-web2 design-first UI prototype (Kimi Design System)#1379
feat(web): add kimi-web2 design-first UI prototype (Kimi Design System)#1379wbxl2000 wants to merge 2 commits into
Conversation
…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 detectedLatest commit: 92acd07 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: |
There was a problem hiding this comment.
💡 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".
| var convo = S.conversations[sid]; | ||
| convo.push({ type: 'user', text: text }); |
There was a problem hiding this comment.
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).
|
❌ Nix build failed |
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:index.htmldirectly (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.live.jsimplements the minimal REST + WS client for/api/v1(endpoints documented in its header).node serve.mjsserves the app and proxies the API same-origin (server CORS is allowlist-based), sohttp://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-webor releases.Preview: open this PR in pr.new and serve
apps/kimi-web2/index.html— stub mode reproduces the full design.Checklist
gen-changesetsskill, or this PR needs no changeset. (No changeset:apps/kimi-web2is not a workspace package and does not enter the CLI bundle or any release artifact.)gen-docsskill, or this PR needs no doc update. (Prototype only; usage documented inapps/kimi-web2/README.md.)