You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep the remote-file selection across a package refresh
The selection was created inside InstalledPackageContent, which takes
its data by value out of the resource's Suspend — so every re-resolution
re-ran the component and every RwSignal in it was a brand-new signal.
The picks died on any refresh, including refreshes with nothing to do
with them: edit one local file while choosing remote files to download
and the choices were gone.
It was also stored as indices into an entries list that is sorted by
filename, so one added or dropped entry shifts every later position.
Preserving that would have re-pointed the selection at other files, so
re-keying by path is a precondition, not a tidy-up.
The page now owns it, as All { chosen } | Subset. All pins no names, so
a file arriving in a later refresh is covered by it (today's behaviour);
Subset pins names, so an arrival is never ticked into a download the
user has not seen. Both fall out of one intersection against the entries
the package currently offers, which is also what drops a name that has
since been installed — no cleanup pass anywhere. The header checkbox and
every row read that one derivation and store nothing, so they cannot
disagree.
All-ticked always collapses to All, whatever path reached it: a subset of
every current name would draw identically yet diverge on the next
refresh. `chosen` records that the user asked for everything rather than
left the screen as it opened; nothing reads it yet — it is the state the
always-download-new-files opt-in needs.
The selection clears on a namespace change, since the router keeps this
component mounted between packages. Suspense becomes Transition so the
refreshes that remain update in place instead of blanking to a spinner.
A partial selection now draws indeterminate rather than empty, which
would claim nothing is selected — momentary before this change, standing
after it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments