Commit Graph
100 Commits
Author SHA1 Message Date
weishu 0d2d029c81 Release version 0.25.2 2026-07-31 21:26:14 +08:00
weishu 3f73a5f6ef feat(web): collapse session search into the sidebar toolbar row
Move the session-list search out of its dedicated full-width row and
into the sidebar toolbar, so the sidebar gets one compact header row
instead of two stacked rows.

Behavior:
- Collapsed by default: a search icon sits at the left of the toolbar
  row, on the same line as the existing tool icons (codex import,
  refresh, browse, settings, new session).
- Clicking the icon expands the input to fill the entire row width
  (tool icons hide) and focuses the input; when focus leaves the
  search container the input collapses back to the icon.
- Query and date range stay applied while collapsed; the icon shows
  an indicator dot whenever any filter is active.
- The date-range picker stays inside the expanded input.

Implementation:
- SessionList gains a headerActions prop and renders a single header
  row: [collapsible search] [spacer] [optional renderHeader plus]
  [headerActions].
- SessionsPage drops its own toolbar wrapper and passes its five
  buttons through headerActions instead.
- The safe-area top inset moves to the router container wrapping both
  the error banner and the list, so iOS PWA error text no longer sits
  beneath the status bar/notch.

Focus handling (review follow-ups):
- Controls that unmount themselves on click (clear-query X, picker
  backdrop, range-end selection, picker footer Clear) silently moved
  focus to <body>, leaving the search expanded but no longer
  collapsible via blur. Each now returns focus to the input; the
  picker footer Clear is wired through a dedicated onClear prop.
- Header actions can no longer be suppressed by a stale expanded
  state: they render whenever the search control itself is absent
  (e.g. the session list empties via SSE), and the expansion resets
  when the list becomes empty.

i18n: add sessions.search.open (en / zh-CN).

Tests: adapt existing search/date-filter tests to expand the search
before interacting; add regressions for collapse-on-blur query
persistence, focus restore after clearing the query and after
clearing the date range, and header actions surviving an emptied
session list.
2026-07-31 19:52:27 +08:00
weishu b3a1f5fafd fix(web): hide background message sync indicator
Remove the top-right Loading messages pill shown while tail reconciliation runs with cached conversation content.

Keep background tail synchronization silent so it does not compete with older-history loading feedback or imply that the visible conversation is blocked. Cold-start skeletons, pull-to-load guidance, older-page loading state, unseen-message navigation, and global reconnect feedback remain unchanged.
2026-07-31 15:59:42 +08:00
weishu 584d1647d0 fix(web): harden older history loading 2026-07-31 15:59:42 +08:00
weishu 633e990d7f Fix codex action 2026-07-29 19:53:51 +08:00
weishu a469d66bc4 fix(web): patch assistant-ui tap scheduler for bulk history prepends
Loading an older page prepends hundreds of messages in one flush. tap's
scheduler aborts after 50 dirty resources and drops the overflow, so the
thread never applied the merged page: the scroll-restore gate never
passed and the top sentinel kept re-triggering (loads everything at
once). Raise MAX_FLUSH_LIMIT 50->2000 via bun patchedDependencies.

Adds a Playwright regression spec driving the real message-window store
and HappyThread against a fake paginated API: one page per top
approach, scroll restored, no idle reloads.
2026-07-28 19:39:32 +08:00
weishu fcb56989d9 feat(web): load older history by scrolling to top
Remove the redundant "Load older" button; the existing top sentinel
already auto-loads older pages when approaching the top. Loading state
moves to a floating pill overlay so prepends no longer shift layout.
2026-07-28 19:39:32 +08:00
weishu f0e7e6ad20 Release version 0.25.1 2026-07-28 15:45:13 +08:00
weishu b00c5938a1 fix(web): stabilize history scrolling
Load one older page per top intersection and restore the scroll anchor only after assistant-ui applies the matching history version.
2026-07-28 15:03:10 +08:00
weishu 02c23222b4 Release version 0.25.0 2026-07-28 12:29:30 +08:00
weishu b93b789238 fix(hub): reconcile divergent sqlite schema migrations 2026-07-28 12:27:33 +08:00
weishu 92958890de fix(codex): preserve transcript sync across mode switches 2026-07-28 12:20:54 +08:00
weishu f0c7d0b7e7 fix(codex): preserve reasoning effort across mode switches 2026-07-28 12:20:54 +08:00
weishu faf70c64dd refactor(sync): replace message reloads with incremental tail sync 2026-07-28 12:20:53 +08:00
weishu 84cd9aa3b1 fix(web): show more history per page and flush pending messages on session re-entry
- Raise message page size 50 -> 200 (hub max) so cold loads and load-older
  show more than a handful of rendered bubbles
- Flush pending messages when the thread forces scroll-to-bottom on mount,
  and re-read atBottom after the latest fetch instead of using the stale
  pre-fetch snapshot, so new messages no longer stay invisible after
  leaving and re-entering a session
- Base the cold-load backfill floor on rendered conversation identities:
  skip non-rendering rows (token-count/ready events, un-normalizable
  content) and collapse tool call/result pairs into one card identity
2026-07-27 20:18:50 +08:00
weishu f4be735cb5 fix(hub,web): stop machines from showing raw id prefixes as names
Hub: getOrCreateMachine now merges incoming machine-owned metadata over
the stored row (first-write-wins previously kept rows registered without
a host name nameless forever; hub-only fields like displayName survive).

Web: session-list machine labels are cached in localStorage so machines
whose row is gone or whose query has not loaded yet keep their last
known name instead of flickering to the 8-char id prefix.
2026-07-27 13:10:45 +08:00
d115f8d960 fix(web): stop touch taps from double-firing session navigation (#1185)
useLongPress binds both touch and mouse handlers. After a tap, touch
browsers emit compatibility mouse events (~300ms later) that the page did
not preventDefault, so onClick fired twice: once from touchend, once from
the synthesized mouseup. On the wide tablet sidebar layout the list stays
under the finger, so the second onClick lands on whatever row slid into
that position and navigates to the wrong session.

preventDefault() on touchend for every handled tap, and additionally
swallow mouse events that arrive within 700ms of a touch so browsers that
still dispatch the compatibility sequence cannot re-trigger onClick.

Based on the fix by RiriAgent in the fork (commits 1bbfcc20, 5e3d135a).

Co-authored-by: RiriAgent <39219425+RiriAgent@users.noreply.github.com>
2026-07-27 12:59:40 +08:00
weishuandGitHub 909aaca09d fix(cli): gate main package release on platform packages being live (#1187)
- prepare-npm-packages: exit(1) instead of warn-and-continue when a
  platform binary is missing, so a broken build aborts the release
- release-all: after publishing platform packages, poll npm view for
  every @twsxtd/hapi-<platform> package until it matches the release
  version (10min timeout, 15s interval) before publishing the main
  package

Fixes #1149
2026-07-27 12:59:02 +08:00
weishuandGitHub 54bddd9db1 fix(hub,web): query Codex models via machine RPC instead of session cwd (#1186)
SessionChat fetched Codex models through the session-scoped endpoint,
so the CLI listed models in the session process cwd, where a missing
directory or project-level Codex config could skew or break the result.
Use the machine-scoped endpoint (already used by NewSession) and drop
the now-unused session route and RPC plumbing.

Fixes #1072
2026-07-27 12:58:22 +08:00
weishuandGitHub da6f4cc5b0 fix(web): keep session preview fold while searching (#1183)
Searching the session list forced every directory group to expand all
sessions (expanded: isFiltering) and hid the Show more button, so the
user's per-group preview fold was ignored during filtering. Stop
overriding the preview state while filtering and keep the Show more /
Show less control available.

Fixes #1068
2026-07-27 12:57:51 +08:00
weishu 2e54d9fdff feat(web): replace machine tree level with filter chips in session list
Single-machine users no longer expand a redundant machine layer; with
multiple machines a chip filter bar (persisted, with hover health popup)
replaces the collapsible machine headers. Directory groups now render
top-level with machine-name suffixes when unfiltered. Also removes the
redundant session/project count header text.
2026-07-27 11:55:43 +08:00
weishu 8297383dc0 Release version 0.24.0 2026-07-27 10:22:58 +08:00
weishu 042ffced8d fix(kimi): sync native local session titles 2026-07-27 10:19:25 +08:00
weishu 8eac26726b Release version 0.23.4 2026-07-24 11:06:10 +08:00
weishu 74ad25ec57 feat(codex): refine tool activity display 2026-07-24 09:39:22 +08:00
weishu dd42263aaf fix(web): use distinct icon for Codex session import
The Codex import button used the same circular-arrow SVG as the
session-list refresh button, making the two adjacent actions look
identical. Switch the import affordance to a download-into-tray icon
to match its 'import sessions' semantics.

Closes #1135
2026-07-24 09:37:28 +08:00
weishu 782b523fb0 Release version 0.23.3 2026-07-22 09:24:05 +08:00
weishu db1444fe2e Release version 0.23.2 2026-07-22 09:22:56 +08:00
weishu 3208f139b5 fix(codex): ignore subagents in transcript fallback 2026-07-22 09:20:00 +08:00
weishu 3dd425b15c fix(codex): restore transcript tool calls 2026-07-22 09:02:06 +08:00
weishu b74a11ecc3 Release version 0.23.1 2026-07-19 14:21:14 +08:00
weishu 651c83a1d9 feat(web): replace agent flavor letter badges with brand logos
Use @lobehub/icons (already a dependency) for per-agent SVG logos in the
session list, session header, and new-session agent selector.

- Color variants for claude/codex/gemini; Mono (currentColor) for
  cursor/grok/opencode so glyphs track the theme text color
- kimi uses Mono as well: KimiColor's main glyph is hard-coded #fff and
  vanishes on the light theme
- pi and unknown flavors keep the letter-badge fallback (no logo shipped)
- Deep component imports avoid the package root's ./features re-export,
  which pulls uninstalled peer deps (antd, @lobehub/ui)
2026-07-19 13:05:25 +08:00
weishu 2211888f04 Release version 0.23.0 2026-07-18 12:29:28 +08:00
weishu 22e9b38f70 fix(kimi): sync local sessions to web and adapt to new kimi-code architecture
hapi kimi local mode spawned the kimi TUI with no transcript sync, so
terminal conversations never reached the hub and the web UI stayed empty.
After the kimi-code rewrite (data moved from ~/.kimi to ~/.kimi-code),
model resolution also broke: hapi read the gone ~/.kimi/config.toml and
fell back to the invalid hardcoded default kimi-k2, and the KIMI_MODEL /
KIMI_PROJECT_DIR env vars it set no longer exist upstream.

Local sync (mirrors the codex transcript scanner):
- kimiWireLocator: derive the kimi-code workspace id
  (wd_<slug>_<sha256(cwd).12>, ported verbatim from upstream workdir-slug),
  poll for the session dir created by the just-spawned process, and watch
  its agents/main/wire.jsonl. Pre-existing sessions are snapshotted and
  excluded (awaited before spawn) so a retry cannot bind to a stale
  session; multiple fresh candidates are refused as ambiguous.
- kimiWireScanner: incrementally read wire.jsonl and convert events into
  hapi messages (user prompts/steers, assistant text/thinking, tool
  call/result incl. is_error, step.end usage with cached input summed
  into inputTokens).
- kimiLocalLauncher: attach locator+scanner, report kimiSessionId on
  discovery (enables web resume and local<->remote handoff).

Model handling:
- config.ts: read <KIMI_CODE_HOME|~/.kimi-code>/config.toml (legacy
  ~/.kimi fallback); drop the hardcoded kimi-k2 default and the dead
  KIMI_MODEL env source - when nothing is configured, omit --model so
  kimi-code uses its own default_model.
- kimiBackend/kimiLocal: stop setting KIMI_MODEL and KIMI_PROJECT_DIR
  (both unused by new kimi-code).
- kimiRemoteLauncher: apply the resolved model over ACP after session
  creation (session/set_model, falling back to the advertised model
  config option), and display the agent-reported current model instead
  of the env guess.

Verified against live kimi-code 0.26.0: ACP initialize/session-new/
prompt probes, locator discovery of a running session, and converter
robustness over a real 800-line wire.jsonl.
2026-07-18 12:18:15 +08:00
weishu 80a26c1f75 fix(web): update tool call test fixture 2026-07-17 10:43:30 +08:00
weishu 1c834607a2 Release version 0.22.3 2026-07-13 09:03:39 +08:00
weishu 4c76668a6c refine message actions and metadata 2026-07-12 18:36:43 +08:00
weishu 8782b8a110 fix(codex): align local transcript message projection
Use semantic events as the visible text source and preserve completed plans as ordered plan proposal cards.
2026-07-12 14:33:37 +08:00
weishu 942a1dfff8 Release version 0.21.0 2026-07-12 11:05:13 +08:00
weishu 5a377e38b9 fix(codex): defer session persistence until user activity 2026-07-12 11:00:08 +08:00
weishuandGitHub 93d004148d feat: support Claude Code 'auto' permission mode (closes #858) (#879)
Add 'auto' as a first-class HAPI permission mode for claude-flavored sessions,
enforced by Claude's classifier rather than emulated in canCallTool. Includes
mode configuration, CLI respawn on auto transitions, plan-exit targeting, API
extensions, and documentation updates.
2026-06-11 11:43:51 +08:00
weishu d464651870 Release version 0.20.2 2026-06-11 11:02:21 +08:00
weishuandGitHub 17439ae02c fix(cli): bypass proxy for loopback addresses at CLI entrypoint (#868)
Bun's fetch and node:http honor HTTP_PROXY/HTTPS_PROXY env vars, which can
route loopback traffic through a configured proxy (e.g. Surge/Clash). When
NO_PROXY doesn't explicitly exclude localhost, this breaks loopback
communication: SessionStart hooks fail to arrive (transcripts don't sync, web
UI stays empty), runner control client times out, and MCP server connections
fail.

Normalize NO_PROXY at the CLI entrypoint to always cover loopback
(localhost, 127.0.0.1, ::1). Child processes inherit the patched env so their
loopback traffic is covered too. Non-loopback traffic continues using the
configured proxy. Supersedes the runner control client workaround from #563.
2026-06-11 00:00:09 +08:00
weishu 1f92a31b12 Release version 0.20.1 2026-06-08 13:56:44 +08:00
weishu deb05bb783 Auto-approve Codex title MCP tool 2026-06-08 13:44:26 +08:00
weishu d82ff6127d Release version 0.20.0 2026-06-05 21:49:13 +08:00
weishu 4aee1e4f84 Release version 0.19.0 2026-06-01 12:37:32 +08:00
weishu ec1ab23e6c Reduce automatic title update prompts 2026-06-01 12:21:33 +08:00
weishu 6aa7274851 Release version 0.18.4 2026-05-22 09:04:13 +08:00
weishu 35044cde50 remove unused docs 2026-05-22 09:01:14 +08:00
weishu 8e3bba9303 refactor: share REST mutation schemas 2026-05-21 14:49:51 +08:00
weishu e66f403cb6 refactor: derive new session model options 2026-05-21 14:45:59 +08:00
weishu eed7c9b0b3 refactor: rely on tool view registry for inputs 2026-05-21 14:44:30 +08:00
weishu 1284385d38 refactor: share remote agent command parsing 2026-05-21 14:42:40 +08:00
weishu b0a3397601 refactor: share session config RPC handling 2026-05-21 14:40:00 +08:00
weishu e88a9075df refactor: share core REST payload types 2026-05-21 14:35:47 +08:00
weishu 7c26c1e749 refactor: reuse shared machine socket types 2026-05-21 14:32:28 +08:00
weishu 9704227ce2 refactor: share machine runner schemas 2026-05-21 14:29:42 +08:00
weishu 7d5a5ee919 chore: remove obsolete spawn leftovers 2026-05-21 14:25:10 +08:00
weishu b79f50f815 Share RPC method constants 2026-05-21 10:53:31 +08:00
weishu 41f6b37d69 Structure SSE update patches 2026-05-21 10:44:46 +08:00
weishu 2e1e2d39db Share slash command definitions 2026-05-21 10:36:25 +08:00
weishu d6f97065c1 Share REST and RPC response types 2026-05-21 10:31:50 +08:00
weishu 9698aa9f4c Unify agent flavor definitions 2026-05-21 10:23:57 +08:00
weishu 15113668cc Release version 0.18.3 2026-05-20 20:50:49 +08:00
weishu c53ee0ed90 fix web vitest config loading 2026-05-20 20:47:16 +08:00
weishu 64d1a4de1c Cap resume picker redraw height 2026-05-20 20:44:12 +08:00
weishu 30c9d34cf8 Size resume picker rows by terminal height 2026-05-20 20:43:04 +08:00
weishu e90ef52078 Show more resume picker rows 2026-05-20 20:41:57 +08:00
weishu f41be3a420 Reduce resume picker redraw flicker 2026-05-20 20:41:05 +08:00
weishu 5264599908 Recover first prompt for resume sessions 2026-05-20 20:35:03 +08:00
weishu 856af6d8b2 Show first user message in resume picker 2026-05-20 20:31:40 +08:00
weishu 2ef90f84fb Move resume picker directory to status bar 2026-05-20 20:26:38 +08:00
weishu 62ac4e7b0a Show relative time in resume picker 2026-05-20 20:24:46 +08:00
weishu 1bd0bb2cf7 Add interactive resume session picker 2026-05-20 20:20:27 +08:00
weishu 1954920753 Release version 0.18.2 2026-05-20 20:06:33 +08:00
weishu c8c122812f Fix mobile schedule picker layout 2026-05-20 20:04:07 +08:00
weishu fbd7527cf4 Stop hub cleanly from CLI command 2026-05-20 19:55:40 +08:00
weishu 83795c0630 Clean up cross-package build coupling 2026-05-20 19:29:43 +08:00
weishu 6759cf4657 Remove old protocol compatibility layers 2026-05-20 17:45:28 +08:00
weishu 9324598cd5 chore: remove dead UI and agent entrypoints 2026-05-20 17:32:08 +08:00
weishu c070cdef28 Fix probe failure 2026-05-19 17:07:15 +08:00
weishu ff866c2069 Release version 0.18.1 2026-05-18 11:06:32 +08:00
weishu f31c591f33 Improve grouped tool card labels 2026-05-18 11:02:07 +08:00
weishu 2e96992dd4 Fix mobile status bar 2026-05-17 23:23:28 +08:00
weishu 0e594da84d Render Codex review messages 2026-05-17 23:11:36 +08:00
weishu c07b3a2ed2 Release version 0.18.0 2026-05-15 23:05:39 +08:00
weishu 089ddad476 feat: support Codex goal slash command 2026-05-15 22:15:17 +08:00
weishu a099ae9199 fix(codex): apply reasoning effort correctly 2026-05-15 19:03:07 +08:00
weishu 752a505973 Release version 0.17.4 2026-05-08 19:12:59 +08:00
weishu 2fe1a2ed45 fix(cli): trust injected Codex session hook
Codex now requires hook trust before non-managed hooks can run. HAPI relies on the runtime-injected SessionStart hook to receive the Codex thread/session id, so leaving that hook untrusted breaks local Codex startup without manual /hooks review.\n\nGenerate the same trusted_hash Codex derives for the injected SessionStart command and pass it through the runtime hooks.state override. The trust is scoped to the synthetic session-flags hook key and the exact generated command, so user, project, and plugin hooks still go through Codex review normally.\n\nAlso cover the generated config args so future changes keep both the hook declaration and its trust state together.\n\nValidation:\n- bun test cli/src/codex/utils/codexMcpConfig.test.ts\n- bun typecheck
2026-05-08 19:09:38 +08:00
weishu 0db303d9f8 Fix release lockfile platform packages 2026-05-06 09:40:43 +08:00
weishu 47c408c84f Release version 0.17.3 2026-05-06 09:32:21 +08:00
weishu 71406ab08d test: stabilize thinking update assertion 2026-04-29 09:15:01 +08:00
weishu c9ff7f9de3 Release version 0.17.2 2026-04-27 21:16:18 +08:00
weishu cfc1edb747 fix(codex): subagent session hook may override primary session 2026-04-27 21:13:06 +08:00
weishu 0cfc3b4ed2 fix(cli): preserve codex config args on Windows 2026-04-26 12:05:44 +08:00
weishu be47ad06b9 Release version 0.17.1 2026-04-25 10:54:49 +08:00
weishu 97be34e21c Add Codex model selection 2026-04-25 10:48:12 +08:00
weishu 11e1d50e46 remove transcript timeout for codex 2026-04-24 13:45:16 +08:00