Setup: per-section collapsible "Advanced" for sane-default fields #168
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#168
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Setup: per-section collapsible "Advanced" for sane-default fields
The
/setuppage shows every field flat. Fields with sane defaults that most operators never touch should live in a per-section "Advanced" subsection, hidden by default (collapsed<details>-style or equivalent) inside the section they belong to.Sections called out (audit each; default-hidden advanced for the sane-default knobs, essential fields stay visible): cache, server concurrency + timeouts, wal, maintenance, compaction, bundles, git, telemetry, import. Evaluate the rest (auth, store backends, SSH, notifications, checks, releases, etc.) with the same lens: essential-to-first-boot stays visible; tunable-with-sane-default goes advanced.
Suggested shape (follow existing conventions)
FIELDSentries gain anadvanced: trueflag (same pattern asmodes/backends); Setup.jsx renders per-section advanced groups collapsed by default.Acceptance criteria
node --testgreen; browser check of /setup (expand/collapse, save round-trip) both themes, zero console errors; no new deps.Fixed by PR #169 (branch fix/issue-168): per-section collapsed Advanced groups on /setup, save/test/validate byte-identical, 345/345 node tests green. Browser check (expand/collapse + save round-trip, both themes, zero console errors) still needed before merge — no runnable browser daemon in this environment.
Review: PR #169 (fix/issue-168) — setup per-section collapsible Advanced
Verified in scratch worktree at
5941083(removed afterward); main worktree read-only (fetch+diffonly). No fixes needed — nothing pushed.Checklist (all pass)
server.auth.*rows carry noadvancedflag (web/src/lib/setup.js:213-228) — session_secret, oauth_client_secret, tokens, allowlists all stay open.store.s3.access_key_env/secret_key_env(:243-245),events.webhook_secret(:343),import.url_allowlist(:347) also unflagged.authandplacementsections are fully unflagged (pinned by test). Deliberateadvanced: trueonwal.push_broker_token(:271),upstream.token_env(:324),import.allow_private_networks/allow_file_urls(:348-349) is fine: empty-by-default opt-ins, fail-closed defaults preserved, first boot needs none of them.splitAdvanced(setup.js:182-189) routes unknown keys toessential; covered bysetup-advanced.test.js"treats unknown keys as essential".filterSetupToVisible(setup.js:161-170) gates only onbackends, knows nothing aboutadvanced; both essential and advanced rows render through the samerenderRowinside the always-mounted<details>(Setup.jsx:334-395). Live-verified:[data-key="server.http2"]present in DOM while its group is closed.advErrorCount(Setup.jsx:394) surfaces hidden-row hint count on the<summary>via.chip-draft. Live-verified: poisoning collapsedcache.prewarm_parallelism=0shows "Advanced / 1 issue" on the closed group, and Validate reportscache.prewarm_parallelism: must be >= 1, got 0.advVisibleCount(Setup.jsx:390-393) combinesadvancedwith the mode/backend gates;auth/placementrender no group (browser-confirmed).<details>/<summary>(Setup.jsx:414-428), summary focusable (tabIndex >= 0in browser). No JS open-state.auth/placementall-visible with stated rationale (mode-gated/required-or-sensitive; globs have no sane default). Browser shows exactly these 13 groups;releases/attachmentscards correctly get none.normalizeSetupidentical expanded vs collapsed plus every advanced key present in overrides; browser Validate round-trip (poisoned -> client error; fixed ->200 {errors: []}) confirms end to end.package.jsonuntouched..setup-advanced/.setup-advanced-togglecarrydark:variants (ui.css:80-83); error chip reuses.chip-draftwhich already hasdark:(ui.css:61-62). Browser: 13 groups, distinct toggle colors in both themes (lightlab(47.9…)vs darklab(65.6…)), zero console/page errors in both.12_web_ui.mdrendering bullet +FIXED (issue #168)appendix match the code (mounted-not-hidden, gates, badge, no-group cases, headless cover named).Test results
node --test web/test/unit/*.test.jsin scratch worktree: 345/345 pass (incl. newsetup-advanced.test.js20/20,setup-form.test.js46/46). Note: 3 unrelated suites (data-guard,reaction-cache,tolerate-missing) fail withoutweb/node_modules(missingsolid-jsimport); with the main worktree'snode_modulessymlinked read-only, the full suite is green. Pre-existing env quirk, not this PR.vite build: clean (121 modules, 1.73s).walgit.localhost:18099/setup): 13 collapsed-by-default native groups; expand/collapse toggles; collapsed row in DOM; error badge count; Validate blocked-then-200 flow; theme toggle both directions; no console or page errors.MERGE RECOMMENDATION: ready to merge
No findings requiring changes. Not merging per instructions.
Fixed by PR #169 (review clean incl. real-browser pass; 345/345 node tests), merged. Closing.