Repository navigation
Preserve Tune values when reopening the panel - #1108
Conversation
Render controls from current values and keep defaults tied to variant initialization. Cover range zero, toggle false, steps, session boundaries, and reopen before accept. AI assistance: prepared with OpenAI Codex under Mager direction, following Paul approval on issue pbakaus#1002.
[Medium impact] The PR appears safe to merge. SummaryTune now keeps edited values when reopened. Missing values are added to the current values and applied to the preview before controls appear.
Reviews (2) · Last reviewed commit: "Seed displayed Tune knobs that have no l..." · Reviewed by Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 76d1ce4. Configure here.
When the Tune panel opened before refreshParamsPanel had run for the visible variant, it showed defaults that were neither in paramsCurrentValues nor applied to the variant: the preview stayed unset, accept dropped untouched knobs, and a default-on toggle took two clicks. buildParamsPanel now seeds and applies any missing key, leaving existing values alone so reopening still keeps edits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed a follow-up for the Bugbot thread: a Tune panel opened before the variant's first refresh now seeds and applies the knobs it displays, so the preview, accept payload and default-on toggles agree. Added a harness test for that first-open path; source tests, build, and the vite8-react-ts and vite8-sveltekit live E2E fixtures pass. (Changes pushed by Claude Code on behalf of @pbakaus.) |
A day of main comes in: the round-13 measurement defects (#1151) and the straggler fix (#1135), hidden product mockups (#1137), legal and footnote blocks (#1146), full-page evidence capture (#1149), the Tune value fixes (#1108, #1154), the launcher and ignore-boundary round (#1116), the craft-floor launcher fallback (#1153), the reference docs reconciliation (#1117), the CSP meta reference fix (#1145), keeping installed skills when the bundle is unreachable (#1144), the debuginfo cut (#1150), and the generated provider syncs. No source conflicts: the in-page bundle and five sweep goldens conflicted as generated files. The bundle was regenerated from the merged source with `cargo xtask bundle`; the sweep goldens are main's as they stand, since main carries them as accepted deltas in DELTAS.md (its own new fixtures are not recorded in them yet), and this branch's sweep entries are covered by its existing DELTAS entries the same way. Prepared with AI assistance (Claude Code). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Reopening Live's Tune panel currently restores parameter defaults, changing both the controls and the preview. This keeps the current values when the panel reopens. Switching variants still resets to that variant's defaults.
Addresses item 2 of #1002, following Paul's request for a focused PR. The Windows launcher and scroll-loop items are outside this change.
openTunePopover()no longer reapplies defaults. The range, toggle, and steps controls render fromparamsCurrentValues, with an own-property check so0andfalseremain valid. Initialization and variant switching still use the existing reset path.Test plan
76d1ce437: Mager changed Lead to 1.50, closed and reopened Tune, and the video retains 1.50 and Snug. He then selected Lead 1.70 and clicked Accept. The saved Svelte source containsline-height: 1.7andletter-spacing: 0.01em, with nodata-p-*,var(--p-*), or variant markers left behind. A fresh browser page, after hydration and adding three sample entries, renders 27.2px line height at 16px font size (1.7) and 0.16px letter spacing (0.01em). The fixture keeps entries only in component memory, so the empty list after accept does not mean the saved styles were lost. This check does not claim to preserve component state across accept/reload.e3083ac33: five Tune cases fail without the fix. With the fix, all 45 browser-source tests pass. Coverage includes repeated reopen, range zero, both toggle directions, steps, variant reset, leaving cycling, and variants without parameters.line-height: 1.8and the selected spacing branch, with no preview parameter hooks left behind.tests/live-agent-target.test.mjslease/timing group. This local broad run is not green. A fresh native build of unchanged maine3083ac33also fails all five of those tests (plus two more) in the same file. No assertions or timeouts were relaxed.76d1ce437, including the required Live browser smoke groups. Owner manual verification is complete; ready for maintainer review.Browser command:
IMPECCABLE_BIN="$PWD/target/release/impeccable" \ IMPECCABLE_E2E_ONLY=vite8-sveltekit-stateful,vite8-react-ts \ bun run test:live-e2eThe browser tests use the real native Live server and deterministic test agent, not an LLM. The added accept regression checks saved source, not only the displayed control.
Generated provider/harness output is intentionally omitted. No manifest versions or changelog entries changed.
AI assistance: implementation, tests, and this description were prepared with OpenAI Codex under Mager's direction and the maintainer approval linked above.
Note
Low Risk
Scoped to Live Tune UI state; variant switching and session refresh still reset defaults through the existing path.
Overview
Fixes Live Tune so closing and reopening the panel no longer snaps controls and the preview back to schema defaults.
openTunePopover()stops callingapplyParamDefaultson every open; variant initialization /refreshParamsPanelstill resetsparamsCurrentValueswhen cycling variants or leaving CYCLING.buildParamsPanelrenders range, toggle, and steps fromparamsCurrentValues, seeding only keys missing viaObject.hasOwn(so0/falsestay valid) and applying those defaults to the variant when first shown.Adds browser-source harness tests for reopen, session boundaries, and first-open seeding, plus E2E
closeTunePaneland a close/reopen step before Accept.Reviewed by Cursor Bugbot for commit e7ea475. Bugbot is set up for automated code reviews on this repo. Configure here.