Commit Graph
70 Commits
Author SHA1 Message Date
chenchen 3728dc0e89 Revert "fix: route all providers through proxy to patch thinking.type for Claude 4"
This reverts commit a3cddb89c6.
2026-05-18 21:47:43 +08:00
chenchenandClaude Opus 4.6 a3cddb89c6 fix: route all providers through proxy to patch thinking.type for Claude 4
Opus 4.7 requires thinking.type="adaptive" instead of "enabled".
The CLI sends "enabled" which upstream APIs reject. Now all providers
(including Anthropic-format) route through the proxy, which patches
the thinking parameter before forwarding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 21:42:46 +08:00
chenchen e3b1c3525b Merge remote-tracking branch 'taijibaga/main'
# Conflicts:
#	cc-haha/desktop/src-tauri/Cargo.lock
2026-05-18 21:14:23 +08:00
chenchenandClaude Opus 4.6 d87c6f6ac3 chore: bump desktop version to 0.2.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 21:13:49 +08:00
chenchenandClaude Opus 4.6 8adce51961 fix: add missing fetch timeouts across server API layer
Prevent potential hangs from fetch calls without AbortSignal:
- heicode-auth.ts: token exchange (15s)
- heicode-tasks.ts: forwardJson upstream calls (60s)
- createDirectConnectSession.ts: session creation (15s)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 18:44:41 +08:00
chenchenandClaude Opus 4.6 bbe5c8866b fix: increase proxy stream timeout from 30s to 10min
The 30-second AbortSignal.timeout on streaming fetch requests was
causing long-running tool calls (file editing, code search) to be
silently killed. The UI would show the task as still running but
no data was flowing, making it appear stuck indefinitely.

- Increase fetch timeout to 600s (10 min) for both stream and
  non-stream requests
- Add 5-minute per-chunk timeout in both stream parsers so a
  truly dead upstream is detected and surfaced as an error
  instead of hanging forever

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 18:33:47 +08:00
chenchenandClaude Opus 4.6 853e3b4ca9 feat: minimize to system tray on window close instead of quitting
When user clicks the X button, the app now hides to the system tray
instead of exiting. Users can restore the window by clicking the tray
icon or selecting "显示 Heicode" from the tray menu. To fully quit,
use "退出 Heicode" from the tray menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 16:35:34 +08:00
gongzhiyong 8135798e9e chore: configure macOS Developer ID signing 2026-05-18 13:33:32 +08:00
chenchenandClaude Opus 4.6 f43aa269d6 fix: enforce Rule 1 JSON wrappers across 80+ files, fix 6 bugs
- Replace all encoding/json direct calls with common.Marshal/Unmarshal/DecodeJson per Rule 1
- Fix Dify nil pointer dereference on remote image upload (relay-dify.go)
- Fix Claude relay file content type detection for text/* and PDF (relay-claude.go)
- Fix unsafe type assertions in Claude relay and Vertex GetModelRegion
- Fix StreamScanner unconditionally resetting pre-existing StreamStatus
- Add inferMimeTypeFromFilename() for proper MIME type handling in DTO
- Fix Mac build script hardcoded DMG version (now reads from tauri.conf.json)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 12:39:02 +08:00
chenchenandClaude Opus 4.6 e31fe390f3 fix: use common.Marshal/Unmarshal per Rule 1 + telegram null safety
- model/user.go: replace json.Unmarshal/Marshal with common.* wrapper
  functions as required by project Rule 1 (3 occurrences)
- relay/channel/claude/relay-claude.go: replace 3 json.* calls with
  common.* (tool call args unmarshal, response marshal)
- relay/channel/gemini/relay-gemini.go: replace 5 json.* calls with
  common.* (content parsing, function args, response marshal)
- adapters/telegram/index.ts: add optional chaining on callback query
  message.chat.id and null coalescing on message.text to prevent crash
  when callback message is undefined

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 23:09:32 +08:00
chenchenandClaude Opus 4.6 aa52b1265b fix: Windows path bugs, null safety, and URL encoding across client + manager
Client (cc-haha):
- server/api/sessions.ts: use path.basename() instead of split('/').pop()
  for extracting project/repo names on Windows
- server/api/filesystem.ts: use os.tmpdir() and os.homedir() instead of
  hardcoded '/tmp' and process.env.HOME which don't exist on Windows
- utils/plugins/pluginVersioning.ts: split on /[/\]/ for Windows paths
- utils/plugins/loadPluginCommands.ts: handle backslash separators in
  plugin namespace construction
- cli/handlers/autoMode.ts: add optional chaining on response.content
  to prevent crash when API returns null content

Manager (heicode):
- auth/api.ts: fix status always returning 1 regardless of active state
  (was `? 1 : 1`, now `? 1 : 2`)
- users/api.ts, redemption-codes/api.ts, profile/api.ts: use
  URLSearchParams for query string encoding to prevent breakage with
  special characters in search keywords and email addresses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 22:59:26 +08:00
chenchenandClaude Opus 4.6 f88f6a8c46 release: 0.2.1 — Windows path fix + version bump (Win & Mac)
Bump version to 0.2.1 across tauri.conf.json, package.json,
Cargo.toml, updater manifest, and Mac fallback URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 19:03:32 +08:00
chenchenandClaude Opus 4.6 1090cd0809 fix(desktop): Windows path separator handling across 10 components
On Windows, Tauri returns paths with backslash separators. Multiple
components used .split('/') to extract filenames/segments, which
returned the entire path as a single element on Windows. Changed all
instances to .split(/[/\]/) to handle both Unix and Windows paths.

Affected: ProjectContextChip, ToolCallBlock, PermissionDialog,
ToolCallGroup, FileSearchMenu, InlineImageGallery,
LocalSlashCommandPanel, ProjectFilter, StatusBar, DirectoryPicker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 18:57:40 +08:00
chenchenandClaude Opus 4.6 a4e566019a fix(desktop): correct @ file search replacement in EmptySession
Same bug as ChatInput — inserting filename at cursor without removing
the @filter trigger text, producing @foofile.ts instead of file.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 13:38:59 +08:00
chenchenandClaude Opus 4.6 2172045a7a fix(desktop): correct @ file search replacement in ChatInput
The onSelect handler inserted the filename at cursor position without
removing the @filter trigger text, producing "@foofilename.ts" instead
of replacing the whole "@foo" with "filename.ts".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 13:18:15 +08:00
chenchenandClaude Opus 4.6 20ca3421ab fix(desktop): prevent empty blocks rendering in chat UI
- Guard empty thinking events from creating blank ThinkingBlock rows
- Skip empty assistant_text from history loading
- Hide ToolResultBlock when content is empty (non-error)
- Add component-level null returns as safety net

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 13:11:37 +08:00
chenchenandClaude Opus 4.6 838f3717e5 release: 0.2.0 — CJK font consistency + remove stale upstream references
- Fix CJK font rendering: add PingFang SC, Microsoft YaHei, Noto Sans CJK SC
  fallbacks to all CSS font stacks (headline, body, label, mono)
- Clear docs_link default (was pointing to upstream docs)
- Remove user-facing "NewAPI" text from en/zh i18n strings
- Bump desktop version to 0.2.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-17 11:45:51 +08:00
chenchenandClaude Opus 4.6 460bdcc951 fix: Manager favicon/logo + ripgrep sidecar detection (#433 #208)
Manager web:
- Replace favicon.ico (both default & classic themes) with new H icon
- Compact heicode-logo.svg from 204KB base64 blob to 5KB
- Replace classic theme logo.png (was still old NewAPI icon)

Client (cc-haha):
- Fix isInBundledMode() to detect Bun-compiled sidecars that have no
  explicit embeddedFiles — checks process.execPath basename instead
- Add well-known ripgrep install paths (/opt/homebrew/bin, /usr/local/bin,
  ~/.cargo/bin, etc.) as fallback when PATH is incomplete in Tauri sidecar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-15 16:23:15 +08:00
chenchenandClaude Opus 4.7 ac1aa87312 release: 0.1.10 — balance widget actually shows + avatar ring
Balance pill was rendering nothing for admin/root accounts because
mcp-server's §4 returns HEICODE_USER_NOT_FOUND for users that never
came through from-agnet onboarding. Fall back to Heicode NewAPI's
own /api/user/self when that happens; reshape into the same envelope
so the UI is path-agnostic.

New balanceStore (zustand) — single polling loop, BalanceBar +
avatar ring share it. AppShell starts it once auth bootstraps.
BalanceBar now shows a "loading…" placeholder on first fetch so
the widget is visible from frame one.

SidebarUserCard avatar wears an SVG ring whose arc length tracks
remaining/(remaining+used) and color hits the same green→amber→red
thresholds as the bar.

Manager: /desktop-client drops the manifest-notes wall of text, the
old HEICODE_DESKTOP_FILE_* subtitle goes away, and a Mac fallback
entry is always spliced in when the live manifest is Win-only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 16:44:13 +08:00
chenchenandClaude Opus 4.7 47a74eaf03 release: 0.1.9 — balance progress bar + roll up of 0.1.6-0.1.8
Today's 0.1.6/0.1.7/0.1.8 all built but never shipped a manifest
(some were superseded mid-iteration; 0.1.8 had Win binary on blob
but Mac wasn't ready). 0.1.9 ships the full stack as one release:

- BalanceBar under the composer now has a real progress bar (was
  text only). Fill = remaining/(remaining+used); color shifts
  green → amber → red below 30%/10%.
- (from 0.1.8) AskUserQuestion early-return moved below all hooks
  so the render order is stable across input mutations.
- (from 0.1.8) chatStore content_delta throttle is now per-session
  (Map<sessionId, {pending, timer}>); no more cross-tab text bleed.
- (from 0.1.8) endpoints array trimmed to blob-only — SWA URL gone
  so a fallback failure no longer flashes a third-party domain.
- (from 0.1.7) new app icon — already on disk in icons/ + public/.
- (from 0.1.6) Manager desktop_download.go reads blob manifest so
  the /desktop-client page tracks releases without env wrangling.
- Build pipeline: `tauri build --bundles nsis` is the release path
  (skips MSI/WiX, ~2-3 min/build saved). sccache wired into
  ~/.cargo/config.toml; next build is the first with warm cache.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 13:18:12 +08:00
chenchenandClaude Opus 4.7 dea6d251a4 fix: 0.1.8 — hook-order in AskUserQuestion + per-session stream buffer
P0: AskUserQuestion.tsx had `if (questions.length === 0) return null`
sitting between the `useState` calls and the `useMemo` calls below.
On any render where parseInput(input) flipped between empty and
non-empty (e.g. streaming permission_request input mutates) React
threw "Rendered more hooks than during the previous render". Moved
the early return after every hook call.

P1: chatStore.ts had `pendingDelta` + `flushTimer` at module scope,
shared across every active session. When two sessions streamed at
the same time (e.g. user has a team-member tab open alongside their
own), session B's content_delta would queue onto the same module
buffer as session A; whichever flush timer fired first emptied the
buffer into its own session. Result: text leaked between
conversations.

Replaced with a `Map<sessionId, { pending, timer }>` so each stream
owns its own throttle buffer. `consumePendingDelta(sessionId)` and
`dropBuffer(sessionId)` keep the API similar to before; nine
callsites updated.

Both issues caught by the bug-audit agent run after 0.1.7 build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 11:17:22 +08:00
chenchenandClaude Opus 4.7 de239c32d6 release: 0.1.7 — new H glyph icon (desktop + Manager web) + manifest-driven Manager downloads
Visual brand refresh: replaced the desktop client + Manager web logos
with the new glossy gradient H glyph.

Desktop (cc-haha):
- src-tauri/icons/*: regenerated via `tauri icon` from new-icon.png
  (center-cropped 1024 square). Updates icon.ico/icns/png + 8 Windows
  Square*Logo sizes + iOS + Android mipmaps.
- public/app-icon.png + app-icon.svg: replaced. SVG is now a wrapper
  around the embedded PNG so existing <img src="…app-icon.svg"> refs
  keep working without recoloring tooling.
- Version bumped to 0.1.7 across tauri.conf.json, package.json,
  Cargo.toml.

Manager web (heicode/web/default):
- public/logo.png: 256x256 of the new glyph.
- public/favicon.ico: multi-size ico (16/32/48/64/128/256).
- public/heicode-logo.svg: same SVG-wraps-PNG trick as desktop.

Backend (heicode/controller/desktop_download.go):
- Already redeployed earlier today — the Manager web "Heicode 桌面客户端"
  page now sources its download URLs from the Azure Blob updater manifest
  instead of VM-local files. This is the fix for "still downloading
  Heicode_0.1.0_windows_x64_msi.msi"; the page will reflect 0.1.7 the
  moment the manifest publishes below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:37:18 +08:00
chenchenandClaude Opus 4.7 02866a8a33 release: 0.1.6 — balance pill under composer + Manager download fix
cc-haha desktop (0.1.6):
- New sidecar route `/api/heicode-auth/balance` proxies mcp-server
  §4 `/api/user/heicode/balance` using the active provider's stored
  access token. Returns null silently on 401 / network failure so
  the UI doesn't flash error strips.
- New BalanceBar component renders a compact pill right below the
  ChatInput: `[wallet icon] $X.XX 剩余 · 已用 $Y.YY · N 次`. Polls
  every 60s. Hidden when not logged in.
- Quota → USD display uses NewAPI convention (500_000 units = $1).

heicode Manager (Go controller):
- `GetDesktopDownloads` rewritten to pull from the same Azure Blob
  updater manifest the in-app updater uses (`heicodeblob/.../
  updater/latest.json`). 5-min in-process cache; stale-on-error
  fallback. Stops the Manager web from showing stale
  `Heicode_0.1.0_x64-setup.exe` after fresh releases.
- `DownloadDesktopFile` kept for back-compat — it now 302s to the
  manifest's blob URL instead of streaming a VM-local file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 17:22:15 +08:00
chenchenandClaude Opus 4.7 da80b97f54 release: 0.1.5 — hide IM adapter UI (out of product scope)
Per product-package design docs, IM integration (Lark / Feishu /
Telegram) is not a Heicode surface. Hide UI without ripping out
plumbing — keep AdapterSettings.tsx + adapterStore + types in the
source tree so re-enabling is a one-flag flip.

- Settings.tsx: drop the "IM 接入" tab button (`'adapters'` route
  still resolves internally if someone forces it, but no nav).
- NewTaskModal.tsx: remove the IM notification channel pickers
  (Feishu / Telegram checkboxes + "no channel configured" warning).
  Existing task `notification` config is preserved on edit; it's
  just no longer mutable from this UI.
- Unused imports (useEffect, useAdapterStore) cleaned to satisfy
  TS strict mode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 16:13:05 +08:00
chenchenandClaude Opus 4.7 6c477881c4 release: 0.1.4 — sidebar time filter + clickable user card
- Sidebar search row gains a recency-filter chip (All / 1d / 3d /
  7d). Active filter highlights brand color; selection persists in
  localStorage (`cc-haha.sidebar.timeFilter`). Default `all` keeps
  current behavior.
- SidebarUserCard becomes a button — clicking the avatar/name pill
  opens https://code.xinghanlab.com/ in the system browser via
  @tauri-apps/plugin-shell, with window.open fallback for dev builds.
  Collapsed-sidebar avatar circle also clickable.
- i18n: `sidebar.timeFilter.title/all` + `sidebar.userCard.openProfile`
  added in zh + en.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 15:53:22 +08:00
chenchenandClaude Opus 4.7 66b47f61be release: 0.1.3 — periodic update check + sidebar 1/3/7/all groups
- updateStore: arm a 2-hour periodic checkForUpdates after the
  startup pass so users who keep the client open for days still
  see new releases without restarting. Idempotent, silent — only
  the top-right popup surface fires.
- Sidebar: bucket session history into Past 24h / Past 3 days /
  Past 7 days / All older (was Today/Yesterday/7d/30d/Older).
  Rolling windows from `Date.now()` instead of calendar bounds.
- i18n: replace `today/yesterday/last7days/last30days` keys with
  `within1day/within3days/within7days`; ScheduledTasksList and
  ScheduledTasksEmpty migrated to the new keys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 15:23:48 +08:00
chenchen f888163ba7 release: bump to 0.1.2 (Mac+Win re-release including About cleanup) 2026-05-13 14:39:02 +08:00
chenchenandClaude Opus 4.7 50830c2393 feat(desktop): 0.1.1 — UX fixes + multiSelect + clean About + version bump
Roll-up of tonight's desktop fixes shipped as 0.1.1:

- PermissionDialog: cap diff/command preview at max-h-360 so the
  allow/deny buttons stay above the fold on huge writes (user
  reported scrolling 900 lines to find the buttons).
- SessionTaskBar + cliTaskStore: hover row shows ✓ manual-close
  button for tasks the agent forgot to mark completed.
- AskUserQuestion: honor schema's `multiSelect: true` — toggle
  membership across options, switch round → square indicator,
  show "可多选" hint, join answers with comma.
- HeicodeLoginPage: removed dead `'official'` filter that blocked
  the typescript build (legacy provider id no longer in the union).
- Settings About: removed the third-party social-media block and
  unused openUrl helper.
- i18n: replaced misleading "GitHub Releases" wording with
  "Heicode 官方更新源" / "Heicode update source" — actual channel
  is Azure Blob (msi/updater/latest.json) per tauri.conf.json.
- release-desktop.mjs: az invocations now run with shell:true so
  the Windows `az.cmd` resolves; also uploads the manifest to
  blob (primary endpoint) as the script finishes.
- tauri.conf.json + package.json + Cargo.toml: version bumped to
  0.1.1.
- website/public/updater/latest.json: now reflects 0.1.1 + new
  signed NSIS URL (mirrored to blob by the release script).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 14:34:26 +08:00
chenchenandClaude Opus 4.7 739354e786 feat(desktop): rotate updater key + concrete release pipeline
- pubkey: rotated to the keypair stored at
  C:\Users\陈晨\.heicode-updater\heicode_updater.key (private side
  is the user's; only the pubkey ships in tauri.conf.json).
- scripts/release-desktop.mjs: one-shot release helper —
  uploads the signed bundle artifacts to Azure Blob (account
  heicodeblob, container msi, public-blob-read) and rewrites
  website/public/updater/latest.json to point at the new URLs.
- UPDATER.md: rewritten with the concrete URLs, container, key
  paths, and step-by-step commands. No more generic placeholders.

Azure Blob setup (done out-of-band, not in this commit):
- Storage account heicodeblob set allowBlobPublicAccess=true
- Container msi set to public-blob read
- Smoke-tested: https://heicodeblob.blob.core.windows.net/msi/<x>
  returns 200 anonymously.

The actual Azure connection string + private-key path live in
scripts/.env.release, which is gitignored under .env.* and was
verified excluded before this commit.

NOTE: pubkey was rotated. Any MSI already in the wild signed by
the *previous* key cannot self-update to this signing chain —
those users need a fresh manual install. This is acceptable for
pre-GA where no public release exists yet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 16:50:14 +08:00
chenchenandClaude Opus 4.7 49be79fb9a feat(desktop,website): wire updater endpoint + release tooling
- tauri.conf.json: endpoints now points at the website-hosted
  manifest (https://<azure-swa>/updater/latest.json) so the
  already-built UpdateChecker actually has somewhere to check.
- website/public/updater/latest.json: placeholder manifest with
  empty platforms map (clients will see "up to date" until a real
  release ships).
- scripts/build-updater-manifest.mjs: helper that ingests signed
  Tauri bundle artifacts and emits the manifest, so future releases
  are one node command instead of hand-edited JSON.
- scripts/UPDATER.md: step-by-step for every release — what to set,
  what to upload, where to commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 16:18:51 +08:00
chenchenandClaude Opus 4.7 c17be9ef3b feat(desktop): StreamingIndicator surfaces active tool + target
Replace the random spinner verb with a friendly description of the
tool currently running — "Reading foo.ts", "Editing bar.tsx",
"Running npm", "Searching <pattern>". Falls back to the verb / chatState
label when no tool is active.

Why: users were seeing "Percolating... 51s" with no idea whether the
agent was stuck or genuinely working. The chatStore already tracks
activeToolName + streamingToolInput, the indicator just wasn't using
either.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 16:08:47 +08:00
chenchenandClaude Opus 4.7 2df233b982 feat(manager): align Manager UI with product-package docs §10/§11/§13
Five gaps closed against the updated product-package spec
(http://gitee.ath.cx:3000/xiaohei/heicode/src/branch/main/docs/product-package):

P1. /dashboard hero rewritten per §10 §"初始首页"
    features/dashboard/components/home-hero.tsx replaces the technical
    CockpitView with four blocks the spec mandates: 主输入 / 继续任务 /
    今日焦点 / 辅助入口. Main input is "你想把什么想法变成可以上线的软件?".
    Submit only stashes the idea to localStorage + toast — the actual task
    conversation belongs in the desktop client per §13 §5.1.

P2. /tasks/$id TaskCard route per §10 §"任务卡" + §11 §3
    features/tasks/task-card-view.tsx renders one AgnetDeployment as the
    user-facing task object: 目标 / 第一版范围 / 自动生成 / 待确认上下文 +
    Manager 辅助按钮. Linked from Home hero's 继续任务 list.

P3. /sk-sources 推荐摘要 dialog per §10 §"推荐确认卡"
    features/agnet-console/pages.tsx RecommendationSummaryDialog. Five
    blocks (本次会做 / 本次允许使用 / 本次不会做 / 高危规则 / 预计消耗) +
    Launch Agnet button with "参数由 Heicode 自动生成" caption. No JSON
    editor, no permission manifest — §10 高级展开禁令.

P4. /audit redacted card view per §10 §"任务用量与审计" + §6
    features/agnet-console/pages.tsx AgnetAuditPage. Old裸 table replaced
    with脱敏 cards exposing only the fields docs allows: resource_id /
    resource_type / allowed_actions / constraints / secret_ref. Helper
    function maskIfSecret() catches any stray plaintext credential the
    backend might leak. Banner says explicitly "明文密钥从不展示".

P5. Login screen filters Claude Official provider per §8
    cc-haha/desktop/src/components/login/HeicodeLoginPage.tsx hides the
    legacy `official` preset so the login carries Heicode brand alone.

i18n fix (BIG):
    i18next defaults to `defaultNS = 'translation'`. The earlier custom
    keys had been written to the JSON root, NOT into translation, so
    every t('Preparation checklist') was returning the English key as
    fallback all along. Moved 67 orphan keys (zh+en, both files) into
    the translation namespace where they're actually resolvable. Verified
    by loading i18next + zh.json in bun and confirming all keys resolve
    to the expected Chinese strings.

Cache-busting from earlier session (already deployed via SFTP, never
committed): index.html / constants.ts / footer.tsx now hold the
?v=h-glass-2 suffixed asset URLs in git, so future docker rebuilds
preserve them.

Per user directive: tested locally only (TS check clean, i18next
resolves correctly). NOT deploying to the VM in this commit — user
asked to keep production untouched until they verify the changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:01:13 +08:00
chenchenandClaude Opus 4.7 54d6a67ecf feat(client): logged-in user card in sidebar (always visible)
The earlier UserPill landed in the TitleBar tab strip, but the main
desktop layout (HeicodeTasksHome shell) renders its own chrome without
that strip — so the user info ended up invisible despite mcpAuth
having the right data after a2deeb6. Pull the same identity (avatar
gradient + name + email + role badge) straight into the bottom of
Sidebar.tsx, right above the logout/settings rows, so it's visible
on every screen regardless of which top bar is mounted.

Two layouts:
- expanded: 36px gradient avatar + name + email + admin/root badge
- collapsed: 36px avatar circle only, title tooltip carries the email

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:10:17 +08:00
chenchenandClaude Opus 4.7 da218ebbe5 fix(client): CLI launcher recognises new heicode-sidecar binary name
resolveBundledCliPathFromExecPath / resolveClaudeCliLauncher hardcoded
startsWith('claude-sidecar') / startsWith('claude-server') checks. After
the 3a358ba rebrand the bundled binary is heicode-sidecar-*.exe — the
match fails, the function returns null, and resolveCliArgs falls back
to the Windows --preload script branch which spawns the bun-compiled
sidecar with arguments it doesn't understand. The process exits 2
silently (empty stderr), surfacing in the UI as:

    Error: CLI 进程启动失败。
    CLI exited during startup with code 2.

Symptom user report: pilac69779@codoteam.com freshly registered, OAuth
login succeeded but every chat attempt failed at sidecar startup.

Fix: accept both `heicode-` and legacy `claude-` prefixes for sidecar /
server / cli binaries so MSI #15+ launchers work AND
CLAUDE_CLI_PATH=/path/to/legacy/claude-sidecar still works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 21:13:43 +08:00
chenchenandClaude Opus 4.7 a2deeb61b0 fix(client+server): OAuth login path now surfaces user identity in desktop TitleBar
Root cause of the recurring "I don't see the logged-in user info in the
desktop client" complaint: the credentials-login path builds an mcpAuth
record with email / displayName / role from the mcp-server /api/auth/login
response and the TitleBar UserPill renders fine. But the OAuth-login path
(the typical browser-redirect flow) only received an sk- API key in the
callback query string — no user fields. So:

  status.user                   == null
  UserPill: if (!user) return null
  → blank space where the user pill should be.

Fix on backend (heicode_oauth.go HeicodeOAuthAuthorize):
- After issuing the sk- token, load the authenticated user from the
  session and embed email / name / role (root|admin|user) / channel_id /
  user_id as query params on the redirect URI.

Fix on client (cc-haha/src/server/api/heicode-auth.ts handleOAuthCallback):
- Read those query params (pickUserFromQuery), build an mcpAuth record
  (buildMcpAuthFromOAuthQuery), and pass it through loginAndActivate the
  same way the credentials path does. The accessToken slot holds the sk-
  key as a placeholder — OAuth flow doesn't deliver a refreshable JWT
  pair, and this mcpAuth exists purely to surface identity on the
  TitleBar.

After this, OAuth-route users see the same gradient-avatar pill with
their email / name / role badge that credentials-route users already see.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 20:44:33 +08:00
chenchenandClaude Opus 4.7 dc33522a84 fix(client): tauri.conf externalBin claude-sidecar → heicode-sidecar (missed in 3a358ba — broke MSI #13 build)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:05:58 +08:00
chenchenandClaude Opus 4.7 3a358ba5e1 refactor(client): full Claude→Heicode rebrand across desktop runtime
Beyond the i18n strings rebrand (b55d103) this pass cleans up everything
that still surfaced "Claude" in the built artifact:

Theme tokens (cc-haha/desktop/src/theme/globals.css)
- light-mode text-selection-bg rgba(197,165,114,*) → rgba(123,107,227,*)
  (selecting ANY text in light mode used to paint a gold highlight)
- dark + light diff-highlight-bg / -gutter switched from gold to brand
  violet rgba(123,107,227,*) — keeps semantic "highlight" without leaving
  the brand

Sidecar binary rename: claude-sidecar → heicode-sidecar
- desktop/sidecars/claude-sidecar.ts renamed (git mv)
- internal log prefix strings (12 occurrences) updated
- desktop/scripts/build-sidecars.ts: entrypoint / outfileBase / productName
  ('Heicode Sidecar') / publisher ('Heicode') — these last two are embedded
  in the .exe metadata you see in File Properties
- src-tauri/capabilities/default.json: 9 binaries/claude-sidecar references
  rewritten + description "Default capabilities for Heicode Desktop"
- src-tauri/src/lib.rs: 2 .sidecar("claude-sidecar") + 3 packaged sidecar
  exe filename strings + 1 doc comment
- desktop/sidecars/launcherRouting{,.test}.ts

After this rebuild, Task Manager shows heicode-sidecar-*.exe child
processes (was claude-sidecar-*.exe) and right-click → Properties on
that binary shows "Heicode Sidecar" / "Heicode" instead of "Claude Code".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:56:03 +08:00
chenchenandClaude Opus 4.7 b6607c9a3e fix(client): light theme stuck on old gold palette
[data-theme=light] block in globals.css still defined --color-primary as
#8E7547 with gold gradient buttons and gold focus rings. Dark mode was
correctly on the brand violet #7B6BE3 since the Iris overhaul, but the
moment a user switched to (or was OS-defaulted to) light theme they got
the legacy gold mark on login button, focus ring, sidebar active state,
shadow-button-primary, etc.

Rewrote the light override to mirror the dark brand palette:
- --color-primary #7B6BE3, primary-container #5B4FB8, fixed #9A8DEC
- --color-secondary #6B7CE0 (was slate #5A6B82)
- --gradient-btn-primary 3-stop violet→blue (matches dark mode + Manager)
- --gradient-brand-wordmark also added in light scope (was inheriting
  but explicit avoids cascade surprises)
- All rgba(142,117,71,*) shadows / borders rewritten to rgba(123,107,227,*)

Code-syntax / diff highlight golds left alone (those tint code text, not
brand UI).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:27:45 +08:00
chenchenandClaude Opus 4.7 b55d103ea3 feat(client): rebrand user-facing 'Claude' strings → 'Heicode'
Permission prompts, chat placeholder, empty state, computer-use
approval, MCP / Agents / Skills / Plugins / Computer Use settings
descriptions all said "Claude" — the desktop client is a Heicode
product, not Claude Code. 23 strings in zh + en updated.

Protected (deliberately kept):
- settings.claudeOfficialLogin.* — feature literally signs into Claude.ai
- 'Claude Official' / 'Claude.ai' — upstream provider names
- ~/.claude/* file paths — actual filesystem locations the CLI reads
- claude-plugins-official — github org id in plugin marketplace
- '(Claude' in loggedInPrefix — formats real upstream session subtype

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 14:05:31 +08:00
chenchenandClaude Opus 4.7 5fc78f28c1 feat(client): Wave 2 — premium polish for chat, sidebar, task home surfaces
Wave 1 was design tokens + login screen. Visible-but-subtle. Wave 2
ships the meaningful in-app changes a user actually sees after they
log in. Aggressive enough that the post-login surface feels like a
2024-vintage product, not a 2018 utility.

User chat bubble (src/components/chat/UserMessage.tsx)
  - Background: violet-tinted vertical gradient
    (rgba(123,107,227,0.10 → 0.04)) over surface-user-msg
  - 1px violet-18% border + soft violet-8% drop shadow
  - Asymmetric corner (18/4/18/18) preserved
  - Effect: user messages read distinctly from assistant messages
    at a glance, no need to look at the avatar.

Assistant chat bubble (src/components/chat/AssistantMessage.tsx)
  - Top-down white wash (rgba 0.025 → 0) on container surface
  - Two-stop shadow (1px ambient + 4px lift) so the bubble lifts
    off the page instead of disappearing into the chat background
  - Border tightened to full --color-border (was 60% opacity)

Glass-panel composer surface (src/theme/globals.css)
  - Top violet wash (5% → 0% over 35%) over glass surface
  - Inset top hairline (white 4%) for lit-from-above feel
  - Hover: violet-18% border tint
  - Focus-within: violet-45% border + 3px violet-18% halo + dropdown
    shadow, so typing feels obviously "on"
  - Smooth 200ms transitions on border + shadow

Sidebar active session (src/components/layout/Sidebar.tsx)
  - Left edge: 0.5px × 20px violet→blue gradient rail with 8px
    violet glow — instant focus anchor
  - Active dot: 8px violet glow shadow
  - Active row: 1px violet-24% border + inset top hairline
  - Inactive: hover lifts text to primary (was secondary→primary on
    hover, now also adds violet-6% bg tint via token change)

Tasks home intent box + recent task cards + workspace reply box
(src/pages/HeicodeTasksHome.tsx)
  - Intent box: violet wash gradient + transition + hover/focus
    border tint
  - Recent task cards: hover -translate-y-px lift + violet-32%
    border + violet-10% drop shadow → clearly clickable
  - Workspace reply box: same violet wash + focus halo

Type-check: bunx tsc -b --noEmit clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 18:09:22 +08:00
chenchenandClaude Opus 4.7 463f9be2db feat(client): premium UI overhaul — Iris design system + single-instance lock
Production-grade visual upgrade. Pulls the violet→blue gradient from
the H glass app icon up into a coherent design system: brand color,
focus rings, button gradients, sidebar accents, selection highlight,
shadow tints all derive from the same palette. Result: login surface
no longer clashes with the app icon, post-login UI feels like a
single product instead of a Tauri shell.

Changes
-------

src/theme/globals.css — Iris design tokens:
  - --color-primary #C5A572 (gold) → #7B6BE3 (violet, from logo)
  - --color-secondary slate → #6B7CE0 (blue from logo)
  - --color-tertiary gold → #9A8DEC (lighter violet)
  - Surface stack rebased to slight cool/blue undertone (#13131A,
    #181820, …) so violet accents pop without clashing
  - Borders softened: --color-border 0.08 → 0.06, separator 0.06 → 0.04
  - Radii loosened: sm 4 → 6, md 8 → 10, lg 12 → 14, xl 16 → 18
  - --gradient-btn-primary: 3-stop violet→primary→blue (replaces flat
    gold gradient); CTA glow shadow tinted violet
  - --gradient-brand-wordmark exposed as a token so wordmark / avatar
    gradient stays consistent across surfaces
  - --shadow-dropdown: 3-stop layered, dark stop tinted violet so
    floating menus feel of-a-piece with brand
  - --shadow-focus-ring: violet 55% so input focus is visible
  - --color-selection-bg: violet 32%
  - Sidebar item hover/active: rgba violet base instead of plain white
  - Sidebar panel backdrop: 2-stop radial (violet top-left + blue
    bottom-right) replacing plain gold radial
  - Type scale tokens: --text-xxs … --text-display
  - Body font-feature-settings: 'kern','liga','cv11' +
    text-rendering: optimizeLegibility for crisp Inter / Manrope
  - .tabular-nums utility for status counters

src/components/login/HeicodeLoginPage.tsx — login redesign:
  - Embeds /app-icon.png (the H glass logo) above wordmark
  - Drop-shadow violet-tinted so icon feels continuous with backdrop
  - Layered backdrop: violet halo top, blue glow bottom, faint SVG
    grain texture for tactile premium feel
  - Wordmark + tagline use --gradient-brand-wordmark token
  - Card max-width tightened to sm (was md) for taller, more focused
    composition (Linear / Vercel / Raycast desktop login style)
  - Chrome strip: blurred translucent surface

src/components/login/ProviderLoginCard.tsx:
  - Card gets faint violet→neutral surface gradient (lifts off backdrop
    without heavy 1px border)
  - Top hairline accent (centered violet line) at card top edge
  - CTA button uses --gradient-btn-primary; hover glow stronger;
    active scale 0.99 microinteraction
  - Removed hardcoded rgba(197,165,114,…) gold artifact

src/components/layout/TitleBar.tsx:
  - UserPill avatar gradient now uses --gradient-brand-wordmark token
    (was inline hardcoded violet) so future palette tweaks propagate

src-tauri (Cargo.toml + src/lib.rs):
  - Add tauri-plugin-single-instance and register it as the FIRST
    plugin in the Builder chain. Subsequent Heicode launches focus
    the existing window via show_main_window() instead of spawning
    a new sidecar / new server port. Fixes "every shortcut click
    starts a new instance" behavior.

Verification
------------
  - bunx tsc -b --noEmit (desktop)         clean
  - cargo check (src-tauri)                 clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 17:38:31 +08:00
chenchenandClaude Opus 4.7 6ca8bf42d6 feat(client): match login color to logo + show user pill in title bar
#1 Login wordmark color
   The big "HEICODE" wordmark on the login page was rendered in the
   gold brand color (#C5A572), which clashed visually with the
   purple→blue glassy H app icon shown in the window/taskbar/dock.
   Now the wordmark uses the same linear-gradient(135deg, #B888E5,
   #6B7CE0) as the logo so the login surface matches the icon.
   Backdrop radial glow tinted to match. Other surfaces keep gold
   primary so buttons/accents stay consistent app-wide.

#3 User pill in TitleBar
   Logged-in users had no in-app affordance to confirm "I'm signed
   in as X" or to know which account they're using. Add a pill on
   the right of TitleBar showing initial avatar (logo gradient) +
   display name + admin/root role badge.

   Wiring:
   - cc-haha/src/server/types/provider.ts: McpAuth gains optional
     email / displayName / role fields. Backwards-compatible (all
     optional, existing saved providers stay valid).
   - cc-haha/src/server/api/heicode-auth.ts: handleLoginWithCredentials
     now reads user.{name|display_name, email, role} from the
     /api/auth/login response and persists them on the provider's
     mcpAuth record. /api/heicode-auth/status returns a `user` field
     synthesized from the active provider.
   - cc-haha/desktop/src/api/heicodeAuth.ts: HeicodeAuthStatus type
     gains the `user` shape.
   - cc-haha/desktop/src/components/layout/TitleBar.tsx: new UserPill
     component reads from useHeicodeAuthStore; hidden until status
     loads so the bar doesn't flicker on boot.

Type-check: bunx tsc -b --noEmit clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:52:36 +08:00
chenchenandClaude Opus 4.7 2db20738d7 fix(client): regen all PNG icons as RGBA so macOS Tauri bundler accepts them
Tauri's macOS bundler validates that every PNG referenced from
src-tauri/icons/ is RGBA. Our previous rebuild-icons.py wrote RGB PNGs
because the trim/pad pipeline lives in RGB to keep transparent edges
out of the glassy logo. macOS build failed with:

    error: proc macro panicked
       --> src/lib.rs:1073:16
    message: icon /.../desktop/src-tauri/icons/32x32.png is not RGBA

Fix: scripts/rebuild-icons.py now does `.convert("RGBA")` on every
PNG output before saving. Alpha is fully opaque (255) — the rounded
glass edges retain their look on any background since we paint on
solid white in load_trimmed_square. Same files keep working for
Windows .ico embedding (which accepts RGBA fine).

Regenerate all 17 PNG outputs (32/64/128/128@2x/icon.png + 9 Square*
+ StoreLogo + public/app-icon.png) and the derived .ico/.icns.

Mac side: pull this commit and re-run `bun run build:macos-arm64`.
Windows side: no change in behavior (Tauri's NSIS bundler doesn't
care about PNG color mode).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:25:26 +08:00
chenchenandClaude Opus 4.7 58f0a312ef fix(client): suppress run/stop button flicker during CLI restart transitions
ModelSelector and PermissionMode changes trigger a server-side CLI
restart (handler.ts:521 restartSessionWithRuntimeConfig). The server
emits status:'thinking' with verb 'Switching provider and model...' or
'Restarting session...' to keep the spinner spinning during the ~3s
restart window. ChatInput's isActive=`chatState !== 'idle' && hasMessages`
guard let the run button flash to a red 「stop」 affordance during that
window for any session with prior messages — confusing because hitting
stop has nothing to interrupt.

Add a statusVerb prefix check so isActive stays false during these
system transitions:

  isSystemRestartTransition =
    statusVerb.startsWith('Switching provider and model') ||
    statusVerb.startsWith('Restarting session')

  isActive = chatState !== 'idle' && hasMessages && !isSystemRestartTransition

Match by prefix so any future suffix (e.g. " (CLI starting...)") still
trips the guard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:10:58 +08:00
chenchenandClaude Opus 4.7 30056136ea fix(client): 6 desktop bugs reported in real-world testing
#1 — Untitled session can't be deleted
   src/server/services/sessionService.ts:deleteSession is now idempotent.
   Previously placeholder sessions whose JSONL file hadn't been flushed
   yet would 404 the delete and stay stuck in the sidebar list. Now we
   succeed silently if the file's gone (and treat ENOENT during unlink
   the same way), matching how the frontend already optimistically
   removes the row.

#2 — Run button turns red 「stop」 on idle when switching model
   desktop/src/components/chat/ChatInput.tsx — gate isActive on
   hasMessages. ModelSelector / runtime config changes briefly flip
   chatState off-idle (CLI reconnect / startup). Without messages
   there's nothing to stop, so the button should stay disabled
   gradient, not turn into a red stop affordance.

#3 — Draft input bleeds across session switches
   desktop/src/components/chat/ChatInput.tsx — ChatInput is mounted
   once at app shell level; switching tabs doesn't re-mount it, so
   the local `input` useState carried over. Add a useEffect keyed on
   activeTabId that resets input + attachments + open menus + filter
   buffers. composerPrefill path (rewind) keeps owning its own reset
   via the existing prefill effect.

#4 — Close (×) minimized to tray instead of quitting
   desktop/src-tauri/src/lib.rs — drop the prevent_close + hide
   pathway on the main window's CloseRequested. Close now actually
   quits; users who want to keep the app running can minimize via
   the existing window controls. Tray icon stays available for
   re-open + explicit quit.

#5 — Tray menu hardcoded "Claude Code Haha"
   desktop/src-tauri/src/lib.rs — rename tray menu items, tray
   tooltip, and macOS app submenu to "Heicode" / "显示 Heicode" /
   "退出 Heicode" / "关于 Heicode".

#6 — Skills page silently empty when one source crashes
   src/server/api/skills.ts:listSkills uses Promise.allSettled so a
   single failed source (user / project / plugin) returns a partial
   list + structured errors[] instead of tanking the whole response.
   desktop/src/api/skills.ts + stores/skillStore.ts thread the
   errors through; SkillList only shows the hard-error wall when
   skills.length === 0.

Verification:
  bunx tsc -b --noEmit (desktop)        — clean
  bunx tsc --noEmit (cc-haha root)      — clean
  cargo check (src-tauri)               — clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 13:48:40 +08:00
chenchenandClaude Opus 4.7 b845a08840 feat(client): slice 15 — SSE subscription for approvals + task events
Wire mcp-server's §7.8.3 single SSE channel (GET /api/user/events/stream,
shipped 2026-05-08 in image heicode-7.8.3-sse-v2-20260508) into the client:

  cc-haha/src/server/api/heicode-tasks.ts
    + GET  /api/heicode-tasks/events/stream      (long-lived SSE proxy)
    + GET  /api/heicode-tasks/approvals          (startup pull)
    + POST /api/heicode-tasks/approvals/:id/decision

  cc-haha/desktop/src/lib/heicodeEventsClient.ts (new)
    EventSource wrapper with exponential backoff reconnect (1s..30s) and
    a 60s heartbeat watchdog that force-reconnects on stream silence.

  cc-haha/desktop/src/lib/heicodeEventsRouter.ts (new)
    Routes the 5 event names (approval.requested, approval.resolved,
    task.status_changed, task.execution_progress, heartbeat) into the
    matching stores. Ignores unknown events so future server-side adds
    don't crash the client.

  cc-haha/desktop/src/stores/heicodeTaskStore.ts
    + applyStatusChange(taskId, status, caption?)
    + applySubStepProgress(taskId, subStepId, status, caption?)

  cc-haha/desktop/src/main.tsx
    Subscribe to auth store → start/stop the stream as loggedIn flips.

Type-check: bunx tsc -b --noEmit clean.
Bun bundle: bun build src/server/api/heicode-tasks.ts → 86 modules, 0.55 MB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 21:19:47 +08:00
chenchenandClaude Opus 4.7 bb3c2c707b feat(client): one-click Manager OAuth login
Replace the email + password form on the desktop login card with a single
"一键登录 Heicode Manager" button that drives the existing OAuth bridge:

  desktop click
    → POST /api/heicode-auth/oauth/start (server stages state + builds
      authorize URL pointing at https://code.xinghanlab.com/heicode/oauth/authorize)
    → Tauri shell.open() the authorize URL in the system browser
    → user signs in via Manager (which now also routes /sign-in?redirect=...)
    → Manager 302s back to http://127.0.0.1:<port>/api/heicode-auth/oauth/callback?token=sk-…
    → callback handler activates the provider; status flips loggedIn=true
    → AppShell unmounts the login page

The OAuth start/callback endpoints already existed (handleOAuthStart /
handleOAuthCallback) so this is a UI-only swap; no auth-store changes.
loginWithCredentials remains exported in case we ever need a fallback,
but it's no longer wired into any UI surface.

i18n: tweak login.oauth.button to "一键登录 Heicode Manager", add
login.oauth.waiting for the polling state.

Aligns with upstream xiaohei/heicode commits 5bd8276 / e60e74b /
34a87a4 (Manager-as-only-identity) without breaking the slice 11-14
heicode-tasks proxy that still depends on the provider abstraction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 20:34:05 +08:00
xiaoheiandchenchen 87b30b8fa1 fix: 修复登录时 /v1/models 空列表 panic 导致 500
- heicode/controller/model.go: Anthropic ListModels case 对空模型列表
  做边界保护,避免 index out of range panic -> HTTP 500
- cc-haha/src/server/services/providerService.ts: 模型探活不再发送
  anthropic-version header,统一走 OpenAI 兼容路径返回 {data:[]}
- heicode/controller/heicode_oauth.go: OAuth 未登录重定向指向 /sign-in
- heicode/deploy/nginx/heicode-gateway.conf: 3000 端口 server block
  补充 /models -> /v1/models 兼容路由
2026-05-08 20:19:21 +08:00
chenchenandClaude Opus 4.7 15ac00130a feat(client): slices 8-14 — exec/delivery/audit panels + §6 task orchestration wiring
Wireframe coverage (product-package 11-product-prototype-wireframes.md):
  §8  ExecutionFeedbackPanel — sub-steps + sk_tool_calls + events + artifacts (Slice 8)
  §10 DeliveryResultPanel — deliverables + quality + next-actions (Slice 9)
  §audit TaskDetailDrawer — usage / resources / approvals / security tabs (Slice 10)

§6 task orchestration wired (mcp-server contract v2.0):
  Slice 11 — heicode-tasks proxy (5 routes) + typed client + store mode
             (mock | live | loading | error) + ModePill + optimistic updates
  Slices 12/13/14 — lazy-load /execution, /delivery, /audit?tab=... on panel
             mount with shouldFetchPanel gate (skips for seed mock ids)

§7.8.5 deeplink: lib/managerLink.ts centralizes path→URL resolution so the
Manager domain (currently code.xinghanlab.com) can be flipped in one line.
Wires onClick into manager_actions / openManager / deliverable buttons.

Type-check: bunx tsc -b --noEmit clean.
Bun bundle: bun build src/server/api/heicode-tasks.ts → 86 modules, 0.55 MB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:39:47 +08:00
chenchenandClaude Opus 4.7 9ffe261374 feat(client): refresh brand to Heicode H logo + align macOS build script
- Replace logo source with new glassy gradient H (heicode-logo.jpg)
- Regen all icon sizes via scripts/rebuild-icons.py (PIL + ICO + ICNS):
  32/64/128/128@2x/icon.png + Square{30,44,71,89,107,142,150,284,310}+StoreLogo
  + multi-res icon.ico + icon.icns
- Update public/app-icon.png to 1024×1024 derived
- Align cc-haha/desktop/scripts/build-macos-arm64.sh to Heicode branding:
  APP_BUNDLE_NAME=HeiCode.app, APP_BUNDLE_ID=com.heicode.desktop,
  DMG volume=Heicode, default DMG=Heicode_0.1.0_aarch64.dmg,
  cleanup paths use heicode-desktop crate name (mirrors Cargo.toml rename)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:38:36 +08:00