Skip to content

Effect idea modal: keep preview busy UI open, show community params, and block accidental close during generation#346

Open
smcga wants to merge 1 commit intomainfrom
codex/show-parameters-for-community-effects-during-checkout-okrj6m
Open

Effect idea modal: keep preview busy UI open, show community params, and block accidental close during generation#346
smcga wants to merge 1 commit intomainfrom
codex/show-parameters-for-community-effects-during-checkout-okrj6m

Conversation

@smcga
Copy link
Copy Markdown
Owner

@smcga smcga commented Apr 8, 2026

Motivation

  • Improve the UX of the effect generator while a generation is in progress by keeping the busy panel visible and preventing accidental modal closure.
  • Surface approved community effects and their adjustable params during generation so users can continue to explore and tweak previews without interrupting generation.
  • Factor close/visibility logic into small helpers to make close-blocking behavior testable.

Description

  • Add a dedicated busy panel to the effect idea preview that keeps community carousel controls available while generation runs and provides a compact expandable Community params toggle with live param controls.
  • Prevent backdrop clicks and Escape from closing the effect idea modal while generation is active and show a busy-block message via getEffectIdeaCloseBlockedMessage.
  • Extract close/block and carousel visibility logic into src/effectIdeaModalClose.ts with functions getEffectIdeaCloseBlockedMessage and shouldShowCommunityCarouselButtons and add unit tests in src/effectIdeaModalClose.test.ts.
  • Render community param controls (renderEffectIdeaParamControls) and wire them into the busy panel (renderBusyCommunityEffectControls), hydrate carousel entries with paramDefs, and keep carousel nav buttons visible per the new visibility logic.
  • Update DOM (index.html) to include the busy controls toggle and preview stage wrapper, and add corresponding styles in src/style.css.
  • Update src/main.ts to manage new state (effectIdeaBusyControlsExpanded), wire up event handlers for the new toggle, and replace direct modal-close calls with closeEffectIdeaModalIfAllowed.

Testing

  • Ran unit tests with vitest, including the new effectIdeaModalClose tests and existing style.test.ts assertions, and the suite passed.
  • Verified CSS expectations via the existing style.test.ts checks for new classes and layout attributes, which succeeded.
  • No automated end-to-end tests were changed in this PR.

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codexperimental Ready Ready Preview, Comment Apr 8, 2026 0:44am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant