Skip to content

fix: preserve BrowseList selection during polling#27

Open
KalleBylin wants to merge 2 commits intogastownhall:mainfrom
KalleBylin:fix/background-poll-selection
Open

fix: preserve BrowseList selection during polling#27
KalleBylin wants to merge 2 commits intogastownhall:mainfrom
KalleBylin:fix/background-poll-selection

Conversation

@KalleBylin
Copy link
Copy Markdown
Contributor

@KalleBylin KalleBylin commented Mar 9, 2026

Why

Follow-up to #17. During review there, a remaining BrowseList issue was called out as a good follow-up: background polling did not start after the first successful load, and when polling ran later it dropped the current selection.

What changed

  • arm background polling after the first successful load instead of gating it only on a ref set during the same render cycle
  • track BrowseList selection by wanted item id rather than row index
  • preserve selection across background refreshes when the same item still exists, and clear it only if it disappears
  • add focused regression coverage around poll startup and selection preservation across refreshes

Local verification

Checked locally with the web test suite and frontend checks.

web run check still reports the existing BrowseList.module.css descending-specificity warning, unchanged by this PR.

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