Repository navigation
fix(mobile): drop the green "connected" block from the device sheet - #1682
Merged
Merged
Conversation
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).
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.
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
Verification
Mobile-only change (no Rust crate touched), run in the checkout at
c552063a9:npx tsc --noEmit→ passnpx eslint src/components/ConnectionStatus.tsx src/screens/DesktopPicker.tsx src/screens/__tests__/DesktopPicker.test.ts src/screens/__tests__/SessionsScreen.test.ts→ passnpx jest --runInBand src/screens/__tests__/DesktopPicker.test.ts src/screens/__tests__/SessionsScreen.test.ts→ 2 suites, 94 tests passednpx jest --runInBand src/components/__tests__/ConnectionStatus.test.ts→ 1 suite, 19 tests passedBoth 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
76cb3bc58.