Commit Graph
96 Commits
Author SHA1 Message Date
AnanovoandGitHub 8e2b7ab80c fix(ios): unblock Mac Catalyst builds (#2275)
* fix(ios): mark attachment localization key manual

* fix(ios): guard hinge probe on Mac Catalyst
2026-11-04 14:48:14 +08:00
weishu fa02830a60 fix(ios): show the chat title in the Mac toolbar
The Mac window's NSToolbar drops the custom .principal header, and the
hidden titlebar title also hid the navigation title. Use the system title
on Mac (as on the folded Duo) with a unified toolbar instead.
2026-11-03 11:21:32 +08:00
weishu e1093466c9 feat(ios): support macOS through Mac Catalyst
Build the app and notification extension for Mac Catalyst with the Mac
idiom, so Macs get a 1:1 native window instead of the scaled iPad app.
The Mac build keeps the run.hapi.app bundle ID and adds Mac entitlements
(sandbox, network, microphone, user-selected files, Mac APNs).

- Always use the split on Mac with a sidebar list style, denser rows,
  14pt reading text, a hidden duplicate titlebar title, a minimum window
  size and page-sized sheets; open web links in the default browser and
  hide the unavailable live QR scanner.
- Add menu bar / hardware-keyboard commands: New Session, Settings,
  Toggle Sidebar, a Session menu (settings, files, rename, export, stop,
  previous/next session) and a guide link.
- Composer: Return sends on Mac (Shift/Option-Return for a newline, IME
  untouched, first suggestion picked); dropped files and pasted images or
  copied files become attachments on all platforms.
- CI builds Mac Catalyst and runs the navigation, split and transcript
  geometry tests there; README documents the Mac build.
2026-11-03 11:15:11 +08:00
weishu dc08608fdc feat(ios): add @ session and file references 2026-11-02 12:16:25 +08:00
weishu da5dffd8ec perf(ios): stop main-thread stalls from the session list on large hubs
Profiling a 2,745-session hub while scrolling a chat showed the two
longest main-thread stalls (~80 ms) came from the session list, not the
transcript:

- The home list, covered by the pushed chat, still rebuilt and diffed
  every row on each session change. A covered list now keeps its last
  rows and refreshes once on return; a side-by-side split stays live.
- DiskCache encoded the 2 MB session snapshot on the main actor after
  every burst of changes. Encoding now runs with the file write, off it.

After the change the trace has no session-list or snapshot work on the
main thread and no stall over 50 ms (max 38 ms, from Markdown cells
entering the screen).
2026-11-01 20:29:37 +08:00
weishu e9cbd8499b fix(ios): size the queued card to its rows and skip it for idle sends
The queued card's ScrollView is greedy, so one row still took the full
140 pt cap; measure the rows and size the card to them, capped at ~3.

Sends dispatched while the agent is idle no longer flash through the
queued bar while invokedAt is still null: the interactor records them
before the POST (the hub flips thinking on as soon as it queues), the
thread renders them, and after a 5 s grace a still-uninvoked row moves
to the bar as genuinely queued.
2026-11-01 20:29:37 +08:00
weishu c78cfa9e11 perf(ios): skip unchanged session rows on list updates
Any session change (even an offscreen one, e.g. a streaming agent)
re-ran every row's content (button, swipe actions, context menu), so one
update cost O(all rows): ~30 ms at 300 sessions in a Release simulator
build. Rows now compare only what they draw and skip unchanged content
(~4-6 ms, flat in the row count), and the minute tick redraws only each
row's age label instead of rebuilding the list.
2026-11-01 20:29:37 +08:00
weishu 2ac959d51a feat(ios): compact queued-message card above the composer
Replace the full-width queued bar with a floating card stacked on the
composer, following the Codex/Claude Code/Cursor convention: one-line
rows with icon actions (bolt to steer, retry, cancel), tap a row to
edit, long-press for the full menu, and animated insert/remove.
2026-11-01 16:31:36 +08:00
weishu f69c9961fd feat(ios): refine the chat composer
- Collapse the empty, unfocused composer to one row; anything in flight
  (focus, draft, chips, schedule, recording, scratchlist) expands it
  without dropping focus.
- Bare 20 pt tool symbols with color-only states; only send/stop is a
  filled 32 pt circle. Both scale with Dynamic Type.
- Fix the schedule menu reading as active: Menu tinted its relative
  `.secondary` style.
- Stop uses the accent instead of alarm red.
- Liquid Glass card on iOS 26 (damped so text behind the short pill
  stays out of the placeholder); hairline edge on earlier systems.
- ⌘↩ sends from a hardware keyboard, gated like the Send button.
2026-11-01 16:24:47 +08:00
weishu e940439ecf feat(ios): quieter home connection status
- Transient SSE states appear only after 2s, as the iOS 26 nav subtitle
  (a gray line with a spinner where no title is shown), so the list
  never shifts on routine reconnects
- Only a failed list refresh is amber: "Offline · updated …" with Retry
2026-11-01 15:48:18 +08:00
weishu 6ed83eda3c fix: show unread for running sessions
Running sessions previously suppressed the ordinary unread dot, hiding
answers the user had not seen. Unread is now
manualUnread || contentRevision > readRevision on web, iOS and Android.

Web rows draw the running/background spinner beside the unread dot, and
unread outranks background status. Because session patches arrive before
the message they count, a chat following its visible tail hides its own
ordinary dot until the rendered acknowledgement lands (display-only; web
and iPad split view).
2026-11-01 15:39:46 +08:00
weishu 85a3cfb40f fix(ios): return the session list to an inline title
The large title only cost vertical space once the second section was
renamed to Recent; the inline title shares the toolbar row.
2026-11-01 15:35:20 +08:00
weishu 1ab77530fd fix(ios): mark unread rows without a second dot
- Unread is a semibold title plus an accent timestamp, so the presence
  badge stays the row's only dot and timestamps share one column
- Compact section header insets and default min header height
- README: the session list uses a large collapsing title
2026-11-01 15:33:39 +08:00
weishu cf592b8483 feat(ios): refresh the session list layout
- Large collapsing title; rename the second section to Recent
- Swipe actions: pin/mark read (leading), archive or delete/reopen (trailing)
- Two-line agent icon with a presence badge (pulses while running) instead
  of dimming disconnected rows and per-row spinners
- Larger timestamps, compact section headers, glass-friendly filter icon
- Drop the pixel-level row presentation tests
2026-11-01 15:18:09 +08:00
weishu 5a45b1cd2f fix(ios): recover inactive sessions during attachment uploads 2026-11-01 12:26:32 +08:00
weishu f4d8faebea feat(ios): support agent-displayed video, audio and files 2026-11-01 12:26:32 +08:00
Junmo KimandGitHub be41e854e0 feat(codex,opencode): show compaction summaries and token counts (#2249)
* fix(chat): render available compaction facts

* feat(opencode): unify native compaction summary cards

* fix(opencode): report actual compaction application lifecycle

* feat(codex): render native compaction checkpoints and metrics

* fix(chat): render compaction summaries and token facts in native clients

* fix(opencode): preserve transcript priming across read failures

* fix(opencode): recover snapshot-only replies after attachment
2026-11-01 09:54:10 +08:00
weishu 5ef4304a4a fix: synchronize read state across web and native clients
Track readable content revisions and durable read cursors in the hub. Acknowledge only rendered foreground tails, persist offline read operations, and preserve newer manual unread choices across devices.

Migrate existing history to a read baseline and cover pagination receipts with shared native conformance fixtures.
2026-11-01 09:52:51 +08:00
weishuandGitHub ee4ac238cb feat(ios): move hub controls into Settings and new session beside search (#2257) 2026-11-01 09:11:39 +08:00
weishu 25ab6bb842 fix(ios): handle pairing item provider pastes explicitly 2026-10-28 20:25:17 +08:00
weishuandClaude Opus 5.5 132d256171 feat(ios): fork, rewind and export conversations
The hub's fork, rewind and export routes had no iOS UI. The chat's
menu now offers:

- Fork Conversation: when the agent advertises forkCurrent, the
  session is live and no Codex turn is running (the web gate). The new
  session opens in place of this chat.
- Rewind or Fork…: a sheet listing loaded user messages that have a
  native point in metadata.conversationHistoryPoints. Each row offers a
  confirmed Fork from Here or Rewind to Here, gated like web: forks
  need an idle turn except on Codex, and rewinds always need one. The
  actions live in a sheet, not on the transcript bubbles, because those
  keep text selection and cached row heights. After a rewind the tail
  resyncs with a history reset. An ambiguous native boundary (409
  ambiguous_native_boundary_fork_safe) offers a fork from the same
  point instead.
- Export Conversation…: saves the hub's lossless JSON payload through
  the Files save panel, using the web download's filename. A large
  export asks before retrying with force; a 413 explains the limit.
  Markdown export stays web-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
weishuandClaude Opus 5.5 423c5f51df feat(ios): schedule sends from the composer
iOS showed scheduled messages but could not create them. A clock
button now sits next to the composer's attachment button. It offers
the web presets (in 5 min, 30 min, 1 h, 4 h) or a specific time up to 7
days ahead. A chip above the input shows the pending time; its × sends
normally again.

Presets resolve when the user taps Send, so "in 5 minutes" counts from
the send. Validation follows the web: a 30 s grace period for past
times and a 7-day maximum.

A scheduled send is text-only and queued. The hub rejects scheduledAt
with attachments or steer, so the clock is disabled while attachments
are present and the steer menu is hidden. The schedule clears once the
send dispatches. Sending reuses the existing optimistic path, and a
retry keeps the row's scheduledAt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
weishuandClaude Opus 5.5 f7722fcd65 feat(ios): suggest slash commands in the composer
Typing / in the iOS composer offered nothing; web and Android show the
session's commands. While the input is a lone /token, a list above the
card shows matching commands. A tap inserts "/name " so the user can
add arguments.

As on Android, the sources are metadata.slashCommands plus the
/slash-commands RPC. The RPC is fetched once, when the input first
enters slash mode, and its entries override bare names. A failed fetch
retries on the next /. There is no copy of the shared built-in table,
so the CLI stays the source of truth. Ranking follows web: exact,
prefix, contains, then near-miss typos. The list is hidden in
Scratchlist mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
weishuandClaude Opus 5.5 64e062fb84 feat(ios): search sessions, unread-only lens and mark all read
The iOS session list could only filter by machine. Web also has text
search, an unread-only filter and Mark All as Read.

- Search: a .searchable field ranks matches with the web relevance
  rules, ported from sessionListSearch.ts via Android as
  SessionListSearch. It searches title, worktree, summary, agent,
  machine, path and id; every word must match, with */? wildcards.
  Results keep the global/project pin sections, so the Pinned header
  still applies.
- Filters menu:
  - It now holds an Unread Only toggle that keeps the iPad's selected
    chat listed.
  - The machine section appears only with two or more machines, as
    before; the menu itself shows whenever the hub has sessions.
  - Mark All as Read advances the local last-seen watermarks after a
    confirmation, as on web.
- Empty list: an empty search or filter result gets its own empty state
  instead of "No sessions yet".

getSessionTitle moves into HapiKit so search and the rows share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
weishuandClaude Opus 5.5 1efcc3183d feat(ios): switch models for every agent in session settings
The settings sheet only had model pickers for Claude and Codex; other
agents could not change models after creation. Live sessions now load
/sessions/:id/<flavor>-models. Agy uses its machine catalog, since it
has no session route. As on web, grok and copilot skip
terminal-controlled sessions.

Rows follow web getModelOptionsForFlavor:
- Copilot, dsh, grok and kimi offer a Default or Auto row that clears
  the model.
- Cursor's Auto is the explicit 'auto' wire id.
- Opencode, agy and pi only switch between listed models.
- An unlisted current model stays visible.

Pi resolves provider/modelId from metadata.piSelectedModel and switches
with a {provider, modelId} reference.

Efforts:
- Grok and OpenCode options come from their *-reasoning-effort-options
  routes and reload after a model switch. OpenCode options that still
  describe the previous model stay hidden.
- Pi shows the current model's thinking levels.

The sheet's load-failure flag now covers every catalog, not just Codex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
weishuandClaude Opus 5.5 d01f03eef7 feat(ios): pick models for every agent when creating a session
The create form only offered models for Claude and Codex, so every
other agent spawned on its default model. The form now loads the
catalogs web uses. Agy, cursor, dsh and pi read
/machines/:id/<flavor>-models. Copilot, grok, kimi and opencode probe
the same route with cwd once the directory exists; the view refetches
when the typed path turns out to exist.

Option rows follow the web builders:
- Copilot and cursor label the default row "Auto".
- Kimi and pi prefix the provider; pi values are provider/modelId.
- OpenCode marks the agent's own default.
- Cursor shows a flat list of ACP ids, without the variant drill-down.

Grok efforts and pi thinking levels follow the selected model, and an
OpenCode variant becomes the reasoning effort. Grok's auto permission
mode is hidden when the probe reports it unsupported. A restored
selection the catalog no longer offers falls back to Default, and
Create waits while a non-default selection is still being validated.

The spawn body sends model for all of these agents, and cursor always
sends it, with 'auto' as the default. Grok and pi send effort; opencode
sends modelReasoningEffort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
weishuandClaude Opus 5.5 5942b427a9 feat(ios): rename, delete and reopen sessions
The API wrappers existed but iOS had no UI for these actions, while
web and Android did. The session row's context menu and the chat's …
menu now offer Rename for every session. Active sessions keep Archive.
Inactive sessions get Reopen and a confirmed Delete instead of
Archive, which the hub rejects with 409 for them.

The store applies renames and deletes optimistically. A failed rename
refetches server state; a failed delete restores the row and the
cached detail. Reopen marks the returned session active right away.
When reopen returns a superseding id, the chat seeds the new window,
moves the draft and navigates to it, as send-resume already does. A
reopen from the list also moves the draft and opens the session. A
422 shows the hub's message with the missing fields.

On iPhone, an authoritative removal (delete, or archive elsewhere) now
pops that chat, matching the iPad split, which already clears the
selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:00:00 +08:00
ffd950a220 fix(codex): drop safe-yolo from Codex permission modes (#2183)
* fix(codex): drop safe-yolo from Codex permission modes

Every Codex session runs on the native shared runtime (runCodex is
runSharedCodex), which rejects safe-yolo. The mode stayed in
CODEX_PERMISSION_MODES and six filters hid it again in the web picker,
composer, hub permission-mode route, hapi set-mode and both native
apps. API callers that validate against the flavor catalog (e.g. a
spawn with permissionMode: 'safe-yolo') still passed it through and
only failed inside the runner.

Remove it from the Codex catalog (shared, iOS, Android, fixture) and
delete the filters. autoReview is the native replacement. Safe Yolo
stays for Gemini, Kimi and Copilot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ios): Codex option list now has four modes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:12:55 +08:00
weishu c6fae86c42 feat(ios): adapt layout for iPhone Duo
- Use the split navigation on foldable iPhones once UIHingeInteraction
  (iOS 27.1+) reports a hinge: unfolded shows sidebar + chat, folded
  collapses to the phone stack without recreating the chat.
- Side-by-side sidebar: drop the truncated inline "Sessions" title and
  move the filter beside the hub menu (also fixes iPad).
- Folded outer screen: drop the home title so the empty bar disappears,
  use the leading-aligned system title/subtitle in chat, minimize the
  chat title on scroll, and let the composer sit 16pt closer to the home
  indicator while the text field is unfocused.
- Qualify Markdown.Document, which is ambiguous with the iOS 27.1 SDK.
- test-transcript.sh picks the newest runtime that supports the device
  type (iOS 27.1 only ships iPhone Duo); split tests run on iPhone Duo.
2026-10-28 10:32:21 +08:00
d3d8bf2620 feat(ios): add Russian locale (#1964)
* feat(ios): add Russian locale

Add Russian translations to Localizable.xcstrings for all 591 catalog
entries (reusing matching Android translations and translating the rest);
zh-Hans and format placeholders are preserved.

* fix(ios): make Russian selectable and use correct plural forms

- add AppLanguage.russian ("ru"), its display name, the AppleLanguages
  override, and register ru in the Xcode project's knownRegions so the
  language picker can actually select Russian
- add Russian one/few/many/other plural variations for %lld sessions,
  %lld attachments and %@, %lld sessions
- use count-agnostic phrasing for the other dynamic counts (tools, edits,
  lines, chars, findings, notes, queued messages, questions, ...)
- correct Input/Output to Ввод/Вывод
- cover the new language case in ThemePrefsTests

* fix(ios): use Russian plural forms for the remaining count labels

* fix(ios): pass the step count to the plural localization

* fix(ios): pass tool counts to the plural localization

* fix(ios): keep the singular English tool-group labels

---------

Co-authored-by: mrudy <mrudy@local>
2026-10-05 17:12:57 +08:00
AnanovoandGitHub b11358f333 test(ios): assert Scratchlist preview visibility after focus (#1861) 2026-09-16 07:25:01 +08:00
weishu 86212a6ae7 fix(ios): correct pairing setup guide link 2026-09-15 09:00:21 +08:00
weishu bb00d7953a fix(ios): simplify session settings and anchor iPad popover 2026-09-14 18:47:03 +08:00
weishu 16ba8fdaa9 feat(ios): add adaptive iPad navigation 2026-09-14 18:10:59 +08:00
weishu 733a960ede refactor(ios): simplify scratchlist UI and interactions 2026-09-14 13:19:21 +08:00
weishu ee46cd6fea feat(ios): integrate scratchlist with the chat composer 2026-09-14 11:55:46 +08:00
weishu 10ac8157bb fix(ios): improve manual pairing input and paste handling 2026-09-14 11:13:11 +08:00
weishu 9c4e6dad6c fix(ios): refine approval cards and inline action styling 2026-09-14 09:48:19 +08:00
weishu c9eb90e928 fix(ios): refine Codex plan action button styling 2026-09-14 08:53:24 +08:00
weishu 40b6ac462c fix: align directory browsing and iOS session creation 2026-09-14 08:44:02 +08:00
weishu 93e9c5ac65 fix: restore Codex titles and iOS collaboration controls 2026-09-14 08:44:02 +08:00
weishu 6675c4db95 feat(ios): simplify home session rows and status indicators 2026-09-13 21:13:23 +08:00
weishu e9be050729 feat(ios): redesign session settings sheet 2026-09-13 19:48:14 +08:00
weishu 0a9f15a9a7 fix: align request_user_input other answers across clients 2026-09-13 19:48:14 +08:00
weishu a6880fe592 fix(native): add Codex plan proposal actions
Add current-proposal decoding, dedicated implementation requests and composer-only continuation on iOS and Android. Keep pending/errors across row recycling, reject stale actions and prevent duplicate submissions.

Include native regression tests and localized plan controls.
2026-09-13 19:48:14 +08:00
weishu 93d89c7cf4 fix(ios): keep latest button hidden after tool inspection at bottom 2026-09-13 19:48:14 +08:00
weishu 2e37419a7d fix(ios): reduce back-to-latest button sensitivity 2026-09-13 11:46:10 +08:00
weishu d29713aeda fix(native): render plan proposals inline
Render ExitPlanMode and exit_plan_mode Markdown from input.plan in iOS and Android conversations. Preserve approvals, raw source and diagnostics while hiding empty output placeholders and prewarming plan documents.

Add generated protocol fixtures and native regression coverage for long plans, live updates, recycling, themes and typography.
2026-09-12 16:06:16 +08:00
weishu 418f11f80e feat(ios): improve inline question answering 2026-09-12 15:20:01 +08:00
weishu 0c7f557ba3 feat(ios): browse tool groups in a native inspector 2026-09-12 13:03:27 +08:00