Skip to content

fix(mobile): drop the green "connected" block from the device sheet - #1682

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Nov 24, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

What this does

The mobile desktop picker opened with a green "Connected / the phone is connected to the desktop" block above a list in which every row already carries that same dot and that same word, under a trigger whose dot is already green — the one sentence a reader opens the sheet to get past.

The block is a fault report now, drawn only when it names something the rows cannot: a machine that is down, a machine held by another device, or nothing answering at all. When the set is green end to end the sheet is a title and then the machines, and each row carries its own state line — which is what the single-machine case always needed, since the block used to be the only place that state was written there.

Commits

  • fix(mobile): drop the green "connected" block from the device sheet

Verification

Mobile-only change (no Rust crate touched), run in the checkout at c552063a9:

  • npx tsc --noEmit → pass
  • npx eslint src/components/ConnectionStatus.tsx src/screens/DesktopPicker.tsx src/screens/__tests__/DesktopPicker.test.ts src/screens/__tests__/SessionsScreen.test.ts → pass
  • npx jest --runInBand src/screens/__tests__/DesktopPicker.test.ts src/screens/__tests__/SessionsScreen.test.ts → 2 suites, 94 tests passed
  • npx jest --runInBand src/components/__tests__/ConnectionStatus.test.ts → 1 suite, 19 tests passed

Both new assertions (the block is absent for a green set; the row takes over the state line when the block is not drawn) fail against the previous code.

User-visible changes

  • Mobile desktop picker sheet: before, it always opened with a green "connected" status block above the machine rows, even when every machine was connected; after, that block is drawn only when some machine is not up (down, held by another device, or not answering), the sheet then being a title followed by the machines, and when it is hidden each row shows its own state. Rollback: commit 76cb3bc58.

The sheet opened with "已连接 / 手机已连接到桌面端" above a list in which every
row already carried that dot and that word, under a trigger whose dot was
green — the sentence a reader opens the sheet to get past. It is a fault
report now, drawn only when it names something the rows cannot: a machine
down, held by another device, or nothing answering at all.

With one machine the block was also the only place its state was written, so
the row takes over that line whenever the block is not drawn; with several it
already did.

The two screens' own tests move with it, and the picker's green case asserts
the block is absent instead of present (both new assertions fail against the
old code).
@huichen
huichen enabled auto-merge (squash) November 24, 2026 07:18
@huichen
huichen merged commit 6784eda into main Nov 24, 2026
10 checks passed
@huichen
huichen deleted the pr/huichen branch November 24, 2026 07:34
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