Skip to content

feat: remember last-used artefact and default to it on upgrade#293

Open
mbevc1 wants to merge 2 commits into
marcosnils:masterfrom
mbevc1:20260627_select_last
Open

feat: remember last-used artefact and default to it on upgrade#293
mbevc1 wants to merge 2 commits into
marcosnils:masterfrom
mbevc1:20260627_select_last

Conversation

@mbevc1

@mbevc1 mbevc1 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

When a release exposes several assets, bin scores them by OS/arch and prompts when more than one ties. That choice was not remembered, so every bin update re-ran scoring/prompting from scratch and a user who picked a specific variant (e.g. musl/static) had to re-pick it each upgrade.

Persist the selected top-level release asset (Binary.SelectedAsset) and, on upgrade, re-select it automatically when it can be uniquely re-identified in the new release. Because asset names embed the version, matching is version-insensitive via the existing SanitizeName helper. When a prompt is still required, the previously used artefact is offered as the default (Enter keeps it) through a new options.SelectWithDefault.

The change is additive and backward compatible: configs without selected_asset decode to "" and fall through to the existing scoring/prompt path unchanged.

Closes #289

mbevc1 added 2 commits June 27, 2026 11:56
When a release exposes several assets, bin scores them by OS/arch and
prompts when more than one ties. That choice was not remembered, so every
`bin update` re-ran scoring/prompting from scratch and a user who picked a
specific variant (e.g. musl/static) had to re-pick it each upgrade.

Persist the selected top-level release asset (`Binary.SelectedAsset`) and,
on upgrade, re-select it automatically when it can be uniquely re-identified
in the new release. Because asset names embed the version, matching is
version-insensitive via the existing SanitizeName helper. When a prompt is
still required, the previously used artefact is offered as the default
(Enter keeps it) through a new options.SelectWithDefault.

The change is additive and backward compatible: configs without
`selected_asset` decode to "" and fall through to the existing
scoring/prompt path unchanged.

Closes marcosnils#289
@marcosnils

Copy link
Copy Markdown
Owner

thx for taking this one. It's long overdue in the backlog but haven't come back to it due to lack of time

@mbevc1

mbevc1 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

No worries, was bugging me for a while with many apps shipping glib/musl and had to select it every time again 😄

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.

feat: Remember last used artefact

2 participants