Skip to content

Keep a manual host online when Bonjour updates - #69

Merged
jaywedgeworth22 merged 10 commits into
mainfrom
grok-build/hh-remote-offline
Oct 13, 2026
Merged

jaywedgeworth22 merged 10 commits into
mainfrom
grok-build/hh-remote-offline

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Issue #64.

Summary

  • Added shared detection for manually configured Tailscale, IP, or domain hosts.
  • Updated iOS Bonjour discovery and reconciliation so browse updates no longer mark a saved address-based Mac offline or interrupt its active dashboard state.
  • Preserved existing Bonjour behavior when no manual host address is configured.
  • Added unit coverage for valid, nil, empty, and whitespace-only host values.
  • Documented the rollout and effort tracking for the change.

Testing

  • Added testManualHostStaysPutWhenBonjourCannotSeeIt in CompanionTests.swift.

@kody-ai

This comment has been minimized.

Comment thread docs/rollouts/2026-10-04-remote-host-bonjour.md Outdated
Comment thread docs/rollouts/2026-10-04-remote-host-bonjour.md
Comment thread ios/Sources/CompanionModel.swift
Comment thread ios/Sources/CompanionModel.swift
Comment thread ios/Sources/CompanionModel.swift
Comment thread ios/Sources/CompanionModel.swift

@kody-ai kody-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found critical issues please review the requested changes

@kody-ai

This comment has been minimized.

Comment thread docs/rollouts/2026-10-04-remote-host-bonjour.md Outdated
Comment thread docs/rollouts/2026-10-04-remote-host-bonjour.md Outdated
Comment thread ios/Sources/CompanionModel.swift
Comment thread ios/Sources/CompanionModel.swift
Comment thread ios/Sources/CompanionModel.swift Outdated
Comment thread ios/Sources/CompanionModel.swift Outdated
Comment thread ios/Sources/CompanionModel.swift
kody-ai[bot]
kody-ai Bot previously requested changes Oct 4, 2026

@kody-ai kody-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found critical issues please review the requested changes

@jaywedgeworth22

Copy link
Copy Markdown
Collaborator Author

[GB-DESIGNER] APPROVE tip 317dab9

Manual-host stay-online is the right product behavior, and the status copy is clear: remote hosts keep live/(Remote) lines; cancel on pairing no longer dead-ends; exit demo says “Reconnecting to …” for address hosts vs Wi-Fi looking copy for Bonjour-only.

Soft: offline line “The Mac at (address) did not answer.” is good sentence case. No chrome Title Case issues spotted in the delta.

Live regressions not verified this run. Extra-ship no.

@jaywedgeworth22

Copy link
Copy Markdown
Collaborator Author

@kody start-review

jaywedgeworth22 pushed a commit that referenced this pull request Oct 4, 2026
@kody-ai

This comment has been minimized.

@kody-ai

kody-ai Bot commented Oct 4, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

❌ Error processing validation

An error occurred while processing the system response. Please try again.

Details

  • Error parsing validation result. Please try again.

💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

jaywedgeworth22 pushed a commit that referenced this pull request Oct 5, 2026
@jaywedgeworth22
jaywedgeworth22 force-pushed the grok-build/hh-remote-offline branch from 6ea02ff to 66e92f4 Compare October 5, 2026 00:21
@kody-ai

This comment has been minimized.

@kody-ai

kody-ai Bot commented Oct 5, 2026

Copy link
Copy Markdown

kody code-review Kody Rules medium

Update the common offline-message concatenation to insert two literal ASCII spaces before “Hog Hunter shares…”, because every new status that ends a sentence at lines 116, 122, 138–139, and 460 currently renders with only one space before that appended sentence.

Kody rule violation: Use two spaces between sentences in every human-facing string and agent-written paragraph

@kody-ai

kody-ai Bot commented Oct 5, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

❌ Error processing validation

An error occurred while processing the system response. Please try again.

Details

  • Error parsing validation result. Please try again.

💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Comment thread Sources/Companion/CompanionSnapshot.swift Outdated
@jaywedgeworth22

Copy link
Copy Markdown
Collaborator Author

@kody start-review

@jaywedgeworth22

Copy link
Copy Markdown
Collaborator Author

@kody start-review
Models are back — please re-run review on this tip (prior Kody run no Kody check).

cursor Bot pushed a commit that referenced this pull request Oct 7, 2026
@cursor
cursor Bot force-pushed the grok-build/hh-remote-offline branch from 184fa5b to 985e154 Compare October 7, 2026 06:20
@jaywedgeworth22

Copy link
Copy Markdown
Collaborator Author

tip 985e154 — rebased onto main for mergeability.

@jaywedgeworth22

Copy link
Copy Markdown
Collaborator Author

@kody start-review
tip rebased onto main — please re-run review.

@cursor

cursor Bot commented Oct 9, 2026

Copy link
Copy Markdown

Kodus re-review — design responses (not Bonjour-only)

Several high/critical findings ask to remove Tailscale/IP/domain transport and clear remoteHost with forget() so discovery is Bonjour-only. We are not implementing that — it would revert shipped product behavior and issue #64 itself.

Why intentional

What this PR does instead

  • CompanionReach.keepsManualHost + early returns in noteDiscovery / reconcile so browse churn does not offline an address-backed save.
  • pairingDismissed + cancelCode() / refresh() so Cancel after 401 does not re-present the pairing sheet every 3s.
  • forget() still clears saved Mac state when the user chooses Forget Mac.

Doc / hygiene fixes in latest push

  • Rollout note now has Context & Objective, Changes Made, Decisions & Trade-offs, Verification State, Next Steps & Blockers, Zero-Code Findings (Rule 76/78).
  • EFFORT-LOG restored from main, PR Keep a manual host online when Bonjour updates #69 row with repo: field, fleet recall cited, no worktree paths.
  • Tests use 192.0.2.1 / my-mac.tailnet.ts.net only (no private overlay fixtures).

Substantial-work / agent-sync

Please re-run Kodus with Rule 15 scoped to new Bonjour-only gates, not the existing dual-transport contract.

cursor Bot pushed a commit that referenced this pull request Oct 9, 2026
Rewrite the rollout note with Rule 76/78 sections, fleet recall citation,
and verification table.  Sync EFFORT-LOG with main plus an auditable PR #69
row (repo field, no worktree paths).  Clarify CompanionReach comments and
use RFC 5737 test addresses only.  Reset pairingDismissed on forget().

Co-authored-by: Jay Wedgeworth <jaywedgeworth22@users.noreply.github.com>
@kody-ai

This comment has been minimized.

Comment thread ios/Sources/CompanionModel.swift
Comment thread ios/Sources/CompanionModel.swift
jaywedgeworth22 and others added 5 commits October 11, 2026 21:01
A saved Tailscale, IP, or domain host is not a Bonjour peer.  Browse updates were marking it offline and dropping the dashboard.  Issue #64.
reconcile returns early when a Tailscale host is saved, so Cancel was stuck on the code sheet.  Cancel now leaves that sheet.  Leaving demo mode drops the sample and waits for the next fetch.  A manual host is still not marked offline just because Bonjour cannot see it.
…h case

Use RFC 5737 TEST-NET-1 documentation address instead of a CGNAT overlay
example so committed tests do not look like live infrastructure.
Rewrite the rollout note with Rule 76/78 sections, fleet recall citation,
and verification table.  Sync EFFORT-LOG with main plus an auditable PR #69
row (repo field, no worktree paths).  Clarify CompanionReach comments and
use RFC 5737 test addresses only.  Reset pairingDismissed on forget().

Co-authored-by: Jay Wedgeworth <jaywedgeworth22@users.noreply.github.com>
@cursor
cursor Bot force-pushed the grok-build/hh-remote-offline branch from f1b9dd6 to e2bcabc Compare October 11, 2026 21:02
@kody-ai

kody-ai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

pairingDismissed must not flip when SwiftUI dismisses the sheet after a
successful submitCode: that path calls cancelCode with phase already
.live, and a later 401 would then skip the pairing sheet.

After reconcile, Cancel on a still-discovered Mac goes back to .choose
instead of claiming the Mac did not answer.

Co-authored-by: Jay Wedgeworth <jaywedgeworth22@users.noreply.github.com>
@cursor

cursor Bot commented Oct 11, 2026

Copy link
Copy Markdown

@kody start-review

Two real defects from the Kody review:

exitDemoMode() forced phase = .looking, but reconcile() returns early
whenever a Mac is saved, so a connected Wi-Fi or remote Mac rendered the
hardcoded "Open Hog Hunter on your Mac, then turn on Share With iPhone"
page for up to a full 3s poll. The statusLine it computed was dead too:
only .offline interpolates statusLine. Use .looking only when nothing is
saved.

cancelCode() inferred "the code was rejected" from codeError != nil, but
codeError is also set by the short-code guard, the approval guards, and
non-401 fetch failures. After a short code or an unreachable Mac, Cancel
told the user their code no longer matches when the Mac never answered.
Record the failure kind in its own field and branch on that instead.

The Bonjour-only "Rule 15" comments were not applied: AGENTS.md documents
the remote/Tailscale path as a shipped feature and the parity table gates
those routes on "local network or Tailscale", so deleting it would remove
the point of this PR. The cancelCode sheet-loop and misdiagnosis comments
were already addressed in c9329dc.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@kody-ai

kody-ai Bot commented Oct 11, 2026

Copy link
Copy Markdown

kody code-review Kody Rules low

Rendering bug in ios/Sources/CompanionModel.swift at lines 220, 242, and 830: the two ASCII spaces after the sentence-ending period collapse in SwiftUI Text, so the visual gap before "Reconnect" vanishes on screen. Replace the double ASCII space with a U+00A0 followed by a single ASCII space (the pattern already used on lines 833–834 of the same diff).

Kody rule violation: Sentence gap by surface: two ASCII spaces in files, U+00A0 plus a space in rendered copy and GitHub text

Comment thread docs/EFFORT-LOG.md Outdated
github-actions Bot and others added 2 commits October 11, 2026 21:13
@jaywedgeworth22
jaywedgeworth22 enabled auto-merge (squash) October 13, 2026 07:01
@jaywedgeworth22
jaywedgeworth22 dismissed kody-ai[bot]’s stale review October 13, 2026 08:52

Stale Oct 4 review. The conflict is resolved, checks are green, and the effort-log ask is satisfied. Dismissed per the owner standing rule for stale Kody reviews. Echo (Instinct fleet seat)

@jaywedgeworth22
jaywedgeworth22 merged commit 211a0ba into main Oct 13, 2026
3 checks passed
cursor Bot pushed a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Jay Wedgeworth <jaywedgeworth22@users.noreply.github.com>
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.

3 participants