Skip to content

fix: 1.5.1 回归修复与 YCode 改名(模型名、无响应提示、~/.ycode、ycode://) - #11

Merged
OpenX123 merged 16 commits into
mainfrom
feat/1.5.1
Nov 22, 2026
Merged

OpenX123 merged 16 commits into
mainfrom
feat/1.5.1

Conversation

@OpenX123

Copy link
Copy Markdown
Owner

背景

1.5.0 实机反馈:Claude 入口只显示档位不显示模型名、无响应提示条错位且与工具行重复、停止按钮旁的用量环像加载转圈;用户要求所有用户可见的 ZCode 改为 YCode,并把数据目录与深链一并改名。决策记录:docs/plans/2026-11-22-1.5.1-fixes-and-ycode-rename.md。

Bugfix

触发场景 根因证据 修复 回归
Claude 新会话入口只显示 Med EngineControls.tsx W1 规则:default 别名只显示档位;且 SDK resolvedModel 为 claude-opus-5-5[1m] 与目录 [1M] 大小写不一致、description 含嵌套括号,解析失败(本机 SDK supportedModels() 实测) 始终"模型 档位";解析原始 id/嵌套括号/· 形态,失败显示 Auto engineDefaultModelName.test.ts、externalEnginePickers.test.ts
"正在执行 Bash,已 1 分钟"左移 live-tail footer 只有 pb-2,缺少轮内容 px-4 @md:px-6 共用 TURN_CONTENT_INLINE_PADDING_CLASS v4ConversationTimelineLiveTailFooter.test.ts
工具运行中重复提示、显示原始名 Bash running_tool 也产生独立提示条 耗时改为运行中工具行尾"· N 分钟"(≥60s),独立提示仅用于等待模型 runningToolElapsed.test.ts、turnStallNotice.test.ts
停止按钮旁"空心转圈" 实为上下文用量环(1.0 前即有,非 1.5.0 回归),1M 上下文约 1% 时弧不可见 外部引擎 composer 用量 <20% 不渲染;原生引擎保持(压缩入口) chatContextUsageHideBelowRatio.test.ts

YCode 改名

  • 用户可见文案(i18n、用量面板、错误兜底、安装器、CUA、内置浏览器、Source Server、bots、Finder/Linux 集成)改为 YCode。
  • 深链:注册 ycode:// 与 zcode://,新链接生成 ycode://。
  • 数据目录:打包版启动最早期把 ~/.zcode rename 为 ~/.ycode 并在原位置建 junction/symlink;失败回滚继续用旧目录;路径解析统一走 @zcode/shared/ycode-data-root;仍写死 .zcode 的位置经链接工作(清单见 spec)。
  • YCODE_* 环境变量优先,写回 ZCODE_* 兼容子进程。
  • 远程:~/.ycode/server,部署/探测时停旧 daemon → mv → ln -s,失败回滚。
  • 不改:appId、Electron userData、项目级 .zcode/、@zcode/* 包名。
sequenceDiagram
  participant M as desktop main (early.ts,首条 import)
  participant FS as 文件系统
  participant S as setting.json / 子进程
  M->>FS: ~/.zcode 是真实目录且 ~/.ycode 不存在?
  FS-->>M: 是
  M->>FS: rename ~/.zcode → ~/.ycode
  alt rename 失败(被占用)
    M->>M: 跳过,继续用 ~/.zcode
  else 成功
    M->>FS: 建链接 ~/.zcode → ~/.ycode(失败则 rename 回去)
  end
  M->>S: 读取 setting.json → 对 dataBaseDir/.zcode 同样处理 → 启动子进程
Loading

验证

  • pnpm typecheck 通过;pnpm lint 0 errors;architecture:check --changed 0 违规。
  • 改动的 35 个根 UT 文件 534 通过 / 11 跳过;CLI build + typecheck 通过。
  • 迁移逻辑仅在临时目录测试(含本机真实 junction 的 rename/链接/经旧路径写入/回滚)。
  • 未执行:桌面 E2E、安装器编译(windowsInstallerCompile 在基线即因 fixture 编码失败)、真实协议注册、真机首次迁移、远端真实迁移。

🤖 Generated with Claude Code

OpenX123 and others added 16 commits November 22, 2026 08:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m integrations

- Spec: docs/desktop/ycode-branding-spec.md gains the 1.5.1 visible-copy and
  dual-scheme compatibility boundary; related deep-link docs updated.
- Register both ycode and zcode via setAsDefaultProtocolClient (one failing
  scheme no longer blocks the other), electron-builder protocols, dev macOS
  Info.plist (bundle format bumped so existing dev copies rebuild) and the
  Linux desktop entry (MimeType + xdg-mime default for both handlers).
- Parse both schemes in desktopDeepLinkUrl and parseSessionDeepLink; new links
  from buildSessionDeepLink and the Finder workflow use ycode://.
- Linux desktop entry Comment becomes "YCode Desktop App"; ownership check
  accepts both the new and legacy comment.
- Finder workflow renamed to "Open in YCode.workflow"; the legacy
  "Open in ZCode.workflow" is removed only when it carries our bundle id.
- Packaging author/maintainer and build errors show YCode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…real default descriptions

The 1.5.0 W1 rule hid the model when Claude used the adapter `default`
alias, so the trigger read only `Med`. The trigger now always shows
"model effort"; `default` resolves to the real model name or `Auto`
(accessible name "default model").

parseEngineDefaultModelName now handles the shapes observed from the local
Claude adapter 0.95.0 / SDK 0.3.309: raw resolvedModel ids
(claude-opus-5-5[1m], bedrock/openrouter prefixes, dated ids), nested
`(currently Opus 5.5 (1M context))`, served `Opus 5.5 · ...` and
context-suffixed display names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- i18n (update-ready hint, notification sound description) and the local
  usage-stats panel labels.
- UI/service error fallbacks ("YCode session failed" / "YCode compact failed",
  runtime-recycled message); the generic-error set keeps the legacy
  "ZCode session failed" so persisted history still normalizes.
- Windows installer detail-line prefix and data-dir header text (log file
  names unchanged).
- Computer Use permission/lifecycle errors, in-app browser name, Source Server
  desktop-upgrade message, bot help title / remote hint / multi-window lock
  messages, default engine label "YCode Agent", canonical plugin name token.

Internal logs, protocol IDs, type/package names, registry key names and
data-dir paths are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ol row

- The live tail footer only had pb-2 while the turn padding lives on the
  ConversationTurnGroup section, so the stall notice sat 16/24px left of
  the turn content. It now reuses TURN_CONTENT_INLINE_PADDING_CLASS.
- running_tool no longer yields a separate notice ("正在执行 Bash,已 1 分钟"
  duplicated the running tool row above it and used the raw tool name).
  RunningToolActivityProvider derives {toolCallId, phaseStartedAt} from
  turnActivity; ToolLayout appends "· N 分钟" (>=60s) to the matching
  running row, groups match by child ids and defer to children when
  expanded. waiting_model hint/warning are unchanged.

Specs: docs/chat/turn-stall-indicator.md (1.5.1 section).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dren

ExploreToolCallBlock also renders single explore-family tools; passing an
empty child id list would suppress the elapsed label on those rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1M 上下文下用量常约 1%,静态用量环只剩淡色整圆,用户实机误认为加载转圈。
该环自 1.0 前即存在(非 1.5.0 回归)。外部引擎 composer 低于 20% 不渲染;
原生引擎的环同时是压缩入口且被桌面 E2E 依赖,保持常显。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add the ycode-data-root shared module: pure directory/migration decisions,
  YCODE_* env aliases, and a cached resolver that prefers .ycode and falls back
  to an unmigrated .zcode.
- Desktop main runs the migration as its first import (before setting.json
  reads, logger and child processes): rename + junction/symlink, rollback on
  link failure, skip when rename fails or in dev/isolated runs.
- setting.json readers resolve through the new helper.
- Spec: docs/desktop/ycode-data-dir-migration.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- services paths.ts (data root, provider config dir, copyDataDirectory),
  storage roots, usage stats, model IO, CLI log/rollout readers and
  YCODE_DATA_BASE_DIR now go through resolveYCodeDataRoot.
- The conversation workspace keeps its legacy .zcode path because it is a
  workspace identity (session hash / project root_path); it works via the link.
- CLI (separate process) resolves the same way: default storage dir, session
  DB, logs, workflows, rollout, config dir, beta (.ycode-beta), and reads
  YCODE_STORAGE_DIR / YCODE_SESSION_DB_PATH / YCODE_BETA / YCODE_ENV first,
  propagating YCODE_* to ZCODE_* for child processes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…me migration

- REMOTE_BASE, classic launch command, agent wrapper, Source Server probe and
  transport, remote prompt attachments now use ~/.ycode.
- buildRemoteDataDirMigrationScript runs inside the probe and before classic
  deploy: stop the old Source Server, mv ~/.zcode ~/.ycode, ln -s back;
  roll back on link failure and fall back to a reverse link so only one copy
  exists.
- Server CLI resolves its default root via the shared helper, infers the data
  base dir from .ycode/server, and keeps the legacy service/pipe identity so
  re-registration replaces the old unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de/server

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OpenX123
OpenX123 merged commit 750c282 into main Nov 22, 2026
4 checks passed
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