Skip to content

fix(mobile): drop the highlight a question jump lands on - #827

Merged
huichen merged 3 commits into
mainfrom
fix/qn-landed-highlight
Sep 25, 2026
Merged

huichen merged 3 commits into
mainfrom
fix/qn-landed-highlight

Conversation

@huichen

@huichen huichen commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

What

Pressing ↑/↓ in the mobile transcript marked the row it landed on with a pale accentSoft band for 1.4 s. The jump already aligns the question at the top of the viewport, so the band was redundant — and on a question bubble it read as a background behind the question rather than as a locator.

Changes

  • useQuestionNav: the hook no longer exposes landedId; LANDED_MS, the landed-row timer and the itemsRef that only fed them are gone.
  • ChatScreen: rows render without the conditional band style; the landedRow style is deleted.
  • scripts/screenshots/scenarios.json (qn-align-check): the landed row is now located by the question bubble itself (accent-filled, no vertical inset above it) instead of by the band.

Verification

Rendered the real interface through the screenshot harness (serve-mobile + cdp.mjs), before and after, on the same scenario:

band behind the landed row landed row top − list viewport top
origin/main (with band) #e8f0ff band across the row 12 px
this branch gone 12 px

So the alignment is unchanged and the band is gone. The qn-align-check assertion is still able to fail: with the ↑ click removed it throws the landed question sits 401px below the list viewport.

Mobile checks in the worktree: tsc --noEmit, eslint ., jest src/features/chat src/components → 50 suites / 633 tests pass. The scenario's own eval output on this branch:

cdp: eval: {"inset":12,"question":"把 Dreher"}
cdp: eval: "drew the 12px gap under the list top edge"

A jump already puts the landed question at the top of the viewport, so the
pale band that marked the row for 1.4 s was redundant — and it read as a
background behind the question bubble rather than as a locator.

- `useQuestionNav` no longer tracks `landedId` (and with it `LANDED_MS`, the
  landed-row timer and the `itemsRef` that only fed it).
- `ChatScreen` renders each row without the conditional band style.
- `qn-align-check` now locates the landed row by the question bubble itself
  (accent-filled, no vertical inset above it) instead of by the band, so the
  "12 px below the list viewport" assertion still holds and is still able to
  fail: verified by running the scenario through `cdp.mjs` against the harness
  (inset 12 with the jump, 401 without it).
@huichen
huichen enabled auto-merge (squash) September 25, 2026 09:43
@huichen
huichen merged commit a3cc178 into main Sep 25, 2026
12 checks passed
@huichen
huichen deleted the fix/qn-landed-highlight branch September 25, 2026 09:49
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