Commit Graph
1879 Commits
Author SHA1 Message Date
AnanovoandGitHub decbd58bb4 feat(web): add Alt+S shortcut to send messages (#1658)
* feat(web): add Alt+S send shortcut

* chore: retrigger PR checks

* fix(web): preserve printable Option characters for Alt+S

* fix(web): support logical Alt+S across layouts

* test(web): cover Alt+S during IME composition
2026-11-13 18:48:42 +08:00
1d6bc769c9 test(web): pin the residency fade off tooltip-bearing containers (#2375)
#2380 moved the disconnected-row fade onto the title text, which also removed a
stacking-context defect I had an open fix for (#2375 / #2373): the fade used to
sit on the title grid, and that grid holds the schedule and attention
HoverTooltips, whose panels render inline as `absolute z-30` rather than through
a portal. An `opacity < 1` ancestor forms a stacking context, so the panel was
both washed out and had its z-index trapped — a later row could paint over a
downward-opening scheduled-send panel.

The code is correct now, so this is only the guard. The natural refactor — hoist
the fade onto the grid so the whole row dims — reintroduces the bug silently, and
only on inactive rows that also have scheduled messages, which is why it survived
review the first time.

Asserted structurally: no element carrying the fade may contain a role="tooltip".
Fails if the fade moves back onto the grid; passes on current main.

via [HAPI](https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
2026-11-13 18:48:21 +08:00
SSU-WEI HUANGandGitHub bb97a6512f fix(runner): verified exit must confirm stop despite unrelated protected wrapper (#2346)
* fix(runner): let verified exit confirm stop when only unrelated wrappers are protected

* test(runner): verified exit confirms stop despite unrelated protected wrapper
2026-11-13 18:48:00 +08:00
Junmo KimandGitHub 0684c77866 fix: retry the gap-recovery row refresh after a failure and advance idle progress on merged tool-call ticks (#2372)
* fix(web): keep the recovery pending until the row sweep succeeds

The recovery consumed pendingGapRecovery at the latest-page upsert,
before the by-ID row sweep ran: a context request that failed there
propagated to the run's catch and surfaced the warning, but the flag
was already gone, so the next ordinary tail sync did cursor catch-up
only, skipped the sweep, and cleared the warning — the enriched cached
call stayed stale with no retry path.

Keep the flag pending until the catch-up, the upsert, and every row
refresh have succeeded: the upsert now consumes only the activation
flag it subsumes, and the recovery completes — clearing
pendingGapRecovery — after the sweep finishes without a failure. The
sweep's failure exits (a thrown request, a row the endpoint no longer
knows, a different-epoch answer) leave the flag set, so the next sync —
ordinary or recovery — retries the whole choreography. The upsert
itself is idempotent, so a retry costs one extra latest-page round.

* fix(android): keep the recovery pending until the row sweep succeeds

Mirror of the web fix: the recovery consumed pendingGapRecovery at the
latest-page upsert, before the by-ID row sweep ran — a context request
that failed there left the enriched cached call stale with no retry
path, because the next ordinary tail sync does cursor catch-up only,
skips the sweep, and clears the warning.

The upsert now consumes only the activation flag it subsumes, and the
recovery completes — clearing pendingGapRecovery — after the sweep
finishes without a failure; the sweep's failure exits leave the flag
set, so the next sync retries the whole choreography. The upsert itself
is idempotent, so a retry costs one extra latest-page round.

* fix(ios): keep the recovery pending until the row sweep succeeds

Mirror of the web/android fix: the recovery consumed pendingGapRecovery
at the latest-page upsert, before the by-ID row sweep ran — a context
request that failed there left the enriched cached call stale with no
retry path, because the next ordinary tail sync does cursor catch-up
only, skips the sweep, and clears the warning.

The upsert now consumes only the activation flag it subsumes, and the
recovery completes — clearing pendingGapRecovery — after the sweep
finishes without a failure; the sweep's failure exits leave the flag
set, so the next sync retries the whole choreography. The upsert itself
is idempotent, so a retry costs one extra latest-page round. Test rides
CI.

* fix(hub): advance the idle-progress clock on merged tool-call ticks

A repeated tick folds into the call's existing row, and the stored row
keeps its first snapshot's createdAt for stable ordering — but
onAgentProgress received that frozen timestamp on every tick, so
repeated snapshots of a live ACP call never advanced the keepalive-idle
clock and a session with thinking=false and no background task could be
marked idle despite fresh updates.

Feed onAgentProgress the merge observation time when the tick updates
an existing row; the stored ordering timestamp is unchanged, and the
derived todo/team version stamp keeps its strictly-advancing gate.

* test(ios): await the actor-isolated failure injection in the sweep-retry test

GatedMessagesProvider is an actor, so failNextContextRequests must be
awaited from the async test body; without it the new test fails to
compile in CI. No production change.
2026-11-13 18:47:27 +08:00
Junmo KimandGitHub acddadf194 fix(agy): keep empty edit/write strings and the question card's free-text limit (#2331)
* fix(agy): keep empty strings in edit and write tool card inputs

A deletion edit (empty Replacement) or an empty-file write was mapped
without new_string/content, so the web Edit and Write views rendered
nothing. Keep '' for old_string, new_string and content.

* fix(web): take the question card's free-text flag from the pending request

agy's ask_question tool call is shown before its form arrives, so its input
cannot say whether free text is allowed, and the card kept offering Other on
forms without qN_other. Fill allowFreeText on the tool call input from the
pending request's input for questions that carry none. Inputs and requests
without the flag keep showing Other.
2026-11-13 18:47:11 +08:00
Junmo KimandGitHub 90fbb417ca fix(agy): concatenate ACP text chunks as deltas (#2332)
agy streams agent_message_chunk as pure deltas, but the backend used the
default overlap-dedupe mode, which dropped a repeated character at a chunk
boundary (73-8 + 800 was shown as 73-800). Set textChunkMode to delta,
as the OpenCode and Grok backends do.
2026-11-13 18:46:55 +08:00
Junmo KimandGitHub 3aac283bff fix(web): generate read-state operation ids without crypto.randomUUID (#2333)
crypto.randomUUID is undefined outside secure contexts (plain HTTP on a LAN IP), so enqueueing a read threw and no read-state PUT was sent. Use the randomId() helper, which falls back to getRandomValues.
2026-11-13 18:46:37 +08:00
weishu a7fe2cdaf2 fix(android): compact sort & filter sheet and a clean date-range dialog
Sort & filter scrolled: four machine radio rows (a rare choice) led the
sheet, every status and sort option was its own 56dp radio row, and Done
sat in a footer. The activity-date dialog was a full-width custom Dialog
that clipped the picker title, and its range band was Material's baseline
purple next to green endpoints.

- The sheet is now single rows under Filter / Sort: Machines, Show and
  Sort by show their value and open an anchored menu (checkmark for the
  selection, machine session counts trailing); Activity dates opens the
  picker; Unread only and Active first stay switches. Reset and Done move
  into the header, so the whole sheet fits without scrolling (as on iOS,
  where machines moved into a submenu).
- The date range picker sits in Material's DatePickerDialog (standard
  width and margins), drops the title row, aligns the range headline with
  the 24dp content edge instead of M3's 64dp full-screen indent, keeps the
  recent-activity legend under the calendar, and omits the current year
  from legend days.
- The static light/dark schemes now define every accent role (primary,
  secondary, tertiary containers and their on-colors) from the green
  seed; unset roles were falling back to Material's purple.
- A window-level specimen covers the sheet, the machine menu and the
  picker; instrumentation tests open the Machines / Show menus first.
2026-11-13 18:00:58 +08:00
weishu 35e4578245 feat(android): drop the inactive bar and status strip above the composer
Both cost transcript lines on every screen: the "Session inactive — send
to resume, or Reopen" card and the "ctx 190k · 0% left / Auto" strip.

- Inactive sessions still resume by sending (unchanged), and Reopen stays
  in the chat overflow menu.
- Context remaining moves into the session config sheet (gear) under a
  new "Context" section, keeping its warning color bands.
- The permission-mode label above the composer goes away; the mode is
  shown and switched in the same sheet.
2026-11-13 17:49:03 +08:00
weishu 662b4739d1 feat(android): web-style copy / details / time row under agent responses
The usage-info button sat under whichever block carried metadata — often
a reasoning or tool card at the start of a response, sometimes several
per response — inside a padded TextButton that pushed it off the prose's
leading edge.

Close each agent response with one action row instead, like the web
MessageActions on an assistant-ui card: under the last block of each run
of assistant-role blocks (bounded by user text, agent events and
user-source CLI output), show copy (the run's prose joined by blank
lines; reasoning and tools excluded, Codex reviews via a port of
formatCodexReviewText), details (the run's first block with usage
labels) and the latest activity time (same day HH:mm, same year
MMM d HH:mm, otherwise with year; locale-ordered, 24-hour). Glyph
artwork aligns with the text edge; copy reuses FullTextAction's
clipboard-or-export logic with a transient checkmark.
2026-11-13 17:40:33 +08:00
weishu ac13d622b9 fix(android): soften the composer shadow
Material elevation is lit from above the screen, so at the bottom edge it
fell heavily under the hairline-bordered card and read as a smudge, and
the composer strip (a clipping Surface) cut the blur into a hard top edge.

Draw an even iOS-style shadow instead (black 8%, 8dp blur, 2dp down; 6%
and 6dp for suggestion popups) via a paint shadow layer, and make the
strip an unclipped Box so the blur fades out naturally. Dark mode keeps
relying on the lighter fill. The helper is a CacheDrawScope function, not
a Modifier factory: Compose lint's ModifierDeclarationDetector crashes on
app-module factories with this AGP.
2026-11-13 17:30:14 +08:00
weishu 893027c9e2 fix(android): keep the code copy action's 48dp touch target
The chat polish shrank the code-block copy IconButton to iOS's 44pt,
breaking Android's 48dp minimum (CodeBlockLayoutTest on API 29/36).
Restore the 48dp slot; the quieter 16dp symbol stays, so the test now
pins 16dp artwork.
2026-11-13 17:06:43 +08:00
weishu 5f1516489b build(android): derive versionCode from the git commit count
- versionCode is now `git rev-list --count HEAD`; the hapiVersionCode
  property is gone. Builds without git fall back to 1.
- Official builds fail fast when git is unavailable or the clone is
  shallow, since a shallow history undercounts.
- The official build workflow drops the version_code input, checks out
  full history and names the artifact hapi-android-<versionCode>.
- Android and CLI READMEs describe the new rule.
2026-11-13 17:03:06 +08:00
Junmo KimandGitHub c9686af735 test(hub): align archive cleanup timeout status with the 503 semantics (#2426)
ArchiveCleanupError no longer maps a cleanup timeout to 504 (tiann/hapi#2423), but the archive singleflight test added in tiann/hapi#2424 still expected 504, so syncEngineArchiveSession.test.ts fails on main. Expect 503, matching the new status mapping.
2026-11-13 16:51:44 +08:00
weishu 09f05a9e84 feat(android): refine the chat composer
- Collapse the empty, unfocused composer to one row (+ / field / primary
  action); anything in flight expands it, keeping one field instance so
  focus survives.
- Bare 22dp tool symbols with tint-only states; send/stop is the only
  filled 34dp circle, and stop uses the accent instead of error red.
- Composer card lifts off the canvas (composerSurface, hairline, light
  shadow); context usage and permission mode share one compact row.
- Scheduled sends show a "Scheduled · …" capsule with a clear action;
  tapping the clock no longer silently clears a pick.
- Queued messages become one inset card with one-line rows and icon
  actions; slash/mention popups get 48dp rows, icons and mono commands;
  attachment chips use vector symbols.
- Ctrl/Meta+Enter sends, gated exactly like the Send button.
2026-11-13 16:43:14 +08:00
weishu b2f50a0f83 feat(android): redesign tool cards, approvals and the tool inspector
- Tool summaries use monochrome symbols, a 15sp medium middle-truncated
  title and a one-line secondary subtitle; success is quiet, running is a
  neutral spinner, errors are a tinted chip.
- Groups lead with activity and total calls and count calls by kind
  ("2 reads · 1 search"), with running and error counts side by side.
- Pending approvals become a neutral card: hourglass status line with the
  full-input link, filled Allow / outlined Deny via ChatActionButton, and
  the submit spinner in the status slot; the duplicate "pending" chip is
  hidden. Settled verdicts are symbol + label (glyphs dropped from strings).
- Codex plan actions share ChatActionButton.
- The inspector header shows symbol, friendly title, raw name, labelled
  status and a selectable workspace path; empty results read "Waiting for
  output…" / "No output"; Source has a disclosure chevron; group browser
  rows form one card with inset hairlines and a category summary.
- Terminal output is selectable.
2026-11-13 16:43:14 +08:00
weishu ab96d78861 feat(android): iOS-parity Markdown rhythm and reasoning disclosure
- Headings follow iOS sizes (24/20/18/17sp semibold) instead of collapsing
  into body size; blocks are 12dp apart, 24dp before a heading and 8dp
  after one; list items 8dp with first-baseline-aligned markers.
- Inline code is 14sp JetBrains Mono on a glyph-hugging rounded chip drawn
  behind the text, instead of a span background filling the 24sp line box.
- Code block headers show the lowercase language in secondary mono caption
  with a quiet 16dp copy symbol.
- Reasoning uses a rotating chevron + "Reasoning…" label (no emoji or
  text arrows), a 32dp row with expanded/collapsed state semantics, and a
  subdued body behind a hairline rule.
2026-11-13 16:43:14 +08:00
weishu 0a8bb2ffc7 feat(android): neutral chat surfaces, symbol icons and reading tokens
Lay the shared foundation for iOS-level chat polish:

- Typography tokens mirror iOS HapiTypography: zero tracking on body
  slots, trimmed leading, strict CJK line breaking, row title/subtitle and
  heading tokens; code uses bundled JetBrains Mono NL (OFL, no ligatures).
- Static schemes get hue-free surface ladders (Material's baseline tinted
  every surface lavender) and the dark scheme sets onPrimary instead of
  inheriting Material purple. NeutralChatSurfaces keeps conversation
  surfaces gray under Material You; presets and OLED pass through.
- Extended colors add textSecondary, cardSurface and composerSurface.
- Material Symbols Rounded vector drawables (ic_sym_*) replace emoji and
  text glyphs in later commits; ChatActionButton is the one inline action
  style (48dp minimum, 10dp corners, one filled primary).
- Transcript rows use iOS TranscriptRowRole gaps instead of a flat 10dp.
- Roborazzi + Robolectric visual specimens (record on demand; Roborazzi
  pinned to 1.60.0 because 1.61+ ships Kotlin 2.3 metadata).
2026-11-13 16:42:32 +08:00
AnanovoandGitHub 6ea40f9e44 fix(web): align pending session indicators (#2425)
* fix(web): align pending session indicators

* fix(web): preserve background tooltip placement
2026-11-13 12:09:04 +08:00
adminandGitHub bebda45006 fix(dsh): respawn dead ACP children, recover closed sessions, sandbox modes, inline images, reasoning effort (#2386) 2026-11-13 08:40:55 +08:00
AnanovoandGitHub 7c66ca2226 feat(web): open Markdown images in fullscreen preview (#2395) 2026-11-13 08:40:33 +08:00
HeavyGeeandGitHub 04032d704e fix(cli): isolate claude.test.ts resume-identity tests from HAPI_INVOKED_CWD (#2396) 2026-11-13 08:40:19 +08:00
Junmo KimandGitHub f422cf4ec7 fix(web): count the waiting time on synthesized pending questions (#2397) 2026-11-13 08:40:04 +08:00
JeeandGitHub ebd4ac2105 fix(agy): handle stale errors and missing session titles (#2401) 2026-11-13 08:39:32 +08:00
AnanovoandGitHub 083aaca779 fix(web): distinguish and navigate pending requests (#2402) 2026-11-13 08:39:15 +08:00
JeeandGitHub d391324e81 fix(cli): handle ACP stdin stream errors (#2403) 2026-11-13 08:38:54 +08:00
AkiiiaandGitHub 72b341fde1 perf(cli): load command modules on demand (#2404) 2026-11-13 08:38:41 +08:00
Junmo KimandGitHub e24ccf5e50 feat(agy): show the round turn count and running background commands (#2405) 2026-11-13 08:38:25 +08:00
SSU-WEI HUANGandGitHub f1339d3ee5 docs(cli): note that worktree spawn-peer needs a git repository (#2410) 2026-11-13 08:38:08 +08:00
HeavyGeeandGitHub cca38a4acc fix(cli,hub): clear stale permission required when request is inactive (#2415) 2026-11-13 08:37:27 +08:00
JeeandGitHub b3219357eb fix(pi): register peer tools directly when registerMcpServer is absent (#2418) 2026-11-13 08:37:02 +08:00
peter-yyandGitHub 8e077991c1 fix(web): keep running sessions from looking finished when output is unread (#2420) 2026-11-13 08:36:35 +08:00
SSU-WEI HUANGandGitHub 020b313aff fix(hub): avoid 502/504 so Cloudflare Tunnel keeps JSON error bodies (#2423) 2026-11-13 08:36:02 +08:00
Junmo KimandGitHub cad21ec6d0 feat(opencode): fork and rewind OpenCode v2 conversations (#2424) 2026-11-13 08:35:45 +08:00
weishu 06d9e51f5c Release version 0.35.0 2026-11-12 10:16:52 +08:00
KiyoshiandGitHub 31cb262ee0 feat(usage): display CLI account quotas and rate limits in Settings -> Usage (#2389)
* feat(usage): display CLI account quotas and rate limits across Codex, Antigravity, and Claude

* fix(usage): persist live quota state across processes and normalize agy usage

* fix(cli): isolate Claude quota observations by account and bound probe deadlines

* fix(usage): bind Claude quota events to producing session account and surface quota fetch errors

* fix(usage): preserve OAuth token isolation without email and surface Codex read failures

* fix(usage): skip host claude path lookup when test probe override is active
2026-11-12 10:16:07 +08:00
KiyoshiandGitHub 0bea8967b4 fix(agy): wake session and stream reactive background turns over agy acp (#2387) 2026-11-12 08:47:36 +08:00
adminandGitHub 446cf2351c feat(cli): diagnose Bun pre-init fatal crashes in webhook failure messages (#2365) 2026-11-12 08:46:26 +08:00
AnanovoandGitHub 2e8b2a108b fix(codex): preserve completed-fork availability across stale refreshes (#2370) 2026-11-12 08:45:54 +08:00
Junmo KimandGitHub 20878e317a fix(claude): mark only the compaction turn result, not pending-compaction rounds (#2374) 2026-11-12 08:45:40 +08:00
HeavyGeeandGitHub 3a3e83b4b0 fix(voice): keep runtime backend/voice aligned with Settings preview (#2378) 2026-11-12 08:45:05 +08:00
AnanovoandGitHub 44fde2072b feat(web): combine session activity and unread indicators (#2380) 2026-11-12 08:44:38 +08:00
Junmo KimandGitHub 9a651dbd81 fix(web): give every tool card header the same shape (#2394) 2026-11-12 08:43:18 +08:00
Junmo KimandGitHub 4f2054b31f fix(web): make pending question cards read as waiting for a reply (#2390)
* refactor(web): share the AskUserQuestion option row and pill button styles

Move the interactive option row and the footer pill button class into
askUserQuestionOptionCard so another footer can reuse the exact presentation.
Pure move, no behavior change.

* fix(web): show Waiting for your reply on pending question cards

A pending question keeps the 'running' tool state until its reply lands in
the transcript, so the card header counted an ever-growing Duration and the
detail dialog showed a 'Running…' result pill. Neither is true: the agent is
not working on the question, it is waiting for an answer.

For question tools with a pending permission (AskUserQuestion and
request_user_input, covering Claude, OpenCode, agy, Cursor and Codex), the
card header now reads 'Waiting for your reply' instead of the timing rows,
and the result pill follows suit. The tool state and fixtures are unchanged.

* fix(web): title Codex question cards with the question text

request_user_input questions carry no header field, so the card title was
always the generic 'Question' while the actual question hid in the subtitle.
When no header is present, use the question text as the title and drop the
now-redundant subtitle; a header (Claude-style payloads) keeps the previous
title/subtitle split, and multi-question batches keep the counted title.

* fix(web): drop the redundant header chip on single-question cards

The card title already shows the question header for a single-question
AskUserQuestion, and the footer repeated it as a badge ('Database' twice).
Render the header chip only for multi-question steps, where it labels the
current step and adds information.

* fix(web): request_user_input footer adopts the shared question option rows

Codex question footers rendered their own flat option rows (dot glyphs,
aria-pressed buttons) and default-variant nav buttons, visually diverging
from the AskUserQuestion card. Reuse the shared option row and pill button
styles so both question surfaces present identically; rows now expose the
same radio/checkbox roles and aria-checked state. Behavior (selection
rules, notes, dismissal) is unchanged.

* fix(web): render request_user_input option labels as Markdown

The shared option row renders titles and descriptions as plain text, but
request_user_input option labels and descriptions are authored as Markdown
(bold targets, code commands) and the footer's own rows used to render them
through MarkdownRenderer. Give the shared row an opt-in markdown mode that
keeps the compact spacing, and enable it for the request_user_input footer.

* fix(web): title CursorAskQuestion cards from the parsed question header

CursorAskQuestion renders through the AskUserQuestion footer but had no
knownTools entry, so its card title stayed the raw tool name. Now that the
single-question header chip is deduped against the title, a Cursor question
lost its header entirely. Share the question-tool presentation (header as
title, question as subtitle, minimal pending header) with Cursor payloads,
reading their title/prompt field names the same way the parser does.

* fix(web): translate tool.waitingForReply for zh-CN and ru

Both locales shipped the English copy. Use the same register as the
neighbouring strings: zh-CN '等待你的回复' (matches the 等待+object pattern of
the ready toast and the approval key) and ru 'Ожидание вашего ответа'
(noun form of 'Ожидание одобрения').

* fix(web): fall back to the Cursor request title for question card headers

A Cursor question whose descriptive title lives only on the request
(input.title) produced an empty header in the card presentation, so the
single-question card fell back to the generic 'Question' title while the
footer's header chip is deduped away — the request lost its descriptive
title everywhere. Route the CursorAskQuestion presentation through
parseCursorAskQuestionInput, which already applies the request-level title
fallback, keeping that fallback the single source of truth.
2026-11-12 07:06:43 +08:00
1dd71e2f30 fix(web): keep attached-job progress visible when the label is long (#2392)
The job label, stale marker and progress/elapsed text shared one truncating
span, so a long label hid the parts that change. The label now grows only
into the space the status leaves, down to a small minimum, and the status
truncates only after that.

Closes #2391

via [HAPI](https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:05:54 +08:00
weishuandGitHub 926eac7023 fix: keep one stable HAPI session id per Claude conversation (#2388)
* fix: keep one stable HAPI session id per Claude conversation

Every terminal `hapi claude -r` minted a new HAPI session id for the same
Claude conversation; the hub then merged the duplicates after the fact and
deleted the older row, so links and peer references to it broke, and two
live duplicates hid one row in the web sidebar.

CLI: resolve identity before Claude starts (HAPI_SESSION_ID is fixed at
bootstrap). `--resume <id>` / `--continue` look up the owning HAPI session
and reopen it with the same id, handing an active remote session over and
refusing one controlled by another terminal; bare `--resume` uses the
`hapi resume` picker filtered to Claude. Rotated Claude ids are kept in
`claudeSessionIdHistory` so older ids still match.

Hub: schema v35 adds `session_redirects`; every merge that deletes a row
records old -> survivor, and client-facing lookups follow it (sockets and
job ownership stay strict). New `GET /cli/sessions/resume-target-by-agent`.

Web: a merged-away URL moves to the survivor instead of bouncing home, and
live Claude duplicates stay visible in the sidebar.

* fix: keep job-key remaps and hub-archived resumes working after redirects

Review follow-up for the stable session identity change.

- Job routes: the session lookup now follows a merged-away id to the
  survivor, so `requestedSessionId` must stay the raw URL id. Otherwise a
  colliding `<old id>/<key>` remap was bypassed and PATCH/DELETE/late PUT
  through the old id hit the survivor's own job.
- Terminal resume of an inactive session now asks the hub to clear a
  hub-authored archive first (`POST /cli/sessions/:id/prepare-local-resume`,
  same clear as hub reopen), so `hapi claude --resume/--continue` (and
  `hapi resume`) no longer exit on the #1911 existing-session guard.

* fix(cli): refuse an explicit Claude resume whose transcript is gone

Reopening the owning HAPI session drops --resume and hands the id to the
local launcher, which silently starts a fresh conversation when the
transcript is missing — under the existing HAPI id, title and history.
Check the transcript before any handoff or archive change and fail
explicitly instead.

* fix: follow merged-session redirects on /api only for clients that rebind

Native clients store a session detail under the requested id and drop SSE
events for any other id, so a merged-away id that resolved to the survivor
loaded history but never showed live messages.

`SyncEngine.resolveSessionAccess` is strict again by default; `/api` routes
follow redirects only with `x-hapi-follow-session-redirects: 1`, which the
web client (that rebinds to the returned id) sends. Native clients keep the
previous 404. CLI REST always follows. Job routes still keep the raw URL id
for key remaps under both modes.
2026-11-12 07:05:37 +08:00
Junmo KimandGitHub 7ac33a70c3 feat: show generation rate (tok/s) for Codex rounds (#2379)
* feat(codex): fill the round footer tok/s from app-server timing

Measure each Codex round's generation window the way agy rounds do: the
live turn span minus tool-execution and wait-for-the-user windows, over
the thread-cumulative output-token delta, emitted on the turn's
turn_duration so the round footer shows tok/s. Tool windows prefer the
app-server's own item timing (startedAtMs/completedAtMs/durationMs).
The token baseline is the last reported cumulative total: the CLI seeds
a thread it created in this process (thread/start) to zero, while
resumed and forked threads receive the app-server's attach-time usage
replay and stay unseeded, so inherited history is never counted as a
turn's output. Only the live root-turn feed reaches the ledger: history
replays re-project old items and must not settle a round. Permission
hooks keep timing waits for the user.

* fix(codex): seed gateway-created threads for the first-turn tok/s baseline

Native /new and /clear create threads through the gateway before/after
hooks, whose after() binds the fresh root without the zero usage seed
the runtime create path applies - so the new thread's first turn
captured a null baseline and never showed tok/s. Seed it there too,
same as create(): thread/start only, since forked threads receive the
app-server's attach-time usage replay instead (tiann/hapi#2379).

* fix(codex): keep the active generation ledger across a hub-only reconnect

SharedCodexRoot's session.onReconnect reset the whole projection, but a
hub reconnect only replays final history: the native turn keeps running
without a new turn/started, so dropping the ledger identity, baseline
and windows made generation.settle() return null at completion and the
round permanently lost its tok/s. Add projection.resetAfterHubReconnect
which replays without touching the ledger; the app-server reconnect
path keeps the full reset, because the resumed turn re-announces itself
and must re-measure from its own start (tiann/hapi#2379).

* fix(codex): seed fresh usage before session-ready releases queued input

The gateway thread/start seed ran in the after() hook, after the bind
wrapper had already activated the root: registerControls and
emitSessionReady open the input gates, so a queued Web prompt (or one
submitted on session-ready while the runner notification is delayed)
could start the thread's first turn before the zero baseline existed,
and seeding afterward could not repair that captured-null turn. Move
the seed into the bind wrapper right after root.bind, guarded by a
freshThread flag the create and gateway paths set for thread/start
only - forks keep their app-server attach-time replay baseline
(tiann/hapi#2379).
2026-11-11 20:32:54 +08:00
adminandGitHub eff515e2e0 feat(cli): rotate hub entries after repeated connect failures (#2383)
Self-hosted hubs are commonly reachable through several origins (an
edge-proxied domain and a direct one); cross-border interference can
randomly break TLS on either for hours. A runner pinned to a single
HAPI_API_URL sat dead through those windows.

When HAPI_API_FALLBACK_URLS is set, the machine client keeps a rotation
ring (primary + fallbacks) and, after HAPI_API_FAILOVER_AFTER (default 5)
consecutive connect failures, tears the socket down and reconnects
through the next entry. A successful connection on a fallback schedules
a return-to-primary attempt after 30 minutes. Without the env, behavior
is byte-for-byte unchanged.
2026-11-11 20:30:23 +08:00
weishu 9fe29431a0 fix(ios): tidy the session sort & filter menu
The menu mixed three selection markers (hand-drawn checkmark images,
Toggle checkmarks plus icons, and a radio-like filled circle), so row
text started at different offsets, and the machine roster made the menu
scroll.

- Sort By and Show use inline Pickers; Active First and Unread Only are
  plain Toggles. Selection now always uses the system checkmark column
  and every row's text lines up.
- Machines move into a "Machine" submenu whose subtitle names the
  current choice; each machine keeps its session count as a subtitle.
2026-11-11 17:09:56 +08:00
weishu 92da78469a Release version 0.34.6 2026-11-11 13:10:41 +08:00