Skip to content

Commit c775621

Browse files
committed
Release v0.0.55
## What's New ### Features - **Claude Code 2.1.32** — Updated to Claude Code binary 2.1.32, SDK 0.2.32, added Opus 4.6 model support - **Thinking Stream UI** — Streaming thinking content with improved thinking tool visualization and elapsed time display - **Inbox Redesign** — Redesigned inbox pages with context menus, fork locally option, and sidebar improvements - **Automation Tracking** — Automation execution tracking in Linear start-agent with auto-save support ### Improvements & Fixes - **Auto-Retry on Policy Errors** — Silent retries with 3s/6s delays on false-positive USAGE_POLICY_VIOLATION errors, friendlier error messages - **Model Names** — Added version numbers to Sonnet 4.5 and Haiku 4.5 model names - **Sub-Chat Stability** — Fixed sub-chat loading race condition, hover prefetch, and chat timestamp bug - **Chat Image Persistence** — Persist chat images across sessions and prevent duplicate messages - **Chat Name Language** — Generate chat names in the same language as user's message - **Git Fixes** — Fixed git diff view, git widget, git selection state, and relative display paths - **Context Counter** — Fixed context counter display - **MCP Timeout** — Fixed MCP timeout handling - **Onboarding Token Fix** — Disabled CLI token import in onboarding (tokens expire in ~8 hours) - **Scroll-to-Bottom Button** — Responsive scroll-to-bottom with CSS variable sizing - **Sidebar Toggle** — Unified sidebar toggle button sizes in sub-chat selector - **Build Fix** — Pinned source-map to 0.7.4 to fix electron-builder packaging error
1 parent b1cfa84 commit c775621

58 files changed

Lines changed: 3182 additions & 1594 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,25 @@ npm version patch --no-git-tag-version # 0.0.27 → 0.0.28
250250
- Git worktree per chat (isolation)
251251
- Claude Code execution in worktree path
252252
- Full feature parity with web app
253+
254+
## Debug Mode
255+
256+
When debugging runtime issues in the renderer or main process, use the structured debug logging system. This avoids asking the user to manually copy-paste console output.
257+
258+
**Start the server:**
259+
```bash
260+
bun packages/debug/src/server.ts &
261+
```
262+
263+
**Instrument renderer code** (no import needed, fails silently):
264+
```js
265+
fetch('http://localhost:7799/log',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({tag:'TAG',msg:'MESSAGE',data:{},ts:Date.now()})}).catch(()=>{});
266+
```
267+
268+
**Read logs:** Read `.debug/logs.ndjson` - each line is a JSON object with `tag`, `msg`, `data`, `ts`.
269+
270+
**Clear logs:** `curl -X DELETE http://localhost:7799/logs`
271+
272+
**Workflow:** Hypothesize → instrument → user reproduces → read logs → fix with evidence → verify → remove instrumentation.
273+
274+
See `packages/debug/INSTRUCTIONS.md` for the full protocol.

bun.lock

Lines changed: 196 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bun.lockb

0 Bytes
Binary file not shown.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "21st-desktop",
3-
"version": "0.0.54",
3+
"version": "0.0.55",
44
"private": true,
55
"description": "1Code - UI for parallel work with AI agents",
66
"author": {
@@ -19,8 +19,8 @@
1919
"dist": "electron-builder",
2020
"dist:manifest": "node scripts/generate-update-manifest.mjs",
2121
"dist:upload": "node scripts/upload-release.mjs",
22-
"claude:download": "node scripts/download-claude-binary.mjs --version=2.1.25",
23-
"claude:download:all": "node scripts/download-claude-binary.mjs --version=2.1.25 --all",
22+
"claude:download": "node scripts/download-claude-binary.mjs --version=2.1.32",
23+
"claude:download:all": "node scripts/download-claude-binary.mjs --version=2.1.32 --all",
2424
"release": "rm -rf release && bun i && bun run claude:download && bun run build && bun run package:mac && bun run dist:manifest && ./scripts/upload-release-wrangler.sh",
2525
"release:dev": "rm -rf release && bun run claude:download && bun run build && bun run package:mac && rm -rf node_modules && bun i",
2626
"sync:public": "./scripts/sync-to-public.sh",
@@ -33,7 +33,7 @@
3333
},
3434
"dependencies": {
3535
"@ai-sdk/react": "^3.0.14",
36-
"@anthropic-ai/claude-agent-sdk": "0.2.25",
36+
"@anthropic-ai/claude-agent-sdk": "0.2.32",
3737
"@git-diff-view/react": "^0.0.35",
3838
"@git-diff-view/shiki": "^0.0.36",
3939
"@modelcontextprotocol/sdk": "^1.25.3",

src/main/lib/auto-updater.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,21 @@ function getChannelPrefPath(): string {
4242
}
4343

4444
function getSavedChannel(): UpdateChannel {
45-
try {
46-
const prefPath = getChannelPrefPath()
47-
if (existsSync(prefPath)) {
48-
const data = JSON.parse(readFileSync(prefPath, "utf-8"))
49-
if (data.channel === "beta" || data.channel === "latest") {
50-
return data.channel
51-
}
52-
}
53-
} catch {
54-
// Ignore read errors, fall back to default
55-
}
45+
// Beta channel disabled until beta-mac.yml is published to CDN.
46+
// Always use "latest" to prevent 404 errors for users who toggled Early Access.
5647
return "latest"
48+
// try {
49+
// const prefPath = getChannelPrefPath()
50+
// if (existsSync(prefPath)) {
51+
// const data = JSON.parse(readFileSync(prefPath, "utf-8"))
52+
// if (data.channel === "beta" || data.channel === "latest") {
53+
// return data.channel
54+
// }
55+
// }
56+
// } catch {
57+
// // Ignore read errors, fall back to default
58+
// }
59+
// return "latest"
5760
}
5861

5962
function saveChannel(channel: UpdateChannel): void {

src/main/lib/claude/env.ts

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,22 @@ let cachedShellEnv: Record<string, string> | null = null
1717
const DELIMITER = "_CLAUDE_ENV_DELIMITER_"
1818

1919
// Keys to strip (prevent interference from unrelated providers)
20-
// NOTE: We intentionally keep ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL
20+
// NOTE: We intentionally keep ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL in production
2121
// so users can use their existing Claude Code CLI configuration (API proxy, etc.)
2222
// Based on PR #29 by @sa4hnd
23-
const STRIPPED_ENV_KEYS = [
23+
const STRIPPED_ENV_KEYS_BASE = [
2424
"OPENAI_API_KEY",
2525
"CLAUDE_CODE_USE_BEDROCK",
2626
"CLAUDE_CODE_USE_VERTEX",
2727
]
2828

29+
// In dev mode, also strip ANTHROPIC_API_KEY so OAuth token is used instead
30+
// This allows devs to test OAuth flow without unsetting their shell env
31+
// Added by Sergey Bunas for dev purposes
32+
const STRIPPED_ENV_KEYS = !app.isPackaged
33+
? [...STRIPPED_ENV_KEYS_BASE, "ANTHROPIC_API_KEY"]
34+
: STRIPPED_ENV_KEYS_BASE
35+
2936
// Cache the bundled binary path (only compute once)
3037
let cachedBinaryPath: string | null = null
3138
let binaryPathComputed = false
@@ -45,14 +52,12 @@ export function getBundledClaudeBinaryPath(): string {
4552
const currentPlatform = process.platform
4653
const arch = process.arch
4754

48-
// Only log verbose info on first call
49-
if (process.env.DEBUG_CLAUDE_BINARY) {
50-
console.log("[claude-binary] ========== BUNDLED BINARY PATH ==========")
51-
console.log("[claude-binary] isDev:", isDev)
52-
console.log("[claude-binary] platform:", currentPlatform)
53-
console.log("[claude-binary] arch:", arch)
54-
console.log("[claude-binary] appPath:", app.getAppPath())
55-
}
55+
// Always log on first call to help debug
56+
console.log("[claude-binary] ========== BUNDLED BINARY DEBUG ==========")
57+
console.log("[claude-binary] isDev:", isDev)
58+
console.log("[claude-binary] platform:", currentPlatform)
59+
console.log("[claude-binary] arch:", arch)
60+
console.log("[claude-binary] appPath:", app.getAppPath())
5661

5762
// In dev: apps/desktop/resources/bin/{platform}-{arch}/claude
5863
// In production: {resourcesPath}/bin/claude
@@ -64,21 +69,16 @@ export function getBundledClaudeBinaryPath(): string {
6469
)
6570
: path.join(process.resourcesPath, "bin")
6671

67-
if (process.env.DEBUG_CLAUDE_BINARY) {
68-
console.log("[claude-binary] resourcesPath:", resourcesPath)
69-
}
72+
console.log("[claude-binary] resourcesPath:", resourcesPath)
7073

7174
const binaryName = currentPlatform === "win32" ? "claude.exe" : "claude"
7275
const binaryPath = path.join(resourcesPath, binaryName)
7376

74-
if (process.env.DEBUG_CLAUDE_BINARY) {
75-
console.log("[claude-binary] binaryPath:", binaryPath)
76-
}
77+
console.log("[claude-binary] binaryPath:", binaryPath)
7778

7879
// Check if binary exists
7980
const exists = fs.existsSync(binaryPath)
8081

81-
// Always log if binary doesn't exist (critical error)
8282
if (!exists) {
8383
console.error(
8484
"[claude-binary] WARNING: Binary not found at path:",
@@ -87,15 +87,15 @@ export function getBundledClaudeBinaryPath(): string {
8787
console.error(
8888
"[claude-binary] Run 'bun run claude:download' to download it"
8989
)
90-
} else if (process.env.DEBUG_CLAUDE_BINARY) {
90+
} else {
9191
const stats = fs.statSync(binaryPath)
9292
const sizeMB = (stats.size / 1024 / 1024).toFixed(1)
9393
const isExecutable = (stats.mode & fs.constants.X_OK) !== 0
9494
console.log("[claude-binary] exists:", exists)
9595
console.log("[claude-binary] size:", sizeMB, "MB")
9696
console.log("[claude-binary] isExecutable:", isExecutable)
97-
console.log("[claude-binary] ===========================================")
9897
}
98+
console.log("[claude-binary] ============================================")
9999

100100
// Cache the result
101101
cachedBinaryPath = binaryPath
@@ -237,6 +237,16 @@ export function buildClaudeEnv(options?: {
237237
env.PATH = shellPath
238238
}
239239

240+
// 2b. Strip sensitive keys again (process.env may have re-added them)
241+
// This ensures ANTHROPIC_API_KEY from dev's shell doesn't override OAuth in dev mode
242+
// Added by Sergey Bunas for dev purposes
243+
for (const key of STRIPPED_ENV_KEYS) {
244+
if (key in env) {
245+
console.log(`[claude-env] Stripped ${key} from final environment`)
246+
delete env[key]
247+
}
248+
}
249+
240250
// 3. Ensure critical vars are present using platform provider
241251
const platformEnv = platform.buildEnvironment()
242252
if (!env.HOME) env.HOME = platformEnv.HOME

0 commit comments

Comments
 (0)