moi-computer 0.5.1 → 0.5.2-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/client/app/shell/SidebarLayout.tsx +1 -1
  2. package/client/components/shared/Composer.tsx +12 -3
  3. package/client/components/ui/dropdown-menu.tsx +1 -4
  4. package/client/components/ui/popover.tsx +11 -4
  5. package/client/components/ui/slider.tsx +70 -0
  6. package/client/components/ui/tooltip.tsx +1 -1
  7. package/client/features/applets/applet-cache.ts +10 -1
  8. package/client/features/applets/useApplet.ts +1 -1
  9. package/client/features/chat/ChatComposer.tsx +9 -13
  10. package/client/features/chat/ChatPanel.tsx +8 -8
  11. package/client/features/chat/ModelPicker.tsx +295 -116
  12. package/client/features/chat/TurnView.tsx +1 -1
  13. package/client/features/chat/chat-send.ts +15 -5
  14. package/client/features/chat/chat-store.ts +9 -22
  15. package/client/features/chat/model-order.ts +50 -28
  16. package/client/features/chat/useChat.ts +20 -11
  17. package/client/features/settings/IconPicker.tsx +2 -2
  18. package/client/features/views/api.ts +1 -0
  19. package/client/features/views/useViewBuilderActions.ts +4 -2
  20. package/client/features/workspace/WorkspaceScreen.tsx +2 -1
  21. package/client/features/workspace/WorkspaceSkillUpdateBanner.tsx +2 -2
  22. package/client/index.css +5 -3
  23. package/client/store/ui.ts +11 -1
  24. package/dist/chunk-94m3q9ce.js +1 -0
  25. package/dist/{chunk-v797g6ap.js → chunk-bcrkdhwe.js} +1 -1
  26. package/dist/{chunk-7bzpmtxp.js → chunk-jvhvme3z.js} +1 -1
  27. package/dist/chunk-k9dcnd73.js +27 -0
  28. package/dist/{chunk-jg6ezptn.js → chunk-kfw1qwqe.js} +2 -2
  29. package/dist/chunk-pk11vfzs.js +9 -0
  30. package/dist/{chunk-5vaevt8z.js → chunk-r2bqaege.js} +1 -1
  31. package/dist/{chunk-h3evrtyp.js → chunk-tzz101ea.js} +1 -1
  32. package/dist/chunk-xwhya7kb.js +1 -0
  33. package/dist/chunk-y4g8j7mv.css +1 -0
  34. package/dist/{chunk-m9qja0nx.js → chunk-zs4mte79.js} +1 -1
  35. package/dist/index.html +1 -1
  36. package/lib/types.ts +14 -5
  37. package/package.json +1 -1
  38. package/server/api.ts +13 -4
  39. package/server/applets.ts +49 -7
  40. package/server/harness/claude-code/models.ts +25 -2
  41. package/server/harness/claude-code/session.ts +28 -5
  42. package/server/harness/codex/adapter.ts +27 -2
  43. package/server/harness/codex/client.ts +33 -4
  44. package/server/harness/codex/session.ts +13 -4
  45. package/server/harness/types.ts +3 -2
  46. package/server/thread-config.ts +11 -7
  47. package/server/web.ts +3 -0
  48. package/workspace/.claude/skills/moi-workspace/DESIGN.md +38 -42
  49. package/workspace/.claude/skills/moi-workspace/SKILL.md +1 -1
  50. package/dist/chunk-4tcmvefj.js +0 -1
  51. package/dist/chunk-gc2smzc9.js +0 -27
  52. package/dist/chunk-h0hk61pm.js +0 -9
  53. package/dist/chunk-k5sjx9s5.js +0 -1
  54. package/dist/chunk-s7za1qsv.css +0 -1
@@ -5,8 +5,8 @@ precise, and quiet. Applets may be more expressive and information-rich while st
5
5
  to the workspace around them.
6
6
 
7
7
  This file owns visual direction, layout, states, and interaction design. `SKILL.md` owns file layout,
8
- imports, styling syntax, and build instructions. The workspace theme owns fonts and semantic color
9
- values.
8
+ imports, styling syntax, and build instructions. The host owns fonts and semantic color values.
9
+ Widgets and views resolve color tokens in different scopes, described below.
10
10
 
11
11
  ## Visual direction
12
12
 
@@ -29,29 +29,46 @@ spacing, or interaction patterns. They do not need to look identical.
29
29
 
30
30
  ## Color
31
31
 
32
- Start with the semantic colors supplied by the applet's surface. Widgets use the host's dark card
33
- theme. Views inherit the workspace surface. Semantic colors keep ordinary text, structure, controls,
34
- and states readable and consistent.
32
+ ### Widget surfaces
35
33
 
36
- | Intent | Tailwind token | Use |
34
+ The host applies the `.dark` class around every widget. Semantic tokens inside a widget therefore
35
+ use dark-mode values regardless of the workspace color preset. The host frame stays transparent, so
36
+ every widget root must cover the full frame with an opaque background.
37
+
38
+ Choose each widget's background deliberately. Prefer an intentional solid color for most widgets,
39
+ using your design judgment to fit the content, purpose, mood, data, status, and surrounding widgets.
40
+ Pair it with a readable foreground and keep the surface consistent through every state. An image or
41
+ visualization may own the surface when it has an opaque fallback.
42
+
43
+ `h-full w-full bg-background text-foreground` is a sensible fallback when no more specific surface
44
+ fits. In the widget scope, it resolves to a dark background with light text.
45
+
46
+ ### View surfaces
47
+
48
+ Views are separate pages. Their semantic tokens inherit the workspace theme, so
49
+ `h-full w-full bg-background text-foreground` is a sensible default root.
50
+
51
+ | Context or intent | Tailwind classes | Use |
37
52
  | --- | --- | --- |
38
- | Primary content | `text-foreground` | Headings, values, body text, and important icons |
39
- | Secondary content | `text-muted-foreground` | Labels, captions, timestamps, and supporting metadata |
40
- | Main surface | `bg-background text-foreground` | The default applet surface |
53
+ | Widget fallback | `bg-background text-foreground` | Dark semantic surface when no content-led color fits |
54
+ | Default view root | `bg-background text-foreground` | The workspace page surface and text |
55
+ | Primary content | `text-foreground` | Content on the default dark widget surface or normal view surface |
56
+ | Secondary content | `text-muted-foreground` | Supporting content on the default dark widget surface or normal view surface |
41
57
  | Inset surface | `bg-card text-card-foreground` | A real contained object or raised region inside the applet |
42
58
  | Floating surface | `bg-popover text-popover-foreground` | Menus, tooltips, and other floating content |
43
59
  | Primary action | `bg-primary text-primary-foreground` | The most important action in a local region |
44
60
  | Subdued surface | `bg-muted` | Skeletons, quiet fills, and disabled structure |
45
61
  | Interaction | `bg-accent text-accent-foreground` | Hover, active, selected, and subtle highlighted states |
46
62
  | Error or danger | `text-destructive` / `bg-destructive` | Errors, destructive actions, and invalid states |
47
- | Structure | `ring-1 ring-border`, `border-input`, `ring-ring` | Custom container edges, controls, and visible focus |
63
+ | Structure | `ring-border`, `border-input`, `ring-ring` | Container edges, controls, and visible focus on semantic surfaces |
48
64
 
49
- Use lower foreground opacity only for tertiary metadata that remains readable. Avoid weak alpha text
50
- for important labels or values. Keep inset surfaces rare so a widget does not become a stack of
51
- cards.
65
+ Use lower opacity from the surface's foreground only for tertiary metadata that remains readable.
66
+ Avoid weak alpha text for important labels or values. Keep inset surfaces rare so a widget does not
67
+ become a stack of cards.
52
68
 
53
- Keep container edges subtle. Use `ring-1 ring-border` for custom container outlines. Do not use a
54
- bare `border`, black borders, or raw high-contrast border colors as custom container chrome.
69
+ Keep container edges subtle. Use `ring-1 ring-border` on semantic surfaces and an equally restrained
70
+ outline suited to a custom light or colored surface. Avoid a bare `border` or raw high-contrast
71
+ colors as custom container chrome.
55
72
 
56
73
  Custom color is welcome when it carries identity, data, status, or useful emphasis. On a saturated
57
74
  surface, choose an explicit light or dark foreground with strong contrast. Keep state colors
@@ -64,26 +81,6 @@ gradient only when it encodes information or is essential to the specific conten
64
81
  Use purple, violet, and fuchsia only when the content, brand, or user preference calls for them.
65
82
  Never use a purple gradient as a default creativity or technology cue.
66
83
 
67
- ### Color starting points
68
-
69
- These are anchors, not fixed palettes. Tint them or use a single accent.
70
-
71
- | Content | Useful color families | Typical range |
72
- | --- | --- | --- |
73
- | Weather, sky, time | Sky, blue, indigo | 500–700 |
74
- | Night or dark environments | Indigo, slate | 800–900 |
75
- | Overcast or neutral data | Slate, zinc, neutral | 500–800 |
76
- | Nature and health | Emerald, green, teal | 500–700 |
77
- | Finance and positive movement | Emerald, teal | 600–700 |
78
- | Music and creative media | Blue, teal, amber, rose | 500–700 |
79
- | Alerts and urgency | Red, orange | 500–700 |
80
- | Notes and text | Amber, yellow | 400–600 |
81
- | Social and communication | Pink, rose | 400–600 |
82
- | Productivity and systems | Cyan, sky | 500–700 |
83
-
84
- Use the middle and darker parts of a Tailwind color scale for substantial surfaces, then verify the
85
- foreground contrast. Brighter values work better as small accents, chart marks, and status signals.
86
-
87
84
  ## Typography and hierarchy
88
85
 
89
86
  Inherit the workspace font. Use sentence case for headings, labels, actions, and navigation. Use
@@ -94,9 +91,8 @@ Use a small, consistent type scale. `text-sm` (14 px) is the default for UI text
94
91
  only for genuinely compact metadata and larger text only for clear headings or one meaningful
95
92
  display value. Do not create many label styles with slightly different sizes.
96
93
 
97
- Keep text contrast clear. Use `text-foreground` for primary content and `text-muted-foreground` for
98
- genuinely secondary content. Avoid several near-identical text styles that make hierarchy hard to
99
- read.
94
+ Keep text contrast clear and follow the foreground pairing for the chosen surface. Avoid several
95
+ near-identical text styles that make hierarchy hard to read.
100
96
 
101
97
  Reserve `font-mono` for code, command text, and truly code-like identifiers. Do not use monospace for
102
98
  numeric UI values, measurements, percentages, timers, timestamps, prices, counts, or labels. Numbers
@@ -177,9 +173,9 @@ direct actions while keeping one clear first reading.
177
173
 
178
174
  ### Frame
179
175
 
180
- The host card owns the outer radius, border, shadow, clipping, and elevation. A widget owns only its
181
- content surface. Its root fills the available rectangle and must not add outer card chrome. The
182
- content may use a semantic background, solid color, image, or visualization.
176
+ The host card owns the outer radius, border, shadow, clipping, and elevation. It leaves the inside
177
+ transparent. The widget root fills that rectangle and adds no outer card chrome. Its surface follows
178
+ the color guidance above.
183
179
 
184
180
  Use a column layout when content needs a footer or timestamp, and keep lower-priority information at
185
181
  the bottom. Important content needs safe padding from every edge. Use `p-4` as the compact default;
@@ -261,7 +257,7 @@ Before finishing an applet, confirm:
261
257
  - Purple appears only for a content, brand, or user reason and never as a default gradient.
262
258
  - Type, spacing, density, and expression support the content.
263
259
  - Numeric UI values use the default font, with `tabular-nums` when alignment helps.
264
- - Custom container outlines use a subtle `ring-border`.
260
+ - Custom container outlines suit their surface and stay subtle.
265
261
  - The layout handles realistic content and deliberate overflow.
266
262
  - Every reachable state and interaction is complete and accessible.
267
263
  - The widget or view follows its frame, sizing, and scrolling rules.
@@ -402,4 +402,4 @@ This skill is installed with moi (via the CLI or the UI) and can fall behind whe
402
402
  - **Then** — if you updated, mention it.
403
403
 
404
404
  <!-- moi skill version marker — read by `moi skill` to detect drift; do not edit by hand -->
405
- <moi-skill version="0.9.0" />
405
+ <moi-skill version="0.9.2" />
@@ -1 +0,0 @@
1
- import{Pc as a}from"/chunk-h3evrtyp.js";if(typeof globalThis.structuredClone==="function")globalThis.structuredClone=globalThis.structuredClone.bind(globalThis);async function e(r){let{mount:t}=await import("/chunk-gc2smzc9.js");t(r)}globalThis.__init=e;