Repository navigation
Open a pane's terminal first, chat on request - #25
Merged
Merged
Conversation
Agent panes opened in the chat view the first time they were selected, and a shell pane flipped to chat once an agent started in it. A pane seen for the first time now opens its terminal whatever runs in it; the lens the user picks is still remembered per pane. The chat QA script set no view and relied on the old default, so it now asks for the chat lens itself. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
devswha
added a commit
that referenced
this pull request
Nov 21, 2026
…eaves the relay tab its sign-in buttons alone Owner #25 (packaged Mac app, preview.19): after a sign-out and sign-in the relay tab showed 'Add from account', 'Sign in to this PC's account.' and the revoke-every-device paragraph: the window was signed in to another account than the one the PC is in (the account service makes a new account for a way in the PC's account does not have, src/accounts.ts accountFor), so #11's close never fired. Such a sign-in is no sign-in to this PC: the tab stays the sign-in buttons (keyed by the account, so they come back) and the phone's QR / pairing code, with no prompt, no line and no paragraph; a sign-in to the PC's account then closes onto the main screen as before. The QR part's notice after a scan still names another account.
devswha
added a commit
that referenced
this pull request
Nov 23, 2026
…#4510) ## What changed A sign-in on **Settings → Devices and PCs → Add a connection → Ovis relay** to the account this PC is already in (with its relay on) no longer closes Settings. The Add a connection sheet still closes, since nothing is left to add there, and Settings stays on Devices and PCs. That page now shows the account and its PCs. Only a sheet that the setup checklist's **Connect your phone** opened still goes on to the main screen after that sign-in, because that flow started from the main screen. The decision is `closedBySignIn(home, asked)` in `ConnectPhoneDialog.tsx`. `DevicesPage` passes it `connectAsked` (set only by the setup checklist's `askAddConnection`, cleared by the page's own Add a connection button). ## Why The owner tested the Mac app preview (0.5.10-preview.22). He opened Settings, pressed Continue with Google, finished in the system browser, and came back to a closed Settings, so he had to open it again to see the account and its PCs. Cause: `DevicesPage` closed Settings on purpose (`onHome` → `onClose`) for any relay-tab sign-in that `RelayTab` reports as `home` (an account this PC is already in, relay on). #4435 added that for owner #25 ("sign in again → straight to the main screen without the connect dialog"). Nothing reloads or navigates the page. The desktop app's loopback sign-in (`desktop.ts`), a PC's own window (`ownWindow.ts`) and the link page's code (`deviceSignIn.ts`) all end in the same `onSignedIn(home)`. The fix keeps #25's "no connect dialog" and drops only the Settings close. ## Each way in and out of the account in Settings | Path | Before | After | |---|---|---| | Relay tab: Google, Apple or GitHub, account this PC is in, relay on | Settings closed | **fixed**: sheet closes, Settings stays on Devices and PCs | | Same, sheet opened by the setup checklist's Connect your phone | Settings closed | unchanged: goes to the main screen | | Relay tab: sign-in to another account, PC in no account, or relay off | stayed (tab shows Add this PC or the buttons) | unchanged | | Relay tab: sign-in failed, refused or cancelled | stayed (the error shows on the tab) | unchanged | | Account card's own provider buttons (relay not offered) | stayed | unchanged | | Sign in again (Manage account), add a way to sign in | stayed | unchanged | | Sign out (and its unsent-block question) | stayed | unchanged | E-mail sign-in is not offered (`ACCOUNT_PROVIDERS` is GitHub, Google and Apple). The phone app and the hosted page do not reach this code: there `accountServiceHere()` is null, so the sheet gets no `account` and draws no relay-tab sign-in. Their behaviour is unchanged. No change to the sign-in itself, to what the account service is asked, or to any HTTP/WS contract. ## Validation - Red first: `closedBySignIn` in `src/components/ConnectPhoneDialog.test.tsx` failed as not a function. The `DevicesPage` wiring check in `src/components/AccountPcRows.test.tsx` failed on the old `if (home) { setConnecting(false); onHome(); }`. Both pass now, along with `src/components/RelaySignIn.test.tsx` (the owner #25 `home` signal itself is unchanged). - `bun run check fast`: green. - Browser regressions in the CI runner image (`herdr-ci-runner:local`, fresh clone of this branch), all exit 0: `settings-pages-demo-regression`, `settings-palette-search-demo-regression`, `settings-rows-demo-regression`, `settings-segmented-demo-regression`, `cliproxy-settings-regression`, `setup-row-demo-regression`, `connect-dialog-scroll-regression`, `relay-first-link-regression`, `settings-tabs-regression`, `settings-unload-regression`, and `ui-contexts-regression`. That last one runs `push-settings-regression`'s checks, which do nothing when that file runs alone. - Second commit: CI's first run failed `relay-account-pcs-regression`, which encoded the old behaviour by waiting for Settings to detach after a link-page sign-in to this PC's account. It now waits for Add a connection to close and for Settings to stay on Devices and PCs, signed in with GitHub and listing the account's PC "Away", which a signed-out Settings does not list. It passes in the CI runner image (exit 0, through `dori heavy`). `bun run check fast` is green again. `RelaySignIn.test.tsx` titles now call `home` "nothing is left to add". No other browser script waits for Settings to close after a sign-in: every other `.settings-dialog` detach follows Escape, Close, a tap outside or "Open terminal". - Skipped: a real sign-in in the packaged Mac app (needs a notarized preview build on eamac). ## Known limits - No browser script drives the setup checklist's sign-in that still goes to the main screen: that case has only the `closedBySignIn` unit test. - The only `connectAsked` left stale is a setup-checklist sheet that is closed and then reopened by the account QR watch. A `home` sign-in there still goes to the main screen, as the setup flow does. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus <[email protected]>
devswha
added a commit
that referenced
this pull request
Nov 27, 2026
…ount (#4882) ## What Signed in to another Ovis account than the one this PC is in, the relay tab showed the same sign-in buttons again with no word on why, so a finished sign-in looked like it did nothing (seen on a Mac added under GitHub and signed in with Google: each way of signing in is its own account until linked). The tab now keeps the owner #25 layout (sign-in buttons and the phone's QR code, no prompt) and adds one line above the buttons: - the PC knows how its owner signed in: "This PC is in another account. Sign in with GitHub." - it does not (a PC added by an older Ovis, `ovis add`): "This PC is in another account. Sign in the way you used when you first added this PC." ## HTTP contract (additive only) - `POST /api/account/relay-account` takes an optional `provider` (`github` | `google` | `apple`). The PC keeps it in `relay/account.json` beside the account. Any other value counts as none; a naming without one (older apps, `ovis add`, server-side one-press) keeps the provider said before for the same account, and naming another account drops it. - `GET /api/account/status` adds `account_provider` while the PC is in the account that naming was for. Older apps ignore it; a new app talking to an older PC gets no field and shows the generic line. - The page's "Add this PC" and one-press paths send the stored sign-in's provider. No account service (ovis-sh/account) change. docs/account.md documents both fields. ## Design reference No other app's screen is followed here: the maintainer's approved mockup keeps the tab as it is and adds one inline line in the tab's existing `settings-hint` style, the smallest change that says why. The provider buttons stay as they are (no highlight). ## Screenshots (light, Korean UI) | | Desktop 1280 | Phone 390 | |---|---|---| | Before |  |  | | After (PC knows the way) |  |  | | After (PC does not know) |  |  | Rendered from a fixture of `RelayTab` against main and this branch with a stubbed PC and account service (no live session). ## Tests - `ConnectPhoneDialog.test.tsx`: the owner #25 case now shows the generic line; a new case shows "Sign in with GitHub." for `account_provider: "github"` and the generic line for an unknown value; the PC's own account shows no line. - `account.contract.test.ts`: `relay-account` with a provider shows in status; a naming without one, or with an unknown value, keeps it; another provider replaces it. - `bun run check fast`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before this PR, a pane selected for the first time opened in Chat if an agent ran in it. A shell pane also flipped to Chat as soon as an agent started in it, because the view effect re-ran on
selectedAgent. Now a pane seen for the first time opens its Terminal, whatever runs in it.herdr-web-ui:view:<pane>). Choose Chat once and that pane keeps opening in chat.storedViewdrops itshasAgentparameter, and the effect no longer depends onselectedAgent, so an agent starting doesn't switch the view.scripts/chat-browser-qa.tsset no view and relied on the old default. It now asks for the chat lens itself, asui-regression.tsalready does.Testing
bun run typecheckpasses,bun testpasses 296/296,bun run test:uipasses 7/7, andscripts/chat-browser-qa.tspasses 5/5.🤖 Generated with Claude Code