Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add ephemeral parameter dialog for workspace start/restart #18413

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

Merged
merged 7 commits into from
Jun 20, 2025

Conversation

blink-so[bot]
Copy link
Contributor

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

resolves #17709

FYI, blink created a first draft which was heavily modified.

Summary

This PR implements ephemeral parameter handling for workspace start/restart operations when templates use dynamic parameters (use_classic_parameter_flow = false).

Screenshot 2025-06-18 at 14 35 54 Screenshot 2025-06-18 at 14 35 43

Screenshot 2025-06-18 at 14 41 41

Changes

1. EphemeralParametersDialog Component

  • New: site/src/components/EphemeralParametersDialog/
  • Shows a dialog when starting/restarting workspaces with ephemeral parameters
  • Lists ephemeral parameters with names and descriptions
  • Provides options to continue without setting values or navigate to parameters page

2. WorkspaceReadyPage Updates

  • Added checkEphemeralParameters() function using API.getDynamicParameters
  • Modified handleStart and handleRestart to check for ephemeral parameters
  • Only triggers for templates with use_classic_parameter_flow = false
  • Shows dialog if ephemeral parameters exist, otherwise proceeds normally

3. BuildParametersPopover Updates

  • Added special UI for non-classic parameter flow templates with ephemeral parameters
  • Lists ephemeral parameters with descriptions
  • Explains that users must use the workspace parameters page
  • Provides direct link to WorkspaceParametersPageExperimental

blink-so bot and others added 4 commits June 17, 2025 16:08
- Add EphemeralParametersDialog component to inform users about ephemeral parameters
- Modify WorkspaceReadyPage to check for ephemeral parameters before start/restart
- Update BuildParametersPopover to show ephemeral parameter info for non-classic flow
- Update WorkspaceParametersPageExperimental button text based on template version
- Only trigger for templates with use_classic_parameter_flow = false

Co-authored-by: jaaydenh <[email protected]>
- Fix TypeScript errors in EphemeralParametersDialog and BuildParametersPopover
- Use correct Button component pattern with asChild and Link

Co-authored-by: jaaydenh <[email protected]>
@jaaydenh jaaydenh self-assigned this Jun 17, 2025
@jaaydenh jaaydenh marked this pull request as draft June 17, 2025 21:48
@jaaydenh jaaydenh requested review from Emyrk June 18, 2025 14:26
@jaaydenh jaaydenh marked this pull request as ready for review June 18, 2025 14:27
@@ -22,6 +22,8 @@ const badgeVariants = cva(
"border border-solid border-border-warning bg-surface-orange text-content-warning shadow",
destructive:
"border border-solid border-border-destructive bg-surface-red text-highlight-red shadow",
green:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is only meant to be used for ephemeral parameters and no other use cases. It felt like calling this ephemeral is too specific for the badge component so I left it as a generic green for now.

@jaaydenh jaaydenh requested a review from aslilac June 18, 2025 19:23
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Do we just use the previous value in the workspace settings page?

Provides options to continue without setting values or navigate to parameters page

Do we use the previous values? Or send no values, and assume the default value.

@jaaydenh
Copy link
Contributor

Do we use the previous values? Or send no values, and assume the default value.

If the user clicks "Continue", from a frontend perspective, it should be the exact same behavior as before which means the ephemeral parameters are not given new values.

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

QA'd locally 👍

@jaaydenh jaaydenh merged commit 4fe0a4b into main Jun 20, 2025
39 checks passed
@jaaydenh jaaydenh deleted the feat/ephemeral-parameters-dialog branch June 20, 2025 19:04
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update BuildParametersPopover to use DynamicParameters
2 participants