Skip to content

feat(appkit): /ui visual variant picker#476

Open
IamGalymzhan wants to merge 1 commit into
mainfrom
feat/ui-variants
Open

feat(appkit): /ui visual variant picker#476
IamGalymzhan wants to merge 1 commit into
mainfrom
feat/ui-variants

Conversation

@IamGalymzhan

@IamGalymzhan IamGalymzhan commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

/ui variant selector skill

Document

This PR is adding a new feature of /ui skill, that makes agent create several design versions of the UI component and allows user to select it live on the web page, while agent could read it on the next turn and implement selected degisn.

How to test

  1. Use /ui command via Isaac/Claude Code and type want you want to build in dev-playground
  2. Once agent completes go to the page and select needed variants
    • You can see choices in the node_modules/.databricks/appkit/appkit-ui-choices.jsonl file
  3. Tell agent that you have selected variants that you liked
  4. Confirm everything is done (No component, selected the right design)

Limitations:

  1. No built-in way to make plugin to disable on prod (was proposed to change createApp method -> need sync)
  2. No MCP integration (need sync)
  3. Skill lives in this repo only for now and only for Claude Code for testing

@github-actions

Copy link
Copy Markdown
Contributor

🔬  Run evals on this PR  ·  Go to Evals Monitor →

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle size report

Compared against bundle-size-baseline.json (main).

@databricks/appkit

npm tarball (packed): 709 KB (+7.0 KB) — gzipped download (dist + bin; excludes release-only docs/NOTICE).

dist raw gzip
JS (runtime) 734 KB (+5.7 KB) 257 KB (+2.7 KB)
Type declarations 279 KB (+4.2 KB) 96 KB (+2.0 KB)
Source maps 1.4 MB (+11 KB) 479 KB (+4.8 KB)
Other 11 KB 3.7 KB
Total 2.4 MB (+21 KB) 835 KB (+9.4 KB)
Per-entry composition (own code — deps external (as shipped))
Entry Initial (gz) Lazy (gz) Total (gz) node_modules (min) Own code (min)
. 79 KB (+675 B) 2.5 KB 82 KB (+675 B) external 260 KB (+2.1 KB)
./beta 39 KB 230 B 39 KB external 117 KB
./type-generator 19 KB 0 B 19 KB external 54 KB

Chunks:

Entry Chunk Load Size (gz)
. index.js initial 75 KB
. utils.js initial 4.0 KB
. remote-tunnel-manager.js lazy 2.5 KB
./beta beta.js initial 30 KB
./beta databricks.js initial 5.7 KB
./beta service-context.js initial 3.2 KB
./beta client-options.js initial 220 B
./beta databricks.js lazy 127 B
./beta index.js lazy 103 B
./type-generator index.js initial 19 KB

@databricks/appkit-ui

npm tarball (packed): 305 KB (+9.3 KB) — gzipped download (dist + bin; excludes release-only docs/NOTICE).

dist raw gzip
JS (runtime) 359 KB (+9.1 KB) 119 KB (+3.4 KB)
Type declarations 205 KB (+4.2 KB) 74 KB (+2.0 KB)
Source maps 685 KB (+16 KB) 224 KB (+6.0 KB)
CSS 16 KB 3.3 KB
Total 1.2 MB (+29 KB) 421 KB (+11 KB)
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
Entry Initial (gz) Lazy (gz) Total (gz) node_modules (min) Own code (min)
./js 4.3 KB 49 KB 54 KB 208 KB 12 KB
./js/beta 20 B 0 B 20 B 0 B 0 B
./react 429 KB (+1.4 KB) 49 KB 478 KB (+1.4 KB) 1.3 MB (+136 B) 168 KB (+4.2 KB)
./react/beta 20 B 0 B 20 B 0 B 0 B

Chunks:

Entry Chunk Load Size (gz)
./js index.js initial 4.2 KB
./js chunk initial 120 B
./js apache-arrow lazy 49 KB
./js/beta beta.js initial 20 B
./react index.js initial 427 KB
./react tslib initial 2.1 KB
./react apache-arrow lazy 49 KB
./react/beta beta.js initial 20 B

Build a piece of app UI in several variants, pick one live in the running app,
then finalize the chosen variant into source.

- `<Variants>`/`<Variant>` (appkit-ui): inline switcher — hover-revealed
  controls, tick confirm, `accent` and `layout` props — that degrades to a
  plain viewer when the recorder is absent.
- `uiVariants()` recorder plugin (appkit): POST /api/ui-variants/confirm,
  dev-gated (403), keyed upsert into
  node_modules/.databricks/appkit/.appkit-ui-choices.jsonl via a swappable
  ChoiceSink (default FileChoiceSink). Register conditionally so it never
  mounts in production.
- ast-grep lint rule flagging any <Variants> left in source before deploy.
- dev-playground demo route + nav.
- `/ui` command + guidance reference driving the author → pick → finalize loop.

Signed-off-by: Galymzhan <zhangazy2004@gmail.com>
@IamGalymzhan
IamGalymzhan marked this pull request as ready for review July 17, 2026 12:18
@IamGalymzhan
IamGalymzhan requested a review from a team as a code owner July 17, 2026 12:18
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