feat(ui): expose the whole downloads config block in Settings - #80
Merged
roziscoding merged 2 commits intoAug 1, 2026
Merged
Conversation
roziscoding
marked this pull request as ready for review
July 31, 2026 23:02
Contributor
|
Settings covered jack, peers, servers, and API keys in full, but of the `downloads` block only the unlink toggle. This exposes the remaining ten keys so the config file has no UI-invisible corners left. Settings -> Downloads is now one form: - completed folder, simultaneous transfers, and the unlink switch up top — the settings you actually choose - transfer retry tuning and import-watcher tuning in two collapsed groups, each labelled with how many of its values differ from jack's defaults - one dirty-aware Save, with Revert Millisecond keys stay millisecond keys (that's what the file holds) but read back in human terms next to the input, and each field's placeholder is jack's default. Clearing a field now means "use the default": the PATCH sends null and the backend drops the key from the file. `completedPath` has no default, so it can't be cleared. A config with no downloads block gets a "Set up downloads" flow rather than a dead end.
roziscoding
force-pushed
the
feat/settings-full-config
branch
from
July 31, 2026 23:40
79b09be to
a79bd49
Compare
Saving refreshes from the server and re-seeds the form with the response, so an edit made while the PATCH was in flight was silently overwritten — and since seeding also resets the baseline, the lost edit didn't even leave the form dirty. Every control is now disabled for the duration of the save, which closes the window rather than trying to reconcile after the fact. The submit button already disabled itself while loading; the fields, switch, and Revert did not. Reported by Greptile on #80.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Settings already covered
jack,peers,servers, and API keys in full. Of thedownloadsblock it covered exactly one key — the unlink toggle from #79. This exposes the remaining ten, so the config file has no UI-invisible corners left.Settings → Downloads
One form, three tiers:
Each collapsed group is labelled with how many of its values differ from jack's defaults, so a closed group still tells you whether it holds anything you set yourself. One dirty-aware Save, with Revert.
Clearing a field means "use the default"
Millisecond keys stay millisecond keys — that's what the config file holds — but each field reads its value back in human terms beside the input (
1800000→30 min), and the placeholder is jack's default. Clearing a field sendsnull, and the backend drops the key from the file so the schema default applies again.completedPathhas no default, so it is the one key that can't be cleared (null→ 400).A config file with no
downloadsblock gets a "Set up downloads" flow instead of a dead end — writing that block is exactly what this form does.Save semantics
Only
unlinkImportedFilesapplies immediately (the import watcher reads it per import, per #79). Everything else is read at startup, and the success message says so — including the first-save case, where nothing downloads until the server restarts.Checklist
mise run lint:fixwas run and its output is committed (no changes)mise run testpasses — 472 pass / 0 fail.mise run test:e2ewas not run: no Docker in the dev environment.website/reference/configuration.md,website/guide/management-ui.mdTests
formatDurationMs— 6 tests over the config defaults, unit boundaries, and empty values. These caught a real bug:59999 msrendered as60.0 s.nulldrops a key so the default applies again;completedPath: nullis rejected 400 and leaves the file untouched.PATCHwith nulls removed the keys from the config file on disk and left the rest intact.