1020 Commits

Author SHA1 Message Date
程序员阿江(Relakkes)
ced096c894 fix(desktop): keep the dragged pet at the display edge across restarts
8a3ea62b taught dragging to clamp against the mascot rather than the whole
window, so a saved edge position deliberately leaves the transparent padding
off-screen. Recreating the window re-clamps that position against the whole
window again, and the reposition-on-restore step that undoes it was gated on
darwin -- so on Windows and Linux the mascot walked inwards by the padding
width on every hide/show, not just on restart. The gate only existed because
visibleDragRegion used to be darwin-only; the region now arrives everywhere,
so the repositioning runs everywhere.

e24d59fe restated the recorded window size on every drag tick to stop
setPosition from growing the window, but sampled that size from getBounds().
Chromium converts window rects between physical pixels and DIP with ceil in
both directions, so the sampled value has already been rounded up once and
restating it rounds up again: stable within a drag, a pixel per drag across
them. The window is created non-resizable at the nominal size, so restating
the constants is idempotent instead -- and heals a window that already drifted.
Both call sites now go through movePetWindow.

petWindowContentExtent fell back to the nominal constants when
getContentBounds returned an empty rect, which silently reinstates the exact
clamp it exists to avoid. Fall through to the live window box first.

The fake window in the tests returned one object for both getBounds and
getContentBounds, and modelled setBounds as inherently size-neutral -- so
neither "clamp to the content box" nor "size-neutral drag" was actually
proven: reverting either left all 33 tests green. It now models the ceil/ceil
DIP round trip and carries a distinct content box, and covers the previously
untested paths: cross-platform restore, multi-region shapes, the region
normalization bounds, and the getContentBounds fallbacks.
2026-07-25 15:56:39 +08:00
程序员阿江(Relakkes)
5b4e224f2e fix(desktop): address shadcn migration review findings
- Prevent EmptySession crash when settings have not loaded: fall back
  to the default permission-mode display and an empty model list, and
  stop undefined models responses from poisoning the settings store
- Sync Tauri terminal hardening with Electron: owner binding, input
  limits, window-destroy session cleanup, malformed config fallback
- Fix Sheet/MobileBottomSheet z-order so dialogs render above sheets
- Migrate ConfirmPopover to the shadcn Button; remove dead legacy
  shared form components and unused mockup pages
- Keep underscores readable in shared diagnostics, redact provider
  models only on secret-scanner hits, clean stale WhatsApp login
  staging dirs, and add recovery hints for corrupt computer-use config
- Token-ize find-in-page highlight colors, restore the indeterminate
  progress slide animation, and tidy a11y/displayName details
2026-07-25 15:07:00 +08:00
程序员阿江(Relakkes)
9ef170bb42 feat(skills): discover the cross-client .agents/skills convention #1093
Skills installed by Codex, Cursor, Gemini CLI, or opencode live under
`.agents/skills/` -- the convention documented at agentskills.io -- so users
had to keep a duplicate copy in `.claude/skills/` before cc-haha could see
them. The spec only constrains SKILL.md itself, which we already parse, so
this is purely a directory-discovery gap.

Scan both conventions at every scope: user (`~/.agents/skills`), project
(every level up to the repo root), `--add-dir` roots, on-demand monorepo
discovery, and the hot-reload watcher. skillRoots.ts is the single source of
truth for those paths; the REST API now reports which convention a skill came
from and the desktop list badges the `.agents` ones.

`.claude` is always ordered first, so first-wins dedup keeps a user's own
skills authoritative rather than letting an externally installed same-named
skill shadow them. Name collisions are collapsed per scope, which covers
copy-based sync -- symlink-based sync was already handled by the existing
realpath dedup. Collisions across different scopes, such as a user skill and
a project skill sharing a name, keep their existing behavior, and the shadowed
file's identity is recorded so overlapping roots (CLAUDE_CONFIG_DIR pointing
inside the project) cannot reintroduce it under the other scope.

getProjectDirsUpToHome is untouched -- it is shared by commands, agents,
output-styles, and workflows. Only its directory walk is extracted so the
skill resolver reuses the same submodule/worktree stop boundary. Writes stay
where they were: market installs and /skillify still target
`~/.claude/skills`.

`.agents` is anchored at $HOME rather than CLAUDE_CONFIG_DIR, since it is a
space shared with other tools that read $HOME. Note that Bun snapshots
os.homedir() at startup while Node re-reads $HOME per call, so the resolver
reads the env var explicitly.

Opt out with `disableAgentSkillsDirectory` in settings.json or
CLAUDE_CODE_DISABLE_AGENT_SKILLS_DIR=1; no `.agents` root is produced at all
then, so there is not even a failed stat.

(cherry picked from commit ba9338f85d6beaba237753e42e823c87b59633d4)
2026-07-25 02:50:21 +08:00
程序员阿江(Relakkes)
8a3ea62b9b fix(desktop): let the dragged pet reach display edges on Windows
setInteractiveRegions only recorded visibleDragRegion inside the darwin
branch, so on Windows and Linux it stayed null and dragging fell back to
clamping against the whole PET_WINDOW_WIDTH x PET_WINDOW_HEIGHT window. That
window is mostly transparent padding around a mascot anchored bottom center,
so the mascot stopped short of every display edge by the width of that
padding and could not be dragged into a corner. Record the region on all
platforms; the reposition-on-restore step stays darwin-only.

Normalizing the region also clamped against the nominal constants. Renderer
regions are measured against the live viewport, so clamp against the real
content box instead -- the same petWindowContentExtent the shape clamp
already uses -- and let the shape clamp reuse that one normalizer.
2026-07-25 02:38:19 +08:00
程序员阿江(Relakkes)
e24d59fe92 fix(desktop): stop clipping the dragged pet on Windows #1099 #1104
The Windows shape clamp used the nominal PET_WINDOW_HEIGHT constant. Renderer
regions are measured against the live viewport, so once the content area was
taller than that constant the mascot -- which sits flush with the viewport
bottom -- got sliced off from below, while the task badge kept its own
unclamped rect and stayed visible. Clamp the shape to the real content box.

Dragging also moved the window with setPosition, which Windows resolves as
getSize() + setBounds(); that DIP round trip grows the window a pixel at a
time on fractional display scaling, and the drag timer fires every 16ms.
Restate the recorded size on every tick so dragging stays size-neutral.
2026-07-25 02:12:10 +08:00
程序员阿江(Relakkes)
cc768b87c2 merge: unify desktop UI with shadcn components (#1089)
合入 shadcn/ui 全量迁移。该提交同时包含:
- 桌面端手写组件 -> shadcn/ui (radix-ui + Tailwind v4) 全量替换
- Electron 壳层加固: 终端 owner 绑定/IPC 校验/诊断写盘防逃逸
- server/utils 安全加固与修复: 诊断脱敏、Memory 乐观锁、Computer Use fail-closed、stats UTC 等

合并前已经 merge-tree 预演 + 落盘实证: 与 #1086/#1091 无文本冲突, 功能代码零损失。
2026-07-25 00:49:46 +08:00
程序员阿江(Relakkes)
ad597ffe0b feat(desktop): unify UI with shadcn components (#1089) 2026-07-24 23:59:48 +08:00
程序员阿江(Relakkes)
c2774fc170 fix(desktop): support pasted file attachments #1086 2026-07-24 05:30:38 +08:00
程序员阿江(Relakkes)
8e9c104514 fix(desktop): handle missing Windows taskkill #1091 2026-07-24 05:13:36 +08:00
lichengshuo
8061b9b2a5 feat(desktop): show installed skills in the market 2026-07-23 16:57:36 +08:00
lichengshuo
0f22792861 fix(desktop): make electron:dev launcher work on Windows
`new URL('..', import.meta.url).pathname` yields a leading-slash path like
/E:/... on Windows, so Bun.spawn failed with ENOENT. Resolve desktopRoot via
fileURLToPath, start Vite through its Node API instead of spawning `bun run
dev`, and resolve the Electron binary directly per platform.

Recovered from the discarded wip/capabilities snapshot (cb1208c9) as a
standalone fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:33:39 +08:00
程序员阿江(Relakkes)
f70fa017ef release: prepare v0.4.11 2026-07-23 03:30:42 +08:00
程序员阿江(Relakkes)
2240a07088 feat(desktop): improve pet motion and interactions 2026-07-23 03:03:05 +08:00
程序员阿江(Relakkes)
ca0342d252 Merge remote-tracking branch 'origin/main' 2026-07-23 00:31:40 +08:00
Relakkes Yang
3b2e750c6e fix(desktop): polish pet status and agent tools 2026-07-23 00:24:18 +08:00
Relakkes Yang
20b7753281 fix: sync pet status and finish agent editor 2026-07-22 22:12:27 +08:00
Relakkes Yang
a07e68839c fix: harden desktop runtime and pet interactions 2026-07-22 20:46:34 +08:00
程序员阿江(Relakkes)
29b17c8028 fix(models): expose current Claude official lineup 2026-07-22 17:42:19 +08:00
程序员阿江(Relakkes)
7f6fdadaa3 feat(agents): add per-agent model and effort controls #1062 2026-07-21 00:16:11 +08:00
程序员阿江(Relakkes)
1270ced4b4 fix(tasks): keep task state reliable across providers #1075 2026-07-20 23:53:46 +08:00
程序员阿江(Relakkes)
727bcea077 fix(desktop): harden Windows crash recovery #1064 #1065 #1071 2026-07-20 22:06:34 +08:00
程序员阿江(Relakkes)
ba8917f1db fix(desktop): decouple provider creation from presets request #1078 2026-07-20 20:39:40 +08:00
程序员阿江(Relakkes)
6b725a0b6f fix(desktop): show live SubAgent run details #1077 2026-07-20 20:30:33 +08:00
程序员阿江(Relakkes)
bf128cb9c0 fix(desktop): dedupe attachment message replay #1069 2026-07-20 20:28:18 +08:00
程序员阿江(Relakkes)
36560c09d5 feat(pets): add interactive desktop companions 2026-07-20 19:20:18 +08:00
程序员阿江(Relakkes)
100a2b25b8 fix(release): remove environment-dependent alias fixture 2026-07-18 20:25:42 +08:00
程序员阿江(Relakkes)
f8cccb096f fix(release): stabilize Windows recovery self-test 2026-07-18 20:20:34 +08:00
程序员阿江(Relakkes)
34a3fcb22e release: prepare v0.4.10 2026-07-18 19:12:26 +08:00
程序员阿江(Relakkes)
0cb612cb5d fix(desktop): restore conversation scroll after remount (#1057) 2026-07-17 23:51:40 +08:00
程序员阿江(Relakkes)
1b22ac6eb6 fix(desktop): keep conversation search current (#1045) 2026-07-17 23:39:04 +08:00
程序员阿江(Relakkes)
c48171e2f0 fix(desktop): harden Windows upgrades (#1028, #1029, #1036) 2026-07-17 23:38:59 +08:00
程序员阿江(Relakkes)
d9bb517287 fix(desktop): bound and refresh conversation search (#1045) 2026-07-17 23:12:14 +08:00
程序员阿江(Relakkes)
d20dce159e fix(desktop): skip prewarm for restored sessions (#1054) 2026-07-17 22:57:24 +08:00
程序员阿江(Relakkes)
6600497ff9 fix(desktop): mark interrupted task history stopped (#1034) 2026-07-17 22:57:13 +08:00
程序员阿江(Relakkes)
26e863902f fix(desktop): reveal renderer startup failures (#1032) 2026-07-17 22:54:43 +08:00
程序员阿江(Relakkes)
e72020247b fix(desktop): search virtualized conversations (#1045) 2026-07-17 22:53:49 +08:00
程序员阿江(Relakkes)
a9463e3bcf fix(desktop): keep notification guard type-safe (#1047) 2026-07-17 22:53:06 +08:00
程序员阿江(Relakkes)
151974e3ba fix(desktop): preserve foreground skill output (#1047) 2026-07-17 22:45:05 +08:00
程序员阿江(Relakkes)
fd4d6f1ffd fix(desktop): seal interrupted task history (#1034) 2026-07-17 22:44:59 +08:00
程序员阿江(Relakkes)
cdc0d0faff fix(desktop): handle proxy response resets (#1050, #1056) 2026-07-17 18:33:36 +08:00
程序员阿江(Relakkes)
e2c57cde2c fix(desktop): align native preview with app zoom (#1042) 2026-07-17 18:33:29 +08:00
程序员阿江(Relakkes)
0554c88c8e fix(desktop): keep the final preview tab closable (#1038) 2026-07-17 18:33:25 +08:00
程序员阿江(Relakkes)
c733151c14 fix(desktop): use authoritative rewind checkpoint (#1030) 2026-07-17 18:33:22 +08:00
程序员阿江(Relakkes)
2d58d11fb1 release: prepare v0.4.9 2026-07-16 18:50:35 +08:00
程序员阿江(Relakkes)
b2db55afc8 fix(desktop): support Shift range comments in files #1004 2026-07-16 18:29:16 +08:00
程序员阿江(Relakkes)
c06f958e7c fix(proxy): route AI sessions through dynamic system proxy #953 2026-07-16 17:33:33 +08:00
程序员阿江(Relakkes)
53a15098c0 perf(desktop): add SQLite-backed local data index #1016
Project sessions, activity, scheduled runs, traces, and searchable content into rebuildable managed databases while preserving canonical-file fallbacks. Add diagnostics, recovery, parity coverage, and performance acceptance checks.
2026-07-16 04:16:02 +08:00
程序员阿江(Relakkes)
d9e30cebcc feat(desktop): add local attachment open actions 2026-07-16 02:49:08 +08:00
程序员阿江(Relakkes)
80d4f1186c fix(search): stage ripgrep licenses offline #923 2026-07-14 22:17:31 +08:00
程序员阿江(Relakkes)
7e998e0365 fix(search): bundle cross-platform ripgrep #923 2026-07-14 22:11:22 +08:00