Commit graph

23383 commits

Author SHA1 Message Date
Luke Parker
ea13b16ef7 Merge remote-tracking branch 'origin/dev' into persisted-browser
command.tsx: dev dispatches command keys through @opentui/keymap (#64394) instead of the window keydown handler. The page prompt's keyboard ownership moves into the keymap's block check, which now gets the key's event: a key inside a surface registered with ownKeyboard runs no command, and keymap.test.ts pins it.
2026-11-18 15:18:49 +10:00
Luke Parker
8818746696 chore(app): leave the touched test and bench files clean for lint 2026-11-18 15:13:22 +10:00
Luke Parker
e9fdc7f548 test(app): bench Enter until the prompt request reaches the server 2026-11-18 15:09:54 +10:00
Luke Parker
f88e3de9eb fix(app): the gate wait is part of sending, Stop cancels the send, and sends leave in the order of Enter
A prompt or server command waited for what the plugins prepare after the composer had gone idle. Stop or Escape then interrupted a session that had nothing to interrupt and the send still went out when the wait ended, and a shell or server command sent meanwhile reached the server first.

The wait is a phase of the composer's machine now. While a send's gate is pending the composer takes no other send, Stop cancels that send, and its late gate result is ignored by attempt. A cancelled send never reaches the server: it leaves the conversation, and its text and attachments come back to the composer in front of anything typed since, as a cancelled held prompt does. Prompts, server commands and shell commands all leave through the session's one send chain, each in the turn it took at Enter.
2026-11-18 14:56:09 +10:00
Luke Parker
bfce27a90f feat(client): a session request can join the session's send chain
Prompts and compactions already leave in the order they were made. A shell or server command went around the chain, so one made after a prompt could reach the server first.
2026-11-18 14:56:09 +10:00
Luke Parker
466af8091b fix(browser): a prompt waits for the attachment only while one is in flight and can succeed
The gate woke the attachment whatever the server's state, so with the server restarting or the window offline a registration that could not answer held every prompt for the host's whole timeout, and a plugin disposed mid-wait left the wait to that timeout too. It now resolves in the same tick unless the server is connected and compatible, the session has a location, the window is online or the server local, and a registration is in flight. The server going away, the plugin being disposed and the pane's plugin failing to start each end a wait at once. The machine never heard of a pane that went from starting to not running, so a prompt kept waiting for it.
2026-11-18 14:50:27 +10:00
Luke Parker
43a5b7f629 fix(app): only a built-in's prompt gate is asked, for one second at most
The registry is in the workspace-only SDK, but a registry is its id, so a plugin bundle could add a gate under it, hold every prompt and command and learn the session of each. The host now asks the gates of plugins that ship with the app and no other. The cap drops from two seconds to one: a gate that misses it costs the model one step without what the gate prepared.
2026-11-18 14:50:27 +10:00
Aiden Cline
7667ec4020
feat(core): tell models about Bun's file APIs in Code Mode with full_codemode (#64589) 2026-11-18 04:48:33 +00:00
Aiden Cline
db8730ebcd
fix(codemode): say why an import can't be resolved (#64587) 2026-11-17 22:45:39 -06:00
Luke Parker
aa5b4d7cdc fix(browser): the extensions menu and More tools count as the pane for its shortcuts 2026-11-18 14:26:22 +10:00
Luke Parker
90a267a750 docs(browser): the focus parameter names no implicit active tab 2026-11-18 14:24:53 +10:00
Luke Parker
98714af3a6 fix(browser): a file approval names and remembers the file that opens, not the spelling that asked for it
The prompt for showing a file carried the model's own string, so an encoded address or a run of dot segments read as another name, and nothing was remembered for a file at all. The server now resolves the input before it asks: the prompt names the workspace file that opens, says which link led to it when one did, and always is kept for that file, so no other spelling of it asks again and none stands for another file. A link that points elsewhere by the time the answer comes is refused.
2026-11-18 14:24:22 +10:00
Luke Parker
964e73e849 fix(browser): the server agrees with the desktop on a file named .html, and reads a workspace address in any case
The server took a file named only .html for a page, which the desktop shows in the file panel, so tabs.open failed for want of a tab. A workspace address whose scheme or session ID was not in lower case named nothing, though the prefix it is compared with is written in lower case.
2026-11-18 14:24:21 +10:00
Luke Parker
a5533f7bdf
fix(ui): remove the fringe on project icon corners (#64582) 2026-11-17 22:22:12 -06:00
opencode-agent[bot]
aab2f85c86
fix(app): don't show the Hex tip on touch devices (#64583)
Co-authored-by: Brendan <brendan@anoma.ly>
2026-11-18 12:18:35 +08:00
Luke Parker
b2f11dbd47 fix(core): a namespace with no tool the caller may use is absent from Code Mode
Every registered namespace got a node, also one whose tools the caller's rules deny or whose session has no desktop. Its name showed in Object.keys(tools), and a name it once had was answered with what to call instead, which told a caller denied the browser that it exists and what it has. A namespace is attached only where the caller's own tools made a node, so a removed name there is an unknown tool like any other.
2026-11-18 14:18:09 +10:00
Luke Parker
bdfa73c971 fix(browser): the install review says in sight where a copy came from and when it reads every website
A copy from another browser or a folder, which no store checked, was named only behind Details, and access to every website read as the pages you visit. Both are beside the verdict now, whatever the verdict is.
2026-11-18 14:14:40 +10:00
Luke Parker
4cda7e7072 fix(browser): Advanced can be closed during a visit that a settings search opened
The search's target stays set for the whole visit and kept opening the section over the person's own toggle. It opens the section as the page arrives, and the toggle wins after that.
2026-11-18 14:13:43 +10:00
Luke Parker
4b1ab719a0 fix(browser): main bounds where an extension popup opens, and the popup follows the toolbar's direction
The window's page top and anchor went to setBounds as sent: a top of 0 or below put a popup over the app's bars, and a number that was not finite reached Electron. Main now takes them as untrusted. They must be finite, the button counts as inside the content, and the popup never starts above the bottom edge of its button nor above the top of the tab's page view, which main knows itself while the page fills the page area. With a device viewport that view sits lower than the area, so there the window's number stays, above the same floor. In a right-to-left layout the button is at the left end of the bar and the popup's left edge goes on the button's.
2026-11-18 14:11:17 +10:00
Luke Parker
a06a85d138 fix(browser): the ways a binding ends are not unmapped failures
Idle eviction, a closed registration, a server without the browser and a missing session each logged a warning that no sentence exists for their code. The machine handles them as steps of the attachment.
2026-11-18 14:06:31 +10:00
Luke Parker
301c9c317c fix(browser): a site's status text neither chooses the error page nor shows on it
A 502 kept its reason phrase, which the error page searched for a Chromium code and showed as its small print, so a server could pick the insecure, offline or blocked page and put 60 characters of its own under the app's wording. The machine keeps the number alone, an HTTP status always reads as the generic page with that number, and only Chromium's own network error chooses among the pages.
2026-11-18 14:06:30 +10:00
Luke Parker
b5a917ed1b fix(browser): a kept show request holds only what was asked and is decided when it lands
A request that arrived before the strip or its tab's inventory kept the select, on-screen and visible answers of that moment and nothing ever cleared it, so it could land late in front of a person who had since come back, opened another tab, closed the pane or turned the setting off. It now keeps the binding, the tab and what was asked. When the missing state arrives the driver asks again with what is true then, through the path a live request takes, guard included. It is dropped when the person runs a command or selects a tab, closes the pane, the run ends, the tab closes, the session leaves the screen, the binding is superseded, or 5 s pass.
2026-11-18 14:04:28 +10:00
Luke Parker
02eca641d5 fix(file): a file an agent shows takes no input for a moment after it appears
A workspace file that is not a page opens in the file panel, selected over whatever the pane showed, with nothing between a press already on its way and the file's links and buttons.
2026-11-18 13:58:16 +10:00
Luke Parker
0d802601d4 fix(browser): a prompt belongs to its tab, and a tab an agent reveals takes no input until its guard ends
Each tab counts its prompts from 1 and the pane keyed a prompt by kind and number alone, so when an agent's show request changed the tab on screen, the permission bar stayed mounted with its input protection spent, and a press on its way to the person's Allow answered the other tab's request. The key now has the tab, an answer goes to the request its bar was drawn for, and while the reveal guard holds a tab its whole pane is inert, not only its page: bars, dialogs, toolbar and error views. The toolbar's menus close with the tab they opened on. The guard's delay starts when the person can see the tab, in a window that is not hidden.
2026-11-18 13:58:15 +10:00
Luke Parker
6e3e22af57 fix(browser): a tab an agent selects off screen or from a kept request waits behind the click guard
A show request for a session nobody was looking at selected its tab with no guard, and a request kept for the inventory or the strip landed with the answer it had when it was made, so a person who came back meanwhile found the page under their pointer at once. Every selection by an agent now issues the guard. Its delay still starts only when the pane shows the tab.
2026-11-18 13:58:14 +10:00
Luke Parker
d0e93ba52a fix(app): a launcher's tab replaces the New tab view again
Layout.open selected the opened tab over the New tab view through the person's own select, which keeps the view in the strip. A tab picked from a launcher then left its New tab behind, and the leftover kept the side region open after its last tab closed. Only an open of the tab its pane already selects needs help, since it changes no selection: the region now replaces the view for that case and leaves every other open to the selection change.
2026-11-18 13:40:45 +10:00
Adam
54b4698a72
feat(core): read Console artifacts (#64555) 2026-11-17 21:38:36 -06:00
Luke Parker
852d5ed0b3
fix(app): keep code block borders under the action fill (#64576) 2026-11-18 03:28:37 +00:00
Brendan Allan
cf9d13072c
feat(app): dispatch command shortcuts through @opentui/keymap (#64394) 2026-11-18 11:12:50 +08:00
Aiden Cline
1950fb8fe4
feat(core): durable video jobs (#64546) 2026-11-17 21:07:18 -06:00
Luke Parker
48de7615e0 Merge remote-tracking branch 'origin/dev' into persisted-browser
core/src/tool.ts: dev renamed Code Mode's location switch to full host globals (Bun.file, Bun.write, Bun.Glob, #64518); the catalog cache stays keyed by visible tool names, now with that switch. session-ui markdown.tsx: dev's wrap default and our app-link flag both reach updateBlock.
2026-11-18 13:05:19 +10:00
Luke Parker
26d252227b test(app): find the pane's page box by the preview, not by a removed marker 2026-11-18 13:00:18 +10:00
Luke Parker
59d6485e5f fix(browser): read the page's visibility from one computation again
The merge joined the device viewport's condition to the embed's visible prop inline, which compiles to a getter that makes a memo on every read from callbacks without an owner.
2026-11-18 12:44:11 +10:00
Luke Parker
ee844bfcf1 docs(browser): tell the agent to pass focus: true only when asked to show a page 2026-11-18 12:37:28 +10:00
Luke Parker
3dbf55a98a fix(app): a tab under the New tab view is not visible, and opening it shows it
Layout.state reported the pane's selected tab as visible while the + New tab view covered it, and Layout.open on that tab changed no selection, so the view stayed. A page the agent showed again stayed hidden behind it.
2026-11-18 12:35:09 +10:00
Luke Parker
5f078dba1e fix(browser): open an extension popup under the bars when a device viewport is set
The popup took its top from the page's own box, which a fixed device viewport insets inside the page area. It belongs to the Extensions button, so it now starts at the top of the page area.
2026-11-18 12:22:31 +10:00
Luke Parker
63bfe62c91
feat(app): add experimental tab groups to side tabs (#64407) 2026-11-17 20:07:32 -06:00
Luke Parker
792cf31f7f
fix(app): stop the timeline crashing when a row leaves mid-update (#64565) 2026-11-17 20:04:42 -06:00
Luke Parker
ee00d8c4f9 fix(browser): attach to a session before its first prompt, so the first step lists the browser tools
The attachment model loaded when the first session screen mounted, and a draft's session exists only once its first prompt is sent, so the server started the first step before the desktop attached. The model now loads when the app idles, and the send waits for the attachment through BuiltinPromptGate.
2026-11-18 11:57:30 +10:00
Luke Parker
62df07625a feat(app): a built-in can prepare a session before its prompt is sent
BuiltinPromptGate: the host waits for every gate, for at most two seconds, after the server created the session and before the prompt or command request goes out. The prompt already shows meanwhile.
2026-11-18 11:57:29 +10:00
Luke Parker
363217b2c4
feat(app): wrap long lines in timeline code blocks (#64545) 2026-11-17 19:56:02 -06:00
Aiden Cline
2f20ba65b7
feat(core): add Bun.file, Bun.write and Bun.Glob to Code Mode behind full_codemode (#64518) 2026-11-17 19:40:16 -06:00
Luke Parker
2a4f686a52 test(app): wait for the session route's own request before the unreachable timeout
The titlebar's route lookup asks for the same session metadata before the session route's chunk has loaded, so the held request arrived while the route had not yet started its 30 s wait; fast-forwarding then passed nothing. On a slow Windows runner the route chunk finished 0.3 s after the fast-forward. The transcript request is sent only by the route, in the step that starts the wait.
2026-11-18 11:27:54 +10:00
Luke Parker
60cf5369e7 chore(browser): satisfy the spacing rule where the merge joined the page's input handlers 2026-11-18 10:51:36 +10:00
Luke Parker
4a14d03164 Merge remote-tracking branch 'origin/dev' into persisted-browser
Conflicts with dev's device toolbar (#63819), text file tabs (#64463), the new icon set (#64466) and the Code Mode split (#64487, #64510):
- chromium.ts: dev's viewport writer, device emulation and per-page reports, with our retry-only detail; pointer commands run in the writer's queue inside our refusal and passkey wrapper; captures share the queue, and a fixed viewport is captured through the device's CDP clip while Auto keeps the fresh-redraw path.
- panel.tsx: dev's device toolbar, preview frame and spotlight, with our extensions menu, options menu (data-browser-popup), prompt-aware native view, error pages and two-view site popover; our page area box is declared again.
- embeds.tsx: our measure and place split and layout spine observers, with dev's scrollport clip in the shown test, the cover rect and the layout key.
- model.ts, pane.ts, ipc users, keys.ts (find previous stays claimed), i18n, fixtures and tests keep both sides.
- artifact-view.tsx: dev's fixed modes; desktop HTML stays source only.
- codemode: a removed tool's sentence is returned as dev's unknown-tool failure; core tool.ts keys the catalog cache by visible names and whether Node's path is on.
- icons: dev's set, our puzzle icon.
2026-11-18 10:50:48 +10:00
Luke Parker
31591e152f fix(browser): say in settings that a file the agent shows comes to the front 2026-11-18 10:27:13 +10:00
Luke Parker
bbdaf3d191 feat(browser): tabs.open and navigate take a workspace file in path, and browser.preview is removed
The server checks the path as it did for preview and sends the desktop the same preview action (navigate.path to move an existing tab). The permission check names the called operation and preview, so a deny of the old name still stops the path forms.
2026-11-18 10:27:12 +10:00
Luke Parker
56b712740e refactor(browser): parse a workspace address in one place for the server and the desktop 2026-11-18 10:27:02 +10:00
Luke Parker
76b568629b feat(codemode): a namespace can say what replaced a tool it no longer has 2026-11-18 10:27:01 +10:00
Aiden Cline
de291ab7b1
fix(ai): send the system prompt as a developer message on every Responses route (#64544) 2026-11-18 00:22:15 +00:00