Fix: files selection bar no longer leaks into non-file views (#788) #791
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat-788"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #788.
Reproduced first on the v0.6.294 Bao dogfood: Recents → select all → Spaces left
body[data-sel="on"], "11 selected",#selbardisplayed over the overview.Root cause:
setView()closed the details pane for non-file views but never dropped the file selection. Files→files transitions were fine only becauserenderRowsclearsSEL; non-file views never render rows, sodata-selstayed on and the CSS kept the bar up (and#fileactionshidden).Fix (one line, existing mechanism): in
setView's existingif (!files)branch,if (SEL.size) { SEL.clear(); applySel(); }—applySelstays the single writer ofbody[data-sel](pinned). No TDZ risk:SELis declared aftersetViewbut only deferred handlers reference it before, andboot()runs at the end. Verified the mechanism against the exact live leaked state before pushing (data-sel→ off, bar hidden, toolbar back).Reverse path checked:
spovSelis re-created on everyopenSpacesView()render and its bar lives inside#listpane, whichsetViewhides for file views — nothing leaks the other way. #787 will re-verify once the spaces bar moves into the toolbar slot.Verified locally: RED → splice → 272/272 green; runner one-shot repeated it.