fix(next): surface harness auth before sending

Closed
TE
7d ago
+363-117

Problem

A harness can be signed out or have an expired account while the composer still shows its model as selectable. The first prompt then discovers auth failure too late.

Leo's request:

"we also want to be having that modal picker situation, like be able to surface, say, like, Oh, you gotta re-authenticate. You gotta log in again on the modal picker before the user even sends a prompt. You know, some sort of thing that raises."

Change

  • Show the existing _acpmux/harness/health result in the selected harness row and on the closed model control before sending.
  • Offer Log In beside the closed control and inside the picker without sending a turn. Empty or whitespace-only login commands produce no action.
  • Keep signed-out models unavailable for fresh sessions. For an established session, machine-wide health is a nonblocking login offer: it may be cached or describe different credentials from the session's account/route. Model and provider selections remain usable in the full picker and both compact layouts.

The gallery includes the normal signed-in picker and the signed-out selected-harness state.

Validation

Head: bf126f5e8dadea7c57d5074d15f4b24e99ca188a.

Final verification run 40638222418 passed at bf126f5e8dadea7c57d5074d15f4b24e99ca188a: 10 tests passed, 0 failed, 43 assertions across the two focused signed-out suites; full webviews web lint (including formatting, source checks, lint and typecheck) passed. The receipt confirms source and post-check head both equal the PR head, with exit code 0. Comparison base: 0c8336391b32df85bcdd7db7eac2f3f0f82a54d8.

Before / after

Synthetic Chromium captures from run 40645379232, using the same fixture on base 0c8336391b32df85bcdd7db7eac2f3f0f82a54d8 and head bf126f5e8dadea7c57d5074d15f4b24e99ca188a. The closed control adds “Signed out · Log In” beside the model name. The open popover is otherwise unchanged.

StateBeforeAfter
Closed, lightBefore closed lightAfter closed light
Closed, darkBefore closed darkAfter closed dark
Open, lightBefore open lightAfter open light
Open, darkBefore open darkAfter open dark

Changelog

Fixed: show harness sign-in status and login actions before sending a prompt.

Agent session: agent session