3 Commits
Author SHA1 Message Date
NB 6fbd8bfc20 Let the main chat and side threads of an agent use each other's browser tabs (#13433)
* Let every chat of an agent use the browser tabs of the agent

Main chats and side threads of an agent can now use all browser tabs of
that agent. list_tabs shows the chat that opened each tab and tells when
another chat uses a tab now. Takeover, submit_secret and list_logins use
the same rule. Channel and messaging threads still use only their own
tabs and the tabs shared with an @ tag.

* Keep channel tabs out of other chats and make the working hint reliable

The main chat and side threads use only the tabs that the main chat, a
side thread or no chat opened. Tabs of a channel or a messaging thread
stay out of these chats unless a person tags them with @.

otherChatWorking now also uses the last chat that used each tab in the
last 2 minutes, because control sessions end 1.2 s after a call.

A takeover from one chat no longer deletes the held takeover result of
another chat. list_tabs looks up each chat once per call.

The browser user-control E2E now covers the cross-chat access.

* Keep a held takeover result for each chat of a tab

Held takeover results used only the tab id as the key. When two chats of
one agent took over the same tab, the second result replaced the first.
The key is now the tab id and the thread id.
2026-11-20 13:51:50 +01:00
Aleksander DygońandClaude Opus 5.5 03c2ff34c2 Remove code comments and add the no-comments rule (#12604)
* Remove code comments and add the no-comments rule

Remove the comments from first-party code and configuration files:
TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell,
Docker, systemd, Nix, YAML, TOML, JSONC and GritQL.

Keep only what a tool reads: license headers, shebangs, compiler
and lint directives, JSDoc types in plain .js files, generated file
headers, GritQL scope lines, the install-server.sh help text and the
openbot-boat-pre-stop marker. Vendored code, fixtures and released
schemas keep their comments.

Add the rule to AGENTS.md, and change the docs that asked for
comments. Add two i18n keys that only comments named to
RELEASED_SOURCE_KEYS.

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

* Keep comments that are data in strings

The benchmark task files in opencode-free-models-bench.ts tell the
model what each function must do. The sample file and HTML page in
the two stories are display content. Put their comments back.

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

* Keep released migrations and mobile native inputs unchanged

check:migrations compares each released migration with v0.73.0 byte
for byte, so restore src/backend/migrations. A change to a native
build input of apps/mobile makes a new runtime version, so restore
those files and the extra fingerprint sources.

List these files and the comment markers that a tool reads in
AGENTS.md. Remove the last requests for comments in
src/renderer/AGENTS.md.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:19:28 +01:00
Aleksander Dygoń e0304014bc Stop a queue loop that filled a server disk with chat updates (#5908)
* Stop a queue loop that filled a server disk with chat updates

A hosted server wrote 1.7 million `conversation.snapshot-updated` events
(66 GB) in 22 hours. A Claude agent waited on a question in a turn that
the CLI started itself. A routine turn in the same chat ended and set the
chat to idle. The queue then asked the busy CLI for a turn again and again,
and each try saved every queued message again in the chats of the agent
and of each sender.

- A turn end keeps another turn that still runs in the same chat active.
- After `ProviderTurnActiveError`, the lane waits until the next drain
  of the agent, for example the end of any of its turns.
- A change of a queue position alone is shown, but not saved. Each reader
  takes positions from the mailbox again.
- A chat update that the next update replaces whole is removed from the
  event log. A replay of the log gives the same chat.

Adds scripts/queue-restore-loop-e2e.ts and
scripts/conversation-update-supersede-e2e.ts.

* Fix the review findings of the queue loop change

- A turn end clears the chat's active turn as before, except when that
  turn is another turn that still runs. It no longer takes a different
  running turn, so a turn that never ended cannot hold the chat.
- A start is not held after `ProviderTurnActiveError` when a drain call
  arrived during the start: that call can be the end of the turn.
- The activity row of an update has a key from its sequence, so the
  removal finds it by key and does not read the whole table.
- An update goes only when its command id has the generated form, and
  when the later message has the same author and, with no delivery, the
  same time, as a replay keeps them.
- A page read takes the queue positions from the mailbox, because a
  move of the queue alone is no longer saved.
- The loop check waits for the hold that the drain logs, not for a time.

* Do not save queue moves on page reads

The page read compares stored messages with the mailbox. It counted a
moved queue position as a change and saved every queued message again.
Both checks now compare messages with no queue position, through one
helper. A page read takes the positions from the mailbox.
2026-11-09 13:54:45 +01:00