Skip to content

refactor([issue-912]): /simplify cleanups on the regen follow-ups#973

Merged
atomantic merged 2 commits into
mainfrom
regen/simplify-cleanup
Jun 5, 2026
Merged

refactor([issue-912]): /simplify cleanups on the regen follow-ups#973
atomantic merged 2 commits into
mainfrom
regen/simplify-cleanup

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Quality-only pass (no behavior change) over the regen follow-ups (#970/#971), from running /simplify on the combined diff:

  • MediaLightbox — reuse the existing runBusyAction for the Regenerate run button instead of a near-duplicate runRegen; collapse three slider-bound fallback ternaries into one destructure-with-defaults.
  • regen.js buildRegenParams — store the trimmed prompt once rather than re-deriving the guard for both prompt and negativePrompt.
  • local.js upscale — drop redundant Number() casts and use PNG compressionLevel: 6 (sharp default) instead of 9 (near-identical size, faster re-encode on the completion path).

Skipped (out of scope / not real): extracting a shared LabeledSlider/postProcessImage/regenDefaults module (bigger refactors touching unrelated files), clampRegenDimensions→imageEdgeSchema (validate vs clamp), fetching slider bounds inside SettingsPane (would duplicate the request; prop-threading matches the existing onClean/regenAvailable pattern).

Refs #912

Test plan

  • 119 server tests pass across regen/local/route; client lint clean; npm run build succeeds.

atomantic added 2 commits June 5, 2026 11:50
Quality pass over #970/#971 (no behavior change):
- MediaLightbox: drop the bespoke runRegen handler and reuse the existing
  runBusyAction for the Regenerate run button; collapse the three slider-bound
  fallback ternaries into one destructure with defaults.
- regen.js buildRegenParams: store the trimmed prompt once instead of
  re-deriving the hasPrompt guard for prompt and negativePrompt.
- local.js upscale: drop redundant Number() casts in the guard and use PNG
  compressionLevel 6 (sharp default) instead of 9 — near-identical size, faster
  re-encode on the render-completion path.
@atomantic atomantic merged commit ad47d28 into main Jun 5, 2026
2 checks passed
@atomantic atomantic deleted the regen/simplify-cleanup branch June 5, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant