Skip to content

fix(machines): tell two Ovis servers on one PC apart by port when adding it - #4880

Merged
devswha merged 3 commits into
mainfrom
fix/own-ovis-choice-labels
Nov 27, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/own-ovis-choice-labels

Conversation

@devswha

@devswha devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner

What

Adding a PC over SSH where two Ovis servers run on herdr-core showed two identical buttons,
"Use Ovis on this PC (herdr-core)" and "Use Ovis on this PC (herdr-core) (2)". The maintainer hit
this adding a PC that runs both his own Ovis (port 7317) and the latest-main test app (port 7421):
nothing said which button was which, and the first one he picked answered "This socket uses an
independently managed web server of a newer version (v54); this app requires v53".

Now, when more than one Ovis is offered, each button names the loopback port it answers on, and one
that runs a newer release than this app adds "(update this app first)", so the choice that cannot
connect yet says so before it is clicked. A single Ovis keeps its plain label. The buttons wrap on a
phone instead of running off the card.

Why not tell a "test app" apart by name: nothing in a registration or identity says a server is a test
build, and guessing from its state folder is the kind of guess the server avoids. The port is what the
owner knows his servers by (Settings and tailscale serve show it).

HTTP contract (additive)

FoundOvis (in found_ovis of a setup job and a PC's record, shared/machines.ts) gains two
optional fields:

  • port?: number: the loopback port from that Ovis's own registration (validated 1-65535).
  • newer_than_app?: true: its bundle version is newer than this app's REMOTE_BUNDLE_VERSION (the
    same test independentBridge already words its error with).

Both are optional. A client that ignores them shows what it showed before, and a record saved
without them falls back to the old " (2)" numbering.

Screenshots (Korean, light; desktop 1280 and phone 390)

The fixture shows the after case with one Ovis on this app's release and one newer.

Before After
before desktop after desktop
before phone after phone

Design: the choice is told apart by what the user already knows the server by (its port), as Paseo and
T3 Code list local servers by host:port. No new control is added.

Validation

  • Reproduced the original screen with v0.5.9's server code in an isolated HOME and state folder, adding
    this PC over SSH: found_ovis held both servers, and picking each gave the v54 / v55 error.
  • bun test src/components/FoundHerdrChoices.test.tsx server/machine-core-choice.test.ts: pass.
  • bun run check fast: pass (typecheck, build, unit 29136 pass / 0 fail).
  • scripts/machine-dialog-regression.ts and scripts/machine-own-ovis-regression.ts (FoundHerdrChoices is shared by the dialog and the sidebar): pass locally with Chrome, not in the CI runner image.

On hold for the maintainer's look: UI change and HTTP contract addition.

…ing it

Each own-Ovis choice names its loopback port when more than one is offered, and one newer than this app says to update this app first. FoundOvis gains optional port and newer_than_app.
@devswha devswha added the hold Not merged until the owner says so label Nov 27, 2026
@devswha

devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

On hold: a UI change the maintainer has not seen yet (before/after screenshots in the description) and an additive HTTP contract change (two optional FoundOvis fields). Waiting for his word.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • When multiple Ovis servers are available on the same PC, connection options show each server’s port to help distinguish them.
    • If an Ovis server requires a newer app version, its connection option prompts you to update the app first.
    • Connection options are available with these updates in Japanese, Korean, and Simplified Chinese.

Ovis discovery entries now include valid ports and a flag for servers newer than the app. The choice UI uses this metadata to distinguish multiple servers and show an update notice. Japanese, Korean, and Simplified Chinese translations and rendering tests cover the updated labels.

Changes: Ovis choice discovery and labeling

Layer / File(s) Summary
Ovis discovery metadata
shared/machines.ts, server/machines.ts, server/machine-core-choice.test.ts
FoundOvis adds optional port and newer-release fields. Both discovery paths use foundOvis to include a valid port and mark newer bundles. The server test checks the discovered port.
Choice labels and presentation
src/components/FoundHerdrChoices.tsx, src/components/Machines.css, src/components/FoundHerdrChoices.test.tsx, src/lib/i18n/machines.*.ts, changelog.d/own-ovis-choice-port.md
When multiple Ovis servers are found, the choice UI shows available ports and numbers choices that share a port. It shows an update notice for newer servers. Styles, translations, rendering tests, and the changelog cover these labels.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • devswha/ovis issue 4807: Describes multiple Ovis instances on one PC with separate ports. This PR labels multiple discovered servers by port.

Possibly related PRs

  • devswha/ovis#3422: Adds the own-Ovis choice and discovery flow that supplies entries to the UI updated here.
  • devswha/ovis#3515: Changes when the setup offers own-Ovis entries in the chooser updated here.
  • devswha/ovis#4350: Keeps the chooser for multiple answering own-Ovis servers, where this PR changes the labels.
Merge Risk: Minimal · previous review 1e155

The change adds port labels to the Ovis choice buttons when a PC runs several servers, and it prompts an update when a server is newer than the app. Single-server behavior is unchanged. No merge-blocking risk was found in the changed code. The failing Integration tests check should be confirmed as unrelated before merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: when two Ovis servers run on one PC, the add-PC choices are told apart by loopback port. It matches the changeset (FoundOvis port field, labels in FoundHerdrChoices, a…
Description check Passed The description follows the repository template. It has a Change section that describes the problem, the resulting behavior, and the HTTP contract addition. It has a Validation section that lists the …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: when two Ovis servers run on one PC, the add-PC choices are told apart by loopback port. It matches the changeset (FoundOvis port field, labels in FoundHerdrChoices, and the server-side discovery helper), so it is specific and accurate.

Full details: Description check

Explanation

The description follows the repository template. It has a Change section that describes the problem, the resulting behavior, and the HTTP contract addition. It has a Validation section that lists the commands run, their results, and the regression scripts run locally. The template asks for a linked issue for features; this is a fix, and the description does not link an issue. It also does not mention the changelog entry, although the diff adds changelog.d/own-ovis-choice-port.md. The description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 92c8870 and 1e155d9.

Files selected for processing: 10

  • changelog.d/own-ovis-choice-port.md
  • server/machine-core-choice.test.ts
  • server/machines.ts
  • shared/machines.ts
  • src/components/FoundHerdrChoices.test.tsx
  • src/components/FoundHerdrChoices.tsx
  • src/components/Machines.css
  • src/lib/i18n/machines.ja.ts
  • src/lib/i18n/machines.ko.ts
  • src/lib/i18n/machines.zh.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@devswha

devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Maintainer approved the screens and the added fields in the Dori session 2026-11-27.

@devswha devswha removed the hold Not merged until the owner says so label Nov 27, 2026
@devswha
devswha merged commit b7c0b04 into main Nov 27, 2026
21 checks passed
@devswha

devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head ff42ff9eb. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main had moved since the checks of c80d15e67: pr-merge --update merged it in (bb3886aae), and every required check was green at this head.

It waited in the merge queue behind #3762, whose change overlaps it, before it was updated.

Contract fields added (port, newer_than_app); maintainer approved in the Dori session 2026-11-27

@devswha
devswha deleted the fix/own-ovis-choice-labels branch November 27, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant