Repository navigation
fix(desktop): report a failed remote connect once, on the machine's row - #1335
Merged
Merged
Conversation
`bg-<family>-soft text-<family>` is how the app draws chips, callouts and error rows (47 call sites), but the palette floors only checked each ink against `surface`. On its own tint the pair measured 3.43:1 (dracula dark danger) to 4.49:1 (nord light warning) in 49 of 140 renditions, so a third of the themes shipped small text below AA wherever it mattered most. Each ink now clears 4.5:1 on its soft fill, with hue and saturation fixed: the ink moved by at most 4% HLS lightness (e.g. futureos danger #dc2626 -> #d92323), and where that was not enough the tint moved instead (its own value, never an identity colour; e.g. dracula's danger-soft #5d303a -> #402128). Floors cover the five soft pairs so the contract cannot drift back, and the regenerated `[data-palette]` rules plus the `@theme` mirror carry the values. Three call sites painted a semantic ink straight on a dim shared surface, which no palette change can fix because that surface is shared by every family. They now sit on the family's own soft fill, which is the pair the contract covers: the peers list's held/error lines, the rail's "show more", and the settings dialog's test-build hint. A rendered sweep of 42 desktop scenes reports no semantic ink below AA; the only remaining sub-AA text is `ink-muted`, which the palette holds at a 3:1 de-emphasis floor on purpose.
`hitSlop` is how a 26px chip and a 20px step row reach the 44pt platform minimum, but `react-native-web` does not implement it, so neither a capture nor the harness's `TOUCH` probe can see the result — the previous assertions compared each component against a formula duplicated at the call site, which cannot catch a wrong drawn height. The two heights and the slop derived from them now live in one module with no imports beyond the layout tokens, `slopToTouchTarget` derives any folded control's slop from `layout.touchTarget` (rounding up, so an odd gap cannot land at 43), and one test holds both rows to the floor. The screenshot guide says why a capture cannot judge this and what to do instead of widening the drawn box. The dark-window theme picker also gets its own `ready`: its assertion needs the `dark` class that `lib/theme.ts` applies after reading the pinned preference, so readiness now includes it instead of relying on a 1600ms wait that a cold bundle loses. The assertion still fails in a light window (checked by booting one). Verified: mobile tsc + eslint clean, 53 jest suites / 800 tests pass, and `settings-themes-dark` captures green with its `ready` firing at 1.5s.
`scenarios.d/` only exists once someone writes a fragment, so both guides named a glob that `make check-docs` resolves in a clean checkout and failed on. The directory now carries a `.gitkeep`, the guides point at the directory, and the gitignored audit fragments are explained where the mechanism is described.
A connect that could not reach the other computer rejected *and* landed in `peer.error` on the re-read, so the section line under the pairing form and the row under the machine printed the same sentence one above the other. The row is where it belongs — it sits with the machine the sentence is about — so the section line steps aside while a row already says it, and a list-read failure (which has no row) still shows there.
huichen
enabled auto-merge (squash)
October 24, 2026 05:17
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 and why
A failed remote connect was reported twice: the page caught the rejection and
showed it under the pairing form, while the re-read wrote the same sentence into
peer.errorand the machine's own row showed it again. The row is the rightplace — it sits with the machine the sentence is about — so the section line now
steps aside when a row already says it. A list-read failure, which has no row,
still shows on the section line.
The branch also carries three commits whose content already landed on
mainthrough #1334 (theme inks, the mobile folded-row touch target and its docs); the
effective diff of this PR against
mainis the desktop change below.Commits
mainvia fix(theme,mobile): hold semantic inks to AA on their own soft fill #1334)mainvia fix(theme,mobile): hold semantic inks to AA on their own soft fill #1334)mainvia fix(theme,mobile): hold semantic inks to AA on their own soft fill #1334)Verification
git diff --stat origin/main...origin/dev-huichen→ 2 files, 37 insertions, 1 deletion (RemotePeersView.tsx,RemotePeersView.test.tsx)npm run lintindesktop/→ eslint 0 errors (one pre-existingjsdoc/no-multi-asteriskswarning in the untouchedrecentOrder.ts),tsc --noEmitcleannpx vitest run src/features/remote-peer/RemotePeersView.test.tsx→ 37 passed, including the new "shows a failed connect once, on the machine's own row"Notes
The behaviour change is presentational only: the red line under the pairing form
is suppressed while a peer row already carries the same message.