Skip to content

Commit 2337a0e

Browse files
CopilotBunsDev
andauthored
Merge PR #395 and resolve conflicts
Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
2 parents 43bafe2 + a63c46c commit 2337a0e

9 files changed

Lines changed: 186 additions & 246 deletions

File tree

DESIGN.md

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -52,34 +52,34 @@ conversation with the agent. Every pixel must earn its place.
5252

5353
### Typography
5454

55-
| Role | Size | Weight | Tracking | Font Stack |
56-
| -------------------------- | -------------------- | --------------- | --------- | ---------------------------- |
57-
| Thread title (sidebar) | `text-xs` (0.75rem) | `font-normal` | default | Inter, system-ui, sans-serif |
58-
| Thread subtitle / metadata | `text-[10px]` | `font-normal` | default | Inter, system-ui, sans-serif |
59-
| Badge text | `text-[10px]` | `font-medium` | default | Inter, system-ui, sans-serif |
60-
| Button text | `text-sm` (0.875rem) | `font-medium` | default | Inter, system-ui, sans-serif |
61-
| Heading / dialog title | `text-lg` (1.125rem) | `font-semibold` | `-0.01em` | Inter, system-ui, sans-serif |
62-
| Code / terminal | `text-sm` | `font-normal` | default | SF Mono, Consolas, monospace |
63-
| Project name | `text-xs` | `font-semibold` | default | Inter, system-ui, sans-serif |
55+
| Role | Size | Weight | Tracking | Font Stack |
56+
|------|------|--------|----------|------------|
57+
| Thread title (sidebar) | `text-xs` (0.75rem) | `font-normal` | default | Inter, system-ui, sans-serif |
58+
| Thread subtitle / metadata | `text-[10px]` | `font-normal` | default | Inter, system-ui, sans-serif |
59+
| Badge text | `text-[10px]` | `font-medium` | default | Inter, system-ui, sans-serif |
60+
| Button text | `text-sm` (0.875rem) | `font-medium` | default | Inter, system-ui, sans-serif |
61+
| Heading / dialog title | `text-lg` (1.125rem) | `font-semibold` | `-0.01em` | Inter, system-ui, sans-serif |
62+
| Code / terminal | `text-sm` | `font-normal` | default | SF Mono, Consolas, monospace |
63+
| Project name | `text-xs` | `font-semibold` | default | Inter, system-ui, sans-serif |
6464

6565
### Color Semantics
6666

6767
Colors are referenced through CSS custom properties, never hardcoded hex values.
6868

69-
| Token | Usage |
70-
| -------------------------- | ------------------------------------------------- |
71-
| `text-foreground` | Primary text |
72-
| `text-muted-foreground` | Secondary/deemphasized text |
69+
| Token | Usage |
70+
|-------|-------|
71+
| `text-foreground` | Primary text |
72+
| `text-muted-foreground` | Secondary/deemphasized text |
7373
| `text-muted-foreground/50` | Tertiary/metadata text (branch names, timestamps) |
74-
| `bg-background` | Page background |
75-
| `bg-accent` | Hover state, active row highlight |
76-
| `bg-accent/60` | Active sidebar item |
77-
| `bg-accent/40` | Selected sidebar item |
78-
| `text-emerald-600` | Additions / success (green) |
79-
| `text-rose-500` | Deletions / error (red) |
80-
| `text-warning` | Warning states, behind-upstream |
81-
| `text-destructive` | Destructive actions (delete) |
82-
| `border-border/60` | Subtle badge borders |
74+
| `bg-background` | Page background |
75+
| `bg-accent` | Hover state, active row highlight |
76+
| `bg-accent/60` | Active sidebar item |
77+
| `bg-accent/40` | Selected sidebar item |
78+
| `text-emerald-600` | Additions / success (green) |
79+
| `text-rose-500` | Deletions / error (red) |
80+
| `text-warning` | Warning states, behind-upstream |
81+
| `text-destructive` | Destructive actions (delete) |
82+
| `border-border/60` | Subtle badge borders |
8383

8484
### Spacing Rules
8585

@@ -93,16 +93,15 @@ Colors are referenced through CSS custom properties, never hardcoded hex values.
9393

9494
### Themes
9595

96-
Six premium themes, each with light and dark variants:
96+
Five premium themes, each with light and dark variants:
9797

98-
| Theme | Vibe |
99-
| --------------------- | ------------------------------------- |
100-
| **Iridescent Void** | Futuristic, expensive, slightly alien |
101-
| **Solar Witch** | Magical, cozy, ritualistic |
102-
| **Carbon** | Stark, modern, performance-focused |
103-
| **Vapor** | Refined, fluid, purposeful |
104-
| **Cotton Candy** | Sweet, dreamy, pink and blue |
105-
| **Cathedral Circuit** | Sacred machine, techno-gothic |
98+
| Theme | Vibe |
99+
|-------|------|
100+
| **Iridescent Void** | Futuristic, expensive, slightly alien |
101+
| **Carbon** | Stark, modern, performance-focused |
102+
| **Vapor** | Refined, fluid, purposeful |
103+
| **Cotton Candy** | Sweet, dreamy, pink and blue |
104+
| **Cathedral Circuit** | Sacred machine, techno-gothic |
106105

107106
All themes define the same set of CSS custom properties. Components must use semantic
108107
tokens (`bg-accent`, `text-muted-foreground`) — never theme-specific values.
@@ -142,7 +141,6 @@ const buttonVariants = cva("base classes", {
142141
### Focus States
143142

144143
All interactive elements use the same focus ring:
145-
146144
```
147145
focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]
148146
```
@@ -250,7 +248,6 @@ a single flow:
250248
```
251249

252250
Quick action resolves automatically based on git state:
253-
254251
- Has changes + no PR → "Commit, push & PR"
255252
- Has changes + existing PR → "Commit & push"
256253
- No changes + ahead → "Push & create PR"

apps/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@anthropic-ai/claude-agent-sdk": "^0.2.77",
2727
"@effect/platform-node": "catalog:",
2828
"@effect/sql-sqlite-bun": "catalog:",
29-
"@pierre/diffs": "^1.1.0-beta.16",
29+
"@pierre/diffs": "1.1.13",
3030
"effect": "catalog:",
3131
"node-pty": "^1.1.0",
3232
"open": "^10.1.0",

apps/server/src/openclaw/GatewayClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export class OpenclawGatewayClient {
466466

467467
if (frame.type === "event" && typeof frame.event === "string") {
468468
let matchedWaiter = false;
469-
for (const waiter of this.pendingEventWaiters) {
469+
for (const waiter of [...this.pendingEventWaiters]) {
470470
if (waiter.eventName === frame.event) {
471471
matchedWaiter = true;
472472
this.pendingEventWaiters.delete(waiter);

apps/server/src/persistence/Layers/OpenclawGatewayConfig.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function normalizeScopes(scopes: ReadonlyArray<string> | undefined): string[] {
6868
unique.add(trimmed);
6969
}
7070
}
71-
return [...unique].toSorted((left, right) => left.localeCompare(right));
71+
return [...unique].sort((left, right) => left.localeCompare(right));
7272
}
7373

7474
function fromGeneratedIdentity(identity: ReturnType<typeof generateOpenclawDeviceIdentity>) {
@@ -339,16 +339,20 @@ export const OpenclawGatewayConfigLive = Layer.effect(
339339
: input.sharedSecret?.trim() !== undefined && input.sharedSecret.trim().length > 0
340340
? input.sharedSecret.trim()
341341
: existing?.sharedSecret;
342-
const generatedIdentity = fromGeneratedIdentity(generateOpenclawDeviceIdentity());
343-
const identity = existing ?? {
344-
...generatedIdentity,
345-
deviceToken: undefined,
346-
deviceTokenRole: undefined,
347-
deviceTokenScopes: [],
348-
updatedAt: new Date().toISOString(),
349-
gatewayUrl: input.gatewayUrl,
350-
sharedSecret,
351-
};
342+
const identity =
343+
existing ??
344+
(() => {
345+
const generatedIdentity = fromGeneratedIdentity(generateOpenclawDeviceIdentity());
346+
return {
347+
...generatedIdentity,
348+
deviceToken: undefined,
349+
deviceTokenRole: undefined,
350+
deviceTokenScopes: [],
351+
updatedAt: new Date().toISOString(),
352+
gatewayUrl: input.gatewayUrl,
353+
sharedSecret,
354+
};
355+
})();
352356
const nextConfig = makeStoredConfig({
353357
gatewayUrl: input.gatewayUrl,
354358
sharedSecret,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import * as Effect from "effect/Effect";
2+
import * as SqlClient from "effect/unstable/sql/SqlClient";
3+
4+
export default Effect.gen(function* () {
5+
const sql = yield* SqlClient.SqlClient;
6+
7+
yield* sql`
8+
CREATE TABLE IF NOT EXISTS openclaw_gateway_config (
9+
config_id TEXT PRIMARY KEY,
10+
gateway_url TEXT NOT NULL,
11+
encrypted_shared_secret TEXT NULL,
12+
device_id TEXT NOT NULL,
13+
device_public_key TEXT NOT NULL,
14+
device_fingerprint TEXT NOT NULL,
15+
encrypted_device_private_key TEXT NOT NULL,
16+
encrypted_device_token TEXT NULL,
17+
device_token_role TEXT NULL,
18+
device_token_scopes_json TEXT NOT NULL DEFAULT '[]',
19+
created_at TEXT NOT NULL,
20+
updated_at TEXT NOT NULL
21+
)
22+
`;
23+
});

apps/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@lexical/react": "^0.41.0",
3131
"@okcode/contracts": "workspace:*",
3232
"@okcode/shared": "workspace:*",
33-
"@pierre/diffs": "1.1.0-beta.16",
33+
"@pierre/diffs": "1.1.13",
3434
"@tanstack/react-pacer": "^0.19.4",
3535
"@tanstack/react-query": "^5.90.0",
3636
"@tanstack/react-router": "^1.160.2",
@@ -42,7 +42,7 @@
4242
"html-to-image": "^1.11.13",
4343
"lexical": "^0.41.0",
4444
"lucide-react": "^0.564.0",
45-
"oxfmt": "^0.42.0",
45+
"oxfmt": "^0.44.0",
4646
"react": "^19.0.0",
4747
"react-dom": "^19.0.0",
4848
"react-intl": "^10.1.1",

0 commit comments

Comments
 (0)