Skip to content

feat: implement conditional build parameters flow based on template setting #18390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

blink-so[bot]
Copy link
Contributor

@blink-so blink-so bot commented Jun 16, 2025

Summary

This PR implements conditional logic for build parameter flows based on the template_use_classic_parameter_flow workspace setting. When this setting is false, the system now directs users to the workspace settings page for ephemeral parameter configuration instead of using the inline popover.

Changes

New Component

  • ConditionalBuildParametersPopover: A new component that conditionally renders either the classic BuildParametersPopover or shows the UpdateBuildParametersDialogExperimental dialog

Updated Components

  • Buttons.tsx: Updated StartButton and RestartButton to use ConditionalBuildParametersPopover
  • RetryButton.tsx: Updated to use ConditionalBuildParametersPopover
  • DebugButton.tsx: Updated to use ConditionalBuildParametersPopover
  • UpdateBuildParametersDialogExperimental.tsx: Updated dialog text to be more specific about ephemeral parameters and their dependencies
  • WorkspaceParametersPageViewExperimental.tsx: Combined standard and ephemeral parameters into a unified display with visual indicators

Behavior Changes

When template_use_classic_parameter_flow is true:

  • Uses the existing BuildParametersPopover behavior (no change)

When template_use_classic_parameter_flow is false:

  • If ephemeral parameters exist: Shows dialog directing users to workspace settings page
  • If no ephemeral parameters: Proceeds with the action directly
  • Workspace settings page now displays all parameters together with "Ephemeral" badges for ephemeral parameters

Rationale

This change addresses the requirement that ephemeral parameters may depend on values of non-ephemeral parameters. By directing users to the workspace settings page, they can see and configure all parameters in context, ensuring proper dependency handling.

Testing

The changes maintain backward compatibility - workspaces with template_use_classic_parameter_flow: true will continue to work exactly as before. The new flow only activates when the setting is false.

Related Issues

Addresses the need for better ephemeral parameter handling in the experimental parameter flow.

blink-so bot and others added 2 commits June 16, 2025 14:38
- Add ConditionalBuildParametersPopover component that checks template_use_classic_parameter_flow
- When classic flow is false, show UpdateBuildParametersDialogExperimental for ephemeral parameters
- Direct users to workspace settings page for ephemeral parameter configuration
- Update WorkspaceParametersPageViewExperimental to combine standard and ephemeral parameters
- Add visual indicators for ephemeral parameters in unified parameter display
- Update all workspace action buttons to use conditional logic

Co-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
- Remove trailing whitespace from ConditionalBuildParametersPopover.tsx
- Fix import order in RetryButton.tsx to match linting requirements

Co-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
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.

0 participants