Collapsing a jumped-to thread card leaves it highlighted and refuses to collapse #573

Closed
opened 2026-09-15 14:02:49 +00:00 by crueber · 2 comments
Owner

Collapsing a jumped-to thread card leaves it highlighted and refuses to collapse

What's requested

Clicking "collapse" on a thread card that was just jumped to (via a Comments-index pill) should collapse it AND clear the emerald flash highlight. Today the collapse link appears dead and the highlight persists.

Evidence

  • web/src/pages/Pull.jsx:725-727 (ThreadCard): open = () => getOpen() || flashed() — while flashed, the card is force-expanded regardless of the collapse toggle.
  • web/src/pages/Pull.jsx:1033-1041 (jumpToThread): setFlashTid(tid) sets the flash; nothing anywhere clears it — no timeout, no clear on collapse, resolve, or reload. The signal only changes when another pill jump overwrites it.
  • web/src/pages/Pull.jsx:754: the flashed card carries outline outline-2 outline-emerald-500, which therefore sticks indefinitely.

Observed user-visible behavior (static read; not reproduced locally): after one pill jump, the target card is outlined forever, and the "collapse" link both fails to collapse (flashed() forces open() true) and fails to unhighlight.

Fix shape

  • The collapse control (Pull.jsx:772-774) must clear the page-level flash for that tid (e.g. a onCollapse/clearFlash prop that calls setFlashTid(null)), so both open() and the outline return to tracking getOpen().
  • Decide (implementer's call, note it): whether resolve/unresolve and receiving a collab-stream thread frame should also clear the flash. Minimum bar is the collapse control.

Architecture notes

  • Related: the click-in-card highlight ticket (same flash lifecycle) — land the flash-clearing mechanics once, don't fork two lifecycles.
  • Display/state-only in Pull.jsx; no anchor or drift-hash surface touched (anchorContextSha inputs stay byte-identical).

Acceptance criteria

  • Pill-jump to a card, click "collapse": card collapses and the outline disappears.
  • A card never jumped to behaves exactly as today (no outline, collapse/expand works).
  • Jumping to a second card moves the flash to the new target only.
  • The forced-open behavior while flashed is preserved for the jump itself (the jump still reveals the card content) — only collapse clears it.
# Collapsing a jumped-to thread card leaves it highlighted and refuses to collapse ## What's requested Clicking "collapse" on a thread card that was just jumped to (via a Comments-index pill) should collapse it AND clear the emerald flash highlight. Today the collapse link appears dead and the highlight persists. ## Evidence - `web/src/pages/Pull.jsx:725-727` (ThreadCard): `open = () => getOpen() || flashed()` — while flashed, the card is force-expanded regardless of the collapse toggle. - `web/src/pages/Pull.jsx:1033-1041` (jumpToThread): `setFlashTid(tid)` sets the flash; nothing anywhere clears it — no timeout, no clear on collapse, resolve, or reload. The signal only changes when another pill jump overwrites it. - `web/src/pages/Pull.jsx:754`: the flashed card carries `outline outline-2 outline-emerald-500`, which therefore sticks indefinitely. Observed user-visible behavior (static read; not reproduced locally): after one pill jump, the target card is outlined forever, and the "collapse" link both fails to collapse (flashed() forces `open()` true) and fails to unhighlight. ## Fix shape - The collapse control (Pull.jsx:772-774) must clear the page-level flash for that tid (e.g. a `onCollapse`/`clearFlash` prop that calls `setFlashTid(null)`), so both `open()` and the outline return to tracking `getOpen()`. - Decide (implementer's call, note it): whether resolve/unresolve and receiving a collab-stream thread frame should also clear the flash. Minimum bar is the collapse control. ## Architecture notes - Related: the click-in-card highlight ticket (same flash lifecycle) — land the flash-clearing mechanics once, don't fork two lifecycles. - Display/state-only in `Pull.jsx`; no anchor or drift-hash surface touched (`anchorContextSha` inputs stay byte-identical). ## Acceptance criteria - [ ] Pill-jump to a card, click "collapse": card collapses and the outline disappears. - [ ] A card never jumped to behaves exactly as today (no outline, collapse/expand works). - [ ] Jumping to a second card moves the flash to the new target only. - [ ] The forced-open behavior while flashed is preserved for the jump itself (the jump still reveals the card content) — only collapse clears it.
crueber added this to the v1 milestone 2026-09-15 14:03:08 +00:00
Author
Owner

Shares the flash lifecycle with #575 — land the flash set/clear mechanics once, in whichever lands first; the other consumes it.

Shares the flash lifecycle with #575 — land the flash set/clear mechanics once, in whichever lands first; the other consumes it.
Author
Owner

Fixed by #577 (merged): ThreadCard collapse now clears the page-level flash for its tid before toggling, so collapse collapses + unhighlights; jump force-reveal, single-flash overwrite, and resolve/frame behavior otherwise unchanged (resolve keeps highlight, noted). Shared set/clear mechanics landed once for #575 to consume. Verified: 1406 unit tests green (smoke excluded, pre-existing), vite/esbuild green, independent review APPROVE.

Fixed by #577 (merged): ThreadCard collapse now clears the page-level flash for its tid before toggling, so collapse collapses + unhighlights; jump force-reveal, single-flash overwrite, and resolve/frame behavior otherwise unchanged (resolve keeps highlight, noted). Shared set/clear mechanics landed once for #575 to consume. Verified: 1406 unit tests green (smoke excluded, pre-existing), vite/esbuild green, independent review APPROVE.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#573
No description provided.