Skip to content

fix(mobile): name the dictation's own computer in its update line - #52835

Merged
AmoabaKelvin merged 1 commit into
mainfrom
mobile-dictation-update-line-host
Nov 30, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
mobile-dictation-update-line-host

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

While you dictate, the phone can say a computer needs a newer Orca. That line named whichever computer you were looking at, not the one doing the dictation, so moving to another computer mid-dictation named the wrong one.

Files Added Deleted Net
Test 0 0 0 0
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7

What Changed

Before:

  • Which computer: the dictation host sits in the shared host layout, which stays mounted when the route moves to another computer, and it outlives the session screen that started dictation. Its "Needs a newer Orca on X" line read hostId from the current route. A dictation on computer A, refused while the route showed computer B, named B and offered B's update.
  • Which gates: the notice also read the route's protocol gates even when naming another computer, so its "Update" or "How to update" label could come from the wrong computer.

Now:

  • Dictation: the dictation owner records its hostId, and the host's line names that computer. The session screen's own line passes its hostId too.
  • Gates: useHostUpdateNoticeTarget uses the route's gates only when the target is the route's own computer. For any other computer it says "How to update", and Edit computer still shows the steps.

Why

A line that names the wrong computer sends the user to update a machine that isn't the problem.

Linked Issue

Follow-up to the update-notice migration (#52368, #52373). No issue.

Visual Proof

N/A: same line and action; only which computer it names changes, and only when the route moved mid-dictation.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
  • Every added test fails without this change and avoids the test anti-patterns

How it was checked:

  • Read the provider's mount point: HostGroupLayout isn't keyed by host and reads the global hostId, so it stays mounted across a computer change.
  • The owner is set from the starting screen's hostId.
  • pnpm check:changed and mobile tsc pass.
  • No test is committed: this is wiring.

Performance

None, because the hook now keys on the owner's host id, which changes only when a dictation starts; the gates check is two string comparisons.

Risk

Level: Low

What could go wrong: notices that pass another computer's id inside a host route now say "How to update" instead of "Update". Edit computer still offers the update when that computer supports it. A plain revert undoes this.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Mobile dictation now carries its host ID in the owner data and passes it to host startup and update-toast lookup. The notice target uses route protocol gates only when no host ID is supplied or the supplied ID matches the route host ID.

Merge Risk: Minimal · up to f2c0b

This change makes the dictation update notice name the computer that owns the dictation. It is small wiring with no established defect, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the dictation's own computer in its update line. This matches the main change: the dictation owner records its hostId and the host's update notice names that computer. The title uses t…
Description check Passed The description follows the repository template. It has ELI5, What Changed (before/after and mechanism), Why, Linked Issue, Visual Proof marked N/A with a reason, Testing, Performance, Risk with level…
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 dictation's own computer in its update line. This matches the main change: the dictation owner records its hostId and the host's update notice names that computer. The title uses the "fix(mobile):" convention and is specific enough for a teammate scanning history. It does not cover the gates change, which is expected.

Full details: Description check

Explanation

The description follows the repository template. It has ELI5, What Changed (before/after and mechanism), Why, Linked Issue, Visual Proof marked N/A with a reason, Testing, Performance, Risk with level, and Checklist. The Performance line is complete. The Linked Issue section cites a follow-up to #52368 and #52373 but says 'No issue', which conflicts with the template requirement that outside contributors link an issue. The author appears to be a maintainer, so this is a minor gap. The Testing section says tests are not committed and gives a reason. The AI Disclosure section is absent, which is acceptable for internal contributors.

Resolution

Optionally confirm the author is a stablyai org member so the 'No issue' linked-issue entry is acceptable. Optionally add the Level line detail to Risk. Confirm the pnpm lint, typecheck, test, and build checks were run, because the checklist ticks them but the testing notes only cite check:changed and tsc.

  • 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4072386e-96a5-4287-a478-db92de86b4ca
Commits

Reviewing files that changed from the base of the PR and between 8ee3e71 and f2c0ba5.

Files selected for processing: 4

  • mobile/src/dictation/mobile-dictation-host-context.ts
  • mobile/src/dictation/mobile-dictation-host.tsx
  • mobile/src/host-update-notice/HostUpdateNotice.tsx
  • mobile/src/session/use-mobile-screen-dictation.ts

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

@AmoabaKelvin
AmoabaKelvin merged commit be1c49c into main Nov 30, 2026
27 checks passed
@AmoabaKelvin
AmoabaKelvin deleted the mobile-dictation-update-line-host branch November 30, 2026 01:52
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