Repository navigation
feat: 1.5.0 体验改进(大文件预览、无响应提示、错误 UI、数字角标、自动更新、本机用量统计) - #10
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model names drop the leading "Claude " at the display layer only, effort buttons use <=5 letter abbreviations (Min/Low/Med/High/XHigh/Max/Ultra/Auto), and the combined trigger renders "Opus 4.7 XHigh" without a middle dot. Popover, slider readout and accessible names keep full names; the popover adds a one-line effort description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es card Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…age facts Add docs/usage-stats-local-sources.md (ZCode / Claude Code / Codex local usage, parsing + dedup rules, cursor cache, pricing, ownership). CLI queryAppUsage now also returns per-day/model/cwd token facts and the external engine native session ids so the Host can price ZCode native usage and tag ZCode-launched Claude/Codex sessions without double counting. Shared: additive usageFacts/externalSessions on AppUsageSnapshot and the LocalUsage* zod schemas used across RPC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s card Turn failures render as one line (icon, human message, Retry, Details) and expand into a monospace muted card with error code, HTTP status, request / trace id, URL and raw error plus Copy all. Common failures (401/403/429/ 529 overloaded/timeout/network/context too long) map to zh/en explanations and suggestions. The composer banner keeps carrying only non-turn errors with the same calm styling and explanations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Host-side LocalUsageScanner owns per-file cursors (mtime/size/offset/tail hash + Codex parser state), streams jsonl incrementally, dedupes Claude by message.id+requestId (stop_reason first, else larger output) and Codex by timestamp+total signature, and persists a compact cache under ~/.zcode/v2/usage-stats. ZCode native facts and external session mapping come from the CLI usage store and are cached for offline use. ModelPricingStore holds manual overrides and models.dev sync (manual only). IUsageStatsService gains getLocalUsageSnapshot / setModelPriceOverride / syncModelPrices with zod validation. Tests use synthetic fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…default - readTextFile single-call cap raised to 1MB with UTF-8 boundary-safe chunks - 1MB-50MB files open in a virtualized plain-text viewer that loads 1MB chunks on demand, with a render-anyway action; >50MB keeps the external editor hint - HTML files default to source view with a preview toggle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ProductProjection records lastActivityAt / phaseStartedAt / activityPhase (waiting_model | running_tool) from engine event timestamps, throttled to 5s, cleared when the turn leaves running. The new snapshot/patch key is strict-validated, degrades unknown shapes to null and does not bump revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Derives a hint at 60s and a warning at 5min of silence from the runtime turnActivity; running tools show elapsed time instead of a warning. Warning offers interrupt-and-retry (sendText startNow with the same user input), interrupt and view logs. No auto-cancel or auto-retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > Usage now renders LocalUsagePanel: source filter (all / ZCode / Claude Code / Codex), ranges today/7d/30d/all/custom, cost / requests / tokens / cache hit cards (estimated at API prices), Tokens/requests/cost trend, 53-week heatmap, by-model / by-project / request detail / pricing tabs with manual price override and manual models.dev sync. ZCode runtime metrics (agent-db) only show for all/ZCode sources. Scans only while the panel is mounted (+30s refresh, skipped when hidden). Replaces the old App Usage charts. New code lives in managed modules usage-stats-local-protocol (shared), usage-stats-local (services) and usage-stats-local-ui (ui); i18n under settings.usageStats.local.* for zh-CN and en-US. Desktop E2E updated for the new panel (not re-run). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fable 5/5.1/5.2, Opus 4.8/5/5.5, Sonnet 5/5.5 and Haiku 5.5 from the official price table; cache write 5m = 1.25x input, 1h = 2x input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Windows taskbar overlay and tray now draw a legible number (1-9, 9+) at native 16/32px instead of a red dot; macOS dock / Linux keep app.setBadgeCount with the same count. - Badge count = unread completed tasks + tasks waiting for approval or input, deduped per task; waiting states are acknowledged once the task is viewed in a focused window and re-counted on a new request. - Spec: docs/desktop/windows-taskbar-unread-badge.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New local settings desktopUpdateAutoCheck / desktopUpdateAutoDownload (both default on), applied live through syncAppSettings. - After a check finds an installable version, Main downloads and verifies it in the background and shows "Restart to update"; download no longer opens the installer, background failures fall back to update-available without a persistent error. - Restart to update: Windows runs the NSIS installer silently with --force-run, macOS uses the existing helper; on normal quit a verified installer is handed off inside the quit barrier (<=60s, no relaunch). - Settings rows and sidebar copy in desktop-updates UI; CONTRACT.md and docs/desktop/github-desktop-update-spec.md updated. - Shared AppSettings/notification preference types used by the next commit are introduced here as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Two sound categories (task completed / needs your action: approval,
question, error), each choosing default pop, five synthesized tones
(crisp, soft, woodblock, droplet, two-tone) or mute, with preview.
- Tones are generated by scripts/generate-notification-sounds.mjs
(deterministic additive/FM synthesis, no third-party samples, <30KB).
- Sounds play only when the app is in the background unless "play when
focused" is on; Main/web pass {category, appFocused} and the renderer
player is the single decision point.
- Preferences move from localStorage to local AppSettings shared across
windows (SettingsChanged), with one-time legacy key migration; the
Zustand notification fields and broadcast are removed.
- New managed module task-notifications-ui; spec
docs/desktop/task-notification-sounds.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # architecture-policy.yaml
… capsule - Collapsed status capsule no longer shows the worktree +x -y metric; the expanded Git Tools section and Git pane still show workspace changes - Turn file summary reads "已更改 N 个文件 +x -y" and gains a Review action that opens the whole turn as one multi-file diff in the side pane 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>
架构检查要求新文件落在 managed 模块内:pack B 新增的 error-explanations.ts 位于未受管的 ui 目录,合并后 architecture:check 报 unmanaged-new-file。 迁入 packages/ui/src/error-explanations 并登记,external-engine-ui 声明依赖。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
用户反馈 1.4.2 的几处体验问题:大文件无法预览(256KB 上限)、Claude 长时间无输出时毫无提示、顶部"更改 +N"显示与对话无关的工作区 diff、错误 UI 难看且错误码不便查看、Windows 角标只是红点、模型名带冗余 "Claude" 前缀且思考档位过长、更新需要手动下载、使用统计只覆盖 ZCode 自身会话。决策记录:
docs/plans/2026-11-22-experience-1.5.0.md。修改前后
turnActivity;60s 提示、5min 警告,提供中断并重试/中断/查看日志;工具执行中不算卡住;不自动处理Claude Opus 4.7 · Extra highOpus 4.7 XHigh(Min/Low/Med/High/XHigh/Max/Ultra/Auto)无响应状态所有者与事件顺序
验证
pnpm typecheck:通过;pnpm lint:0 errors(89 个既有 warning);pnpm architecture:check --changed:0 违规。usage-query、usage-stats-builder、product-projection-turn-activity通过。product-projection.test.ts2 条 API 重试用例失败,已在 origin/main 源码上复现,为既有失败。🤖 Generated with Claude Code