Files
orca/src
Brennan Benson 821ab37369 fix(native-chat): open a New Chat's composer at once, before its host answers (#29358)
* WIP: establish local chat draft and first submission ownership

* WIP: retain first submission through preparation and settlement

* Keep new chat drafts local through their first submission

* fix(native-chat): release staged drafts and preserve explicit choices

* test(native-chat): keep distinct draft actions independent

* fix(native-chat): defer cross-window draft announcements

* Fix local chat draft settlement and recovery ownership

* Adopt committed draft presence after a refused allocation

* Simplify first-send recovery and preserve hosted send policy

* Remove launch prompt import cycle and tighten refusal tests

* Align draft storage contracts with typechecked callers

* Preserve definite create refusal feedback and issued recovery fixtures

* Revert the first-Send draft machinery, keeping the synchronous composer focus

The redesign opens the new chat's editor at the action and lets the ordinary at-rest create run in the background, so the local draft record, saved first submission, reserved first-Send sender and pre-session upload capability are no longer needed.

* fix(native-chat): open a New Chat's composer at once, before its host answers

The new chat's tab and composer waited for the host to admit the chat, so keys typed right after New Chat went to whatever had focus. A New Chat the user asked for now opens its chat tab immediately on the host it was routed to, with focus in the composer. Its ordinary launch asks the host in the background, the same probe it already ran before create, and the chat shows that launch's starting, failed and Retry states.

- A launch that carries a prompt still asks first, so a refusal hands the prompt to a terminal as before.
- A refused chat nobody typed in closes and its terminal opens in its place; a chat with typing keeps it.
- A paired host that would run the chat with more access than asked for gets no create; the chat's permission notice is the only one shown.
- A chat closed while its host was being asked issues no create.
- While the chat starts on a paired server, uploads wait and the model picker stays disabled until the server names what it seeds.

* Keep chat launch recovery and composer actions with their owners

* Clarify paired launch admission fixtures and recovery checks

* Apply chat attachment guidance at both paste entry points

* fix(native-chat): finish the immediate New Chat on top of the + menu's chat rows

- The + menu hands focus to the new chat's composer when it closes, instead of a frame later.
- A chat picked by name that its host refuses stays a chat and says why, including the WSL or SSH reason; it never becomes a terminal.
- A chat the user typed in before its host refused keeps its text, and the agent's terminal opens behind it rather than taking the screen; a paired server's refusal says a terminal opened.
- The paired permission check runs once, right before create, for every launch; the chat's own permission notice is the only message.
- A chat closed while its host was being asked shares the existing pre-create gate, so nothing is created.
- Session attachment notice copy lives with its only caller; tests that mirrored the implementation are trimmed.

* fix: preserve chat ownership through launch admission and fallback

* test: type launcher projects without an assertion

* fix: preserve matching refusal details in terminal completion

* fix: preserve fallback terminal placement and appearance

* test: preserve host launch failure notice during integration

* style: format native chat launch changes after integration

* fix: disable paired chat attachments until startup completes

* fix(menus): a closing menu no longer takes focus back from what its item opened

A New Chat chosen from the New Tab menu kept only the first typed key: the
menu stays mounted while it animates out, and Radix focuses its content when
the pointer leaves an item, so the remaining keys went to the closed menu.
Dropdown and context menu items now cancel that pointer focus while their
menu is closing. Trims three hunks back to main's form to stay in budget.

* fix(native-chat): host notices wrap instead of cutting off their instructions

The paired-permission notice now shows on a New Chat as soon as it opens, and
its "Update Orca on this host" instruction was cut off with an ellipsis and no
tooltip. Host notices now wrap like every other composer notice.
2026-10-20 12:39:25 -07:00
..