Commit Graph
13 Commits
Author SHA1 Message Date
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.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 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
gongzhiyong 1efcf73992 chore: consolidate heicode workspace into single repository
Import cc-haha and new-api into a single repository layout for unified delivery.

Made-with: Cursor
2026-04-29 21:08:15 +08:00