Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/HUB-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ One place to start modules, after `Hub::start`: `agents::Agents::start(hub.clone
## Rules process
Not wired yet. Planned call: one persistent native process, a JSON line in, one out: `{"v":1,"fn":"Fm.safe","args":{...}}` -> `{"ok":..}`; 6.7 us round trip measured (docs/HUB-M1.md). Until then implement the rule in Rust with a corpus test and keep name in the test.

## Quick chats (`project == "chats"`)
- `thread.create {project: "chats", ...}` creates a project-free quick chat in `<home>/chats/<id>` with no git repo and default title `"New chat"`.
- `thread.move_project {thread, project}` emits append-only `ThreadProjectSet {id, project, at}` to move an idle quick chat (`thread.project == "chats"`) into a live local project, clearing `worktree`, `branch`, and `session`, keeping conversation history, and stopping any idle agent process.

## Agent providers (agents lane, commit 51b4ac53d)

Contract: `native/host/src/agents/providers/mod.rs` (read its docs); reference driver: `providers/codex.rs`.
Expand Down
1 change: 1 addition & 0 deletions docs/PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Each lane updates its own rows in the commit that lands the work.
| Japanese in the iOS app (Settings → Language: Automatic, English, 日本語) | done | i18n | `scripts/i18n-ios.py` generates `Tr.swift`/`TrCatalog.swift`; `scripts/check-ios-i18n.py` and TrTests (58 checks) run in `scripts/mobile/ios-unit-tests.sh` and CI. Driven 2026-11-09 on the Mac mini's private simulator with a temp-home hub: Automatic with the simulator in Japanese, and Settings › Language › 日本語 on an English simulator (`scripts/mobile/ios-i18n-journey.sh`): pairing, Home, search, a thread turn with composer and menu, Board, Schematic, 3D, Mech and Diff, bot, room, the Add-a-hub sheet. Not seen on screen: the Notifications section. Still English: content, product names, the system Paste button and keyboard tip (they follow the device language). |
| Notification settings of 0.14 (`notify.*`: needs, settled, all, reminders, failed, idle) | done | notify | Settings → Notifications, one page the hub draws (`present/settings.rs` `notifications`; phones: data/1 `notify.page`, feature `notifysettings`): Needs me, Settled, Reminders, Everything, quiet hours (on/off, times), urgent asks, one row per iPhone (mute). Each changes what fires: hub tests `each_notify_switch_changes_whether_a_thread_alerts_the_phone`, `the_reminders_switch_…`, `the_pages_…`, `the_notify_switches_change_what_an_end_records`. Driven: GPUI on Xvfb with real clicks (`scripts/notify-e2e.sh`: Settled off → the next finished turn raises no desktop notification, on → it does); Android emulator (every press in `events.jsonl`, a bad time refused with the hub's words, Settled off → no alert on the phone, on → alert); iOS simulator (`test/e2e/push/notify-ios.sh`, 26 steps: quiet hours hold a push and releasing sends it as one, mute and urgent). `notify.failed` and `notify.idle` were only 0.14's message texts ("Failed", "All agents idle"), not switches. Everything (`notify.all`) did nothing in this hub before: it now alerts every completed or failed turn end; room exchanges stay quiet (open). |
| Old Scratch chats: retired for new threads in 0.14 (38d3b10954) with their chats kept; 0.14's docs say they open "from Conversation history in the sidebar or search" | done | phone-cmds | The sidebar has a Conversation history group (`sidebar.rs` `legacy`, `present/screen.rs`): its row counts the chats and opens or shuts the list; a chat that wants attention, or is open, always has its row; nothing starts there. The sidebar search finds threads by title, these chats too, and opens the group; Enter opens the first found; the palette jumps to them (tests `scratch_chats_are_conversation_history_found_by_search_and_never_a_place_to_start`, `the_search_finds_threads_by_title_and_narrows_a_project_to_them`, `an_old_scratch_chat_is_found_by_its_title`). Phones: data/1 feature `history` (PHONE-DATA.md, Conversation history): `history.list {q?}` → `{live, threads, next, count}` from the sidebar's own rule (`sidebar::scratch_chats`); a `Thread` says `history`; Scratch is no project of `projects.list`, `search` or `mentions.list`, its chats are not in `threads.list`, and `thread.create` refuses it (test `scratch_chats_are_history_found_by_search_and_never_a_place_to_start` in `data/tests.rs`). Both phones draw the group under the projects (Android `DataViews.kt`, iOS `DataViews.swift`; `DHistoryTest`, `ThreadGroupsTests.swift`) and the search's finds under a Conversation history heading. Driven (hub-rest lane, Xvfb): the group opened and the chat opened from it (`hub-rest-history.png`, `hub-rest-scratch-chat.png`). Driven (phone-cmds lane): on the Android emulator and the iOS simulator (journey `data-history`) the group's row counts 3 with only the live chat shown, opens to all, no project or + for Scratch, the search finds the chat, it opens with its messages and takes a message the stand-in answers. |
| Chats that belong to no project (new in 2026-11: a thread in no project, `thread.project == "chats"`, its own folder `<home>/chats/<id>`; the old Scratch chats above stay as they are) | partial | quick-chats | One press everywhere: GPUI has New chat beside the sidebar search (`ui:New chat`), Ctrl/Cmd+Shift+N (`keys.rs` `new-chat`, rebindable), the palette's New chat (no project) and a + on the Chats section's head, all the action `new-thread` with `chats`; the web client the same button, Alt+Shift+N (a browser keeps Ctrl+Shift+N) and palette action over `thread.create {project:"chats"}`; both phones a New chat button in the home bar that opens the new-thread screen with no project. The hub lists the unsettled chats in the section `chats` (`present/sections.rs`, kind `threads`): GPUI and the web draw it as any section, the phones in the Inbox tab (it does not end All clear). Move to project…: the hub's `move` item on a chat row (`sub`: the projects, each `row-move-project`) is a second menu in GPUI (row and title menus) and on the phones; the web has a row button and a palette action over `thread.move_project`. Tested: GPUI `a_chat_in_no_project_moves_to_a_project_from_its_menu_and_has_no_subthread`, the palette and key tests; web `sidebar.test.ts`, `palette.test.ts`; Android `MobileSectionsTest.chatsWithNoProjectAreInTheInboxAndMoveToAProject`; iOS `HomeModelTests`, `SectionMenuTests`. Not driven on a phone or in a browser yet; the phone tests have not been run (no Android SDK or Mac on the lane's machine). |
| `browser.seen` (0.14's client sent it from its browser-cast code, `client.bend:3811`, `3852`, naming a page) | unchecked | audit | Audit: unknown method on `main`; the GPUI client has no cast. What it acknowledged and whether anything replaced it is not shown. |
| `view.search` (0.14's Find: "Type a word said in any thread", text of messages across threads) | done | search | Hub: `session/index.rs` indexes every message by its tokens, built once at start on its own thread (a real 150 MB log, 465k lines, 20k messages: 0.47 s; queries 1-3 ms) and then kept up from the lines appended since; a word is found anywhere inside what was said, any case. `thread.search` and data/1 `search` (`messages`) answer from it; `thread.find {thread, q}` and data/1 `find` (feature `find`) answer one thread's matches, oldest first, the newest 1000 at most (docs/HUB-API.md Search, docs/PHONE-DATA.md). `view.search`, `view.message` and `view.cancel` are retired: no client sends them, a newer query replaces an older one, and no message row is ever cut for `view.message` to continue (`partial` names activity rows only); they answer INVALID_REQUEST. GPUI (lane/search, Xvfb, real X keys and mouse, temp home, 162 seeded messages): Ctrl+Shift+F opened "Type a word said in any thread"; "pinecone" listed 4 hits (3 of the long thread, 1 of another) with the word bold; Down Down Enter opened the oldest hit ~150 rows back, paged until held, scrolled to and marked (`build/gpui/shots/search/g1-find-all.png`, `g3-opened-at-message.png`). Android (lane/search-android, Pixel 9 on a private hub, 2026-11-09): home search for "zephyr" lists a MESSAGES group (snippet with the word bold, "you said"/"agent said" · thread · project); a tap on a hit four pages back opens the thread there, marked. iOS: on a SEARCH=1 data hub (scripts/mobile/ios-search-test.sh, journey data-search in the Simulator) the home search lists what was said under Messages (word in bold, "you said"/"agent said", thread · project); a tap opens the thread at the message, older pages read, marked. |
| Old checklist rows not in "Old checklist, audited": 56 to 84 (providers, MCP tools), 131 to 198 (settings pages, accounts and pairing, diagnostics, housekeeping, onboarding, hub core), and every phone result | unchecked | audit | Not driven yet. Settings pages are the E2E walk's (S01 to S14); providers, MCP tools and the hub-internal rows (173 to 198) need an agent or hub-level driver, not the GUI. The phones need an emulator or simulator and were not started. |
Expand Down
10 changes: 9 additions & 1 deletion docs/PHONE-DATA.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ On reconnect the app resubscribes and re-reads lists and the open thread (no res

## Additions (2026-11-06, gpui-mobile; `native/host/src/data/ext.rs`)
`hello.features` lists what a hub does beyond the base: `images` (above), `actions`, `search`, `models`, `mentions`, `bots`, `notify`. An app checks the feature before offering the control.
- `thread.act {thread, action: pin|unpin|settle|unsettle|archive|unarchive|delete|detach|reparent|rename|fork, title?, parent?}` → `{thread}` (fork requires feature `fork` and returns the new thread; delete: `{}`; reparent: `parent` is another live thread of its project, no cycle); each is the hub's own `thread.<action>` request, so the desktop and the phone agree. `badge.list` → `{colors:[{name,css}], icons:[name]}` · `project.act {project, action: rename|color|icon|pick|remove, title?, value?}` → `{}` (color: a tint name, icon: an icon name; pick: Pick again, the hub's model picks the icon anew and the person's icon and colour are cleared; a project shows the person's icon and colour, else the hub's pick, else the folder and a colour from its id; `detach` on a thread makes it top level).
- `thread.act {thread, action: pin|unpin|settle|unsettle|archive|unarchive|delete|detach|reparent|rename|fork|move_project, title?, parent?, project?}` → `{thread}` (fork requires feature `fork` and returns the new thread; delete: `{}`; reparent: `parent` is another live thread of its project, no cycle; move_project: moves a quick chat into a live project); each is the hub's own `thread.<action>` request, so the desktop and the phone agree. `badge.list` → `{colors:[{name,css}], icons:[name]}` · `project.act {project, action: rename|color|icon|pick|remove, title?, value?}` → `{}` (color: a tint name, icon: an icon name; pick: Pick again, the hub's model picks the icon anew and the person's icon and colour are cleared; a project shows the person's icon and colour, else the hub's pick, else the folder and a colour from its id; `detach` on a thread makes it top level).
- `search {q, archived?=false, limit?=30, thread?, messages?=true}` → `{threads, projects, messages}` (title, project title, project folder; case-insensitive). `messages` are what was said with every word of `q` anywhere in it (the person's and the agents' messages, newest first, at most 3 a thread; with `thread`, only that thread's), from the hub's index of messages (docs/HUB-API.md, Search): each `{thread, title, project, msg, role, text, at}`, `text` a line around the first word. `messages: false` leaves them out. `at` is unix ms, as everywhere here. A tap on one opens its thread at the message (older pages read with `thread.entries {before}` until it is held), marked.
- `find {thread, q}` (feature `find`) → `{q, matches: [{msg, role, at, text}], total, more}`: find in a thread, every message of it with every word of `q`, oldest first (the thread's order), at most 1000: past that the newest 1000, with `more`. The app's find bar shows "n of total", steps next and previous through `matches` and scrolls to each `msg` (reading older pages with `thread.entries {before}` until it is held), marking it. An unknown thread is an error.
- `models.list` → `{models:{provider:[{value,label,ok,why}]}}` (the hub's `models.all`); `thread.model {thread, provider, model, effort?}` → `{thread}` (the same provider: `thread.modes`; another provider: `thread.provider`, between turns only). A thread's `model` is the one chosen (ModesSet) else the provider's.
Expand Down Expand Up @@ -299,6 +299,14 @@ The old Scratch chats: 0.14 stopped new ones and kept these. They open read and
- `history.list {q?, limit?=50, before?}` → `{live, threads, next, count}`: `live` are the chats that want attention (an open ask, a running turn, still on the Pinned or Active shelf); a phone always shows them under the group's row. `threads` are the rest, newest first, paged like `threads.list`, shown while the group is open. `q` keeps the chats whose title has every word of it, any case. `count` counts every chat, the search aside; the group's row ("Conversation history (N)") shows only when it is above 0, and opens or shuts the list.
- `search` finds these chats by title: a phone shows them under a "Chats with no project" heading. A `lists` push of a `thread` with `history: true` means the group changed: ask `history.list` again.

## Quick chats (no project, feature `chats`; `native/host/src/data/ext.rs`, `sidebar.rs` `CHATS`)
Persistent threads started outside any project (`project: "chats"`), stored in `<home>/chats/<id>` with no git repository:
- `hello.features` includes `"chats"`.
- `thread.create {project:"chats", title?, text?, ...}` → `{thread}` with `project: "chats"`, `chat: true`. `"chats"` is excluded from `projects.list` and `mentions.list` (`%`), while `threads.list` includes live quick chats (and `chats.list` lists quick chats specifically).
- `chats.list {q?, settled?, limit?=50, before?}` → `{threads, next, count}` lists non-deleted, non-archived quick chats (`q` matches title words, `settled` optionally filters by settled flag).
- `thread.move_project {thread, project}` (and `thread.act {action:"move_project", project}` / `sidebar.act {action:"row-move-project", value:"<thread>\u001f<project>"}`) → `{thread}` moves an idle quick chat into a live project (`ThreadProjectSet` event), clearing `worktree`/`branch`/`session`, preserving history, and stopping any idle agent process.
- In `sidebar.sections`, unsettled quick chats (plus the selected one) appear in the `chats` section (`kind: "threads"`, after `snoozed` and before `pinned`); `jump` includes settled quick chats too with `place: "Chats"` and `chat: true`. `viewer.rail` omits design/diff/review tools for quick chats.

## Terminals (feature `terms`; `native/host/src/data/term.rs`, `term/stream.rs`)
The hub's own terminals: the chat terminals a thread opens (an agent's `terminal_open`), the threads' floating shells, and shells a phone opens itself. The screen is the hub's emulator's; a phone runs the same VT rules on the bytes (or draws the snapshot). A data/1 socket holds the hub's token or a paired device's (full access), so it types into them as the desktop does.
- Entry `{id, kind:"term", text:<title>, at, term:{key, id, title, cols, rows, cmd}}`: a chat terminal in a thread's entries (paging and `entry` pushes alike). Draw it as a card a few rows tall; its screen comes from `term.read`/`term.watch` under `key`. A thread's card stays after the terminal ends: its last screen is on the hub's disk, so it reads back after a restart (a terminal that was running when the hub stopped reads back `stopped`).
Expand Down
8 changes: 8 additions & 0 deletions i18n/en.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,14 @@ gpui.star.why = Stars help other hardware designers find Backplane, and tell us
gpui.projects.unpushed = {n, plural, one {# commit not pushed to {upstream}} other {# commits not pushed to {upstream}}}
gpui.projects.push = Push

# quick chats: threads in no project (sidebar New chat, the Chats section, Move to project)
chats.new = New chat
chats.new.noproject = New chat (no project)
chats.title = Chats
chats.move = Move to project…
chats.move.none = No project to move it to. Add a project first.
chats.old.tip = Older chats that belong to no project, kept as they are. New chat starts a new one.

# ---- gpui-e: hub settings and panels ----
gpui.e.files.max.mb = Largest attachment (MB)
gpui.e.files.max.note = A file sent with a message, or shown from this hub, may be up to {mb} MB. Files stream from disk, so a large one costs disk space, not memory.
Expand Down
8 changes: 8 additions & 0 deletions i18n/es.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2450,6 +2450,14 @@ gpui.star.why = Las estrellas ayudan a otros diseñadores de hardware a encontra
gpui.projects.unpushed = {n, plural, one {# commit sin enviar a {upstream}} other {# commits sin enviar a {upstream}}}
gpui.projects.push = Enviar

# quick chats: threads in no project (sidebar New chat, the Chats section, Move to project)
chats.new = Chat nuevo
chats.new.noproject = Chat nuevo (sin proyecto)
chats.title = Chats
chats.move = Mover a un proyecto…
chats.move.none = No hay ningún proyecto al que moverlo. Añade uno primero.
chats.old.tip = Chats antiguos sin proyecto, tal como estaban. Chat nuevo empieza uno.

# ---- gpui-e: hub settings and panels ----
gpui.e.files.max.mb = Adjunto más grande (MB)
gpui.e.files.max.note = Un archivo enviado con un mensaje, o mostrado desde este hub, puede pesar hasta {mb} MB. Los archivos se transmiten desde disco, así que uno grande consume espacio en disco, no memoria.
Expand Down
8 changes: 8 additions & 0 deletions i18n/ja.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,14 @@ gpui.star.why = スターは、ほかのハードウェア設計者がBackplane
gpui.projects.unpushed = {upstream} にプッシュしていないコミット: {n} 件
gpui.projects.push = プッシュ

# quick chats: threads in no project (sidebar New chat, the Chats section, Move to project)
chats.new = 新しいチャット
chats.new.noproject = 新しいチャット(プロジェクトなし)
chats.title = チャット
chats.move = プロジェクトに移動…
chats.move.none = 移動先のプロジェクトがありません。先にプロジェクトを追加してください。
chats.old.tip = プロジェクトに属さない以前のチャットです。そのまま残っています。新しいチャットから新しく始められます。

# ---- gpui-e: hub settings and panels ----
gpui.e.files.max.mb = 添付の上限(MB)
gpui.e.files.max.note = メッセージで送るファイルやこのハブから表示するファイルは{mb} MBまでです。ファイルはディスクから順に読むので、大きなファイルはメモリではなくディスク容量を使います。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,8 @@ object DataClient {
projects = (projects.filter { it.id != p.id } + p).sortedByDescending { it.updatedAt }
return p
}
/** The place of the chats that belong to no project (the hub's `sidebar::CHATS`): `thread.create` with it starts one, in a folder of its own. */
const val CHATS = "chats"
suspend fun createThread(project: String, text: String, choice: DNewThreadChoice = DNewThreadChoice()): DThread {
val p = choice.into(JSONObject().put("project", project).put("clientId", UUID.randomUUID().toString()).put("permission", "ask"), skipEmpty = true)
if (text.isNotBlank()) p.put("text", text.trim())
Expand Down
Loading
Loading