Fix #168: setup Advanced subsections #169

Merged
crueber merged 1 commit from fix/issue-168 into main 2026-09-06 00:15:34 +00:00
Owner

Per-section collapsed Advanced groups for sane-default fields on /setup (fixes #168).

What changed: FIELDS entries gain advanced: true (same optional-flag pattern as modes/backends); new isAdvanced/splitAdvanced helpers in web/src/lib/setup.js; Setup.jsx renders each card's advanced rows inside a collapsed native <details> disclosure (keyboard-accessible summary, UI-only open state, data-advanced-for hook, .setup-advanced styles in ui.css dark+light); the disclosure renders only when an advanced row applies under the mode/backend gates, and inline-hint errors inside it surface as a count on the summary. Collapsed rows stay mounted, so save/test/validate are byte-identical (no change to the overrides channel, test endpoint, or save path). Docs: 12_web_ui.md §2.10 rendering bullet + Decisions entry. No new deps.

Per-section verdict table:

section Advanced group? visible essentials advanced (collapsed)
server (incl. server.ssh.*) yes listen, max_push_bytes, roles, auto_create_on_push, public_url, ssh.listen http2, max_concurrent_requests, max_concurrent_per_repo, request_timeout, drain_timeout, accel_redirect, cors_origins, ssh.host_key, ssh.host_key_env
auth no — every row is mode-gated and either required per mode or security-sensitive; hiding one risks a broken first boot all —
store yes backend, bucket, prefix, root, s3.endpoint/region/access_key_env/secret_key_env/force_path_style, gcs.endpoint/signing_service_account max_retries, multipart_threshold, multipart_part_size, gcs.bulk_clients, gcs.bulk_concurrency
cache yes dir, mode, max_bytes disk_high_watermark, evict_idle_after, prewarm*, entries, remote_bytes, shared_render_cache, store_mount
wal yes batch_window, max_batch, checkpoint_interval push_broker_, snapshot_every_entries, checkpoint_tail_bytes, cas_max_retries, fsck/check_connectivity, freshness_ttl, prefetch_, remote_objects
maintenance yes interval, checkpoints, disk max_pack_bytes, host, fsck_interval, follow_interval
placement no — routing globs have no sane default to hide behind all —
compaction yes enabled factor, trigger_packs, trigger_bytes, lease_ttl, retention_superseded, engine
bundles yes strategy min_commits, min_bytes, main_only, extra_refs, serve_via, signed_url_*, advertise(_filtered), require
lfs yes enabled serve_via, signed_url_ttl, max_object_bytes
upstream (=import source) yes git, follow lfs, token_env
git yes binary, object_format upload_pack_engine, allow_filter, allow_any_sha1_in_want, commit_graph(_changed_paths), history_pack, max_wants
telemetry yes log_format, metrics log_filter, lock_wait_warn
events yes webhook_url, webhook_secret sweep_interval
import yes url_allowlist, clone_timeout, max_bytes allow_private_networks, allow_file_urls, git_timeout, max_refs, max_concurrent
checks / releases / notifications N/A — not setup-schema sections (no keys in the schema) — —

Tests: node --test web/test/unit/*.test.js 345/345 green (new setup-advanced.test.js: flag/partition helpers, per-section grouping verdicts, save-payload equivalence expanded vs collapsed, collapsed-field validation); vite build clean and the disclosure ships in the bundle. Browser check NOT run: no runnable browser daemon in this environment (CDP :9222 closed); needs the standard real-Chromium /setup pass (expand/collapse + save round-trip, both themes, zero console errors) before merge.

Per-section collapsed Advanced groups for sane-default fields on /setup (fixes #168). What changed: FIELDS entries gain `advanced: true` (same optional-flag pattern as `modes`/`backends`); new `isAdvanced`/`splitAdvanced` helpers in `web/src/lib/setup.js`; `Setup.jsx` renders each card's advanced rows inside a collapsed native `<details>` disclosure (keyboard-accessible summary, UI-only open state, `data-advanced-for` hook, `.setup-advanced` styles in `ui.css` dark+light); the disclosure renders only when an advanced row applies under the mode/backend gates, and inline-hint errors inside it surface as a count on the summary. Collapsed rows stay mounted, so save/test/validate are byte-identical (no change to the overrides channel, test endpoint, or save path). Docs: `12_web_ui.md` §2.10 rendering bullet + Decisions entry. No new deps. Per-section verdict table: | section | Advanced group? | visible essentials | advanced (collapsed) | |---|---|---|---| | server (incl. server.ssh.*) | yes | listen, max_push_bytes, roles, auto_create_on_push, public_url, ssh.listen | http2, max_concurrent_requests, max_concurrent_per_repo, request_timeout, drain_timeout, accel_redirect, cors_origins, ssh.host_key, ssh.host_key_env | | auth | no — every row is mode-gated and either required per mode or security-sensitive; hiding one risks a broken first boot | all | — | | store | yes | backend, bucket, prefix, root, s3.endpoint/region/access_key_env/secret_key_env/force_path_style, gcs.endpoint/signing_service_account | max_retries, multipart_threshold, multipart_part_size, gcs.bulk_clients, gcs.bulk_concurrency | | cache | yes | dir, mode, max_bytes | disk_high_watermark, evict_idle_after, prewarm*, *_entries, remote_*_bytes, shared_render_cache, store_mount | | wal | yes | batch_window, max_batch, checkpoint_interval | push_broker_*, snapshot_every_entries, checkpoint_tail_bytes, cas_max_retries, fsck/check_connectivity, freshness_ttl, prefetch_*, remote_objects | | maintenance | yes | interval, checkpoints, disk | max_pack_bytes, host, fsck_interval, follow_interval | | placement | no — routing globs have no sane default to hide behind | all | — | | compaction | yes | enabled | factor, trigger_packs, trigger_bytes, lease_ttl, retention_superseded, engine | | bundles | yes | strategy | min_commits, min_bytes, main_only, extra_refs, serve_via, signed_url_*, advertise(_filtered), require | | lfs | yes | enabled | serve_via, signed_url_ttl, max_object_bytes | | upstream (=import source) | yes | git, follow | lfs, token_env | | git | yes | binary, object_format | upload_pack_engine, allow_filter, allow_any_sha1_in_want, commit_graph(_changed_paths), history_pack, max_wants | | telemetry | yes | log_format, metrics | log_filter, lock_wait_warn | | events | yes | webhook_url, webhook_secret | sweep_interval | | import | yes | url_allowlist, clone_timeout, max_bytes | allow_private_networks, allow_file_urls, git_timeout, max_refs, max_concurrent | | checks / releases / notifications | N/A — not setup-schema sections (no keys in the schema) | — | — | Tests: `node --test web/test/unit/*.test.js` 345/345 green (new `setup-advanced.test.js`: flag/partition helpers, per-section grouping verdicts, save-payload equivalence expanded vs collapsed, collapsed-field validation); `vite build` clean and the disclosure ships in the bundle. Browser check NOT run: no runnable browser daemon in this environment (CDP :9222 closed); needs the standard real-Chromium /setup pass (expand/collapse + save round-trip, both themes, zero console errors) before merge.
FIELDS gains an advanced flag (modes/backends pattern); Setup.jsx renders
per-section collapsed native disclosures, UI-only state. Save/test/validate
byte-identical (collapsed rows stay mounted). Docs: 12_web_ui.md rendering +
decision entry.
Sign in to join this conversation.
No description provided.