Skip to content

Preserve Tune values when reopening the panel - #1108

Merged
pbakaus merged 2 commits into
pbakaus:mainfrom
mager:codex/tune-reopen-1002
Oct 23, 2026
Merged

pbakaus merged 2 commits into
pbakaus:mainfrom
mager:codex/tune-reopen-1002

Conversation

@mager

@mager mager commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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 from paramsCurrentValues, with an own-property check so 0 and false remain valid. Initialization and variant switching still use the existing reset path.

Test plan

  • Owner manual verification on October 23 at 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 contains line-height: 1.7 and letter-spacing: 0.01em, with no data-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.
  • Regression-first on current main 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.
  • Browser-source and E2E CLI helper tests: 52 pass.
  • Native release build and source-first distribution build pass.
  • Real Svelte browser flow: change range and steps, close/reopen Tune, then Accept. The saved source retains line-height: 1.8 and the selected spacing branch, with no preview parameter hooks left behind.
  • Scoped React/Svelte Live E2E plus the top-layer UI suite: all 15 tests pass (3 suites), including close/reopen/accept with the tuned values.
  • Run the default suite against the rebuilt native binary: core, oracle, and detector pass. The local Live stage has 238 pass, 5 fail, 2 skip; failures are in the unchanged tests/live-agent-target.test.mjs lease/timing group. This local broad run is not green. A fresh native build of unchanged main e3083ac33 also fails all five of those tests (plus two more) in the same file. No assertions or timeouts were relaxed.
  • Run the remaining framework and plugin-loader suites separately: 191 and 4 pass.
  • GitHub CI passed on 76d1ce437, including the required Live browser smoke groups. Owner manual verification is complete; ready for maintainer review.
  • Broader Live framework matrix beyond the two scoped fixtures.

Browser command:

IMPECCABLE_BIN="$PWD/target/release/impeccable" \
IMPECCABLE_E2E_ONLY=vite8-sveltekit-stateful,vite8-react-ts \
bun run test:live-e2e

The 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 calling applyParamDefaults on every open; variant initialization / refreshParamsPanel still resets paramsCurrentValues when cycling variants or leaving CYCLING. buildParamsPanel renders range, toggle, and steps from paramsCurrentValues, seeding only keys missing via Object.hasOwn (so 0 / false stay 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 closeTunePanel and 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.

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.
@github-actions github-actions Bot added the waiting on contributor Waiting for the PR author to respond or make changes label Oct 22, 2026
@mager
mager marked this pull request as ready for review October 23, 2026 15:14
@mager
mager requested a review from pbakaus as a code owner October 23, 2026 15:14
@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Tune now keeps edited values when reopened. Missing values are added to the current values and applied to the preview before controls appear.

  • Live's Tune panel keeps edited values when it is reopened.

Reviews (2) · Last reviewed commit: "Seed displayed Tune knobs that have no l..." · Reviewed by Greptile

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread skill/scripts/live-browser.js Outdated
@github-actions github-actions Bot added the blocked: review threads Unresolved review feedback or requested changes remain label Oct 23, 2026
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>
@pbakaus

pbakaus commented Oct 23, 2026

Copy link
Copy Markdown
Owner

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.)

@pbakaus
pbakaus merged commit aafea3c into pbakaus:main Oct 23, 2026
22 checks passed
abdulwahabone added a commit that referenced this pull request Oct 24, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked: review threads Unresolved review feedback or requested changes remain policy: approved waiting on contributor Waiting for the PR author to respond or make changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants