Skip to content

feat: dynamic parameter form for workspace updates - #1114

Draft
EhabY wants to merge 2 commits into
mainfrom
feat/workspace-update-parameters
Draft

EhabY wants to merge 2 commits into
mainfrom
feat/workspace-update-parameters

Conversation

@EhabY

@EhabY EhabY commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Updating a workspace whose template uses dynamic parameters now works like the dashboard. The extension evaluates the new template version with the workspace's current values. If they still pass, the update goes ahead with no prompt. If not, an editor-tab form asks for the missing or invalid values.

  • The form only collects parameters. It replaces collectUpdateParameters for dynamic templates, so the existing updateWorkspace flow still does the build (one-build stop and start, older-server fallbacks, telemetry, build logs).
  • Like the dashboard's parameters page:
    • previous values carry over when still valid, and ephemeral parameters reset
    • immutable parameters are locked and not submitted
    • parameters sort by order, and typing is debounced 500ms
    • labels show Immutable, Ephemeral and Required badges
    • the button reads "Update and restart" or "Update and start"
  • The webview uses @repo/ui controls and VS Code Settings-editor styling. It evaluates through typed IPC requests with React Query and keeps typed values when the tab is hidden.
  • Closing the form cancels the update and continues with the current version, the same as dismissing the classic prompts.
  • Servers that don't send template_use_classic_parameter_flow keep the classic prompts.
  • Also fixes pnpm lint and pnpm format on Windows: the .bin shims are .cmd files that spawnSync can't run without a shell, so the scripts now run each tool's JS entry through Node.

The second commit adds ValidationMessage to @repo/ui. It matches VS Code's input box validation message (info, warning, and error, using the inputValidation theme colors), has stories for every theme, and gives invalid text controls and selects VS Code's validation border. The form uses it for parameter diagnostics.

Addresses #972.

Size

About 1.6k added lines against main:

  • Production: +872 / -2 (extension panel and state-machine wiring, shared IPC contract, webview package, ValidationMessage)
  • Tests: +442 / -7 (panel factory, form, state-machine, and ValidationMessage cases)
  • Storybook: +182 (form and ValidationMessage stories in light, dark, and both high-contrast themes)
  • Config: +100 (new package setup, lockfile, test aliases)
  • Scripts: +23 / -11 (Windows lint and format fix)

Validation

  • pnpm lint, pnpm typecheck, pnpm format:check, pnpm build
  • pnpm test: 190 files, 2,780 tests passed
  • Checked the form in Storybook at wide and narrow widths and in both high-contrast themes
  • Still needed: a live test against a deployment with a dynamic-parameter template

@EhabY
EhabY force-pushed the feat/workspace-update-parameters branch from 8c9fb00 to 509f683 Compare September 24, 2026 19:12
@EhabY EhabY changed the title feat: add dynamic workspace update parameter editor feat: dynamic parameter form for workspace updates Sep 24, 2026
@EhabY
EhabY force-pushed the feat/workspace-update-parameters branch 2 times, most recently from 3ef08aa to cab6547 Compare September 24, 2026 19:33
Updating a workspace whose template uses dynamic parameters now works like
the dashboard: the new template version is evaluated with the current
values, and a form opens only when they fail. The form replaces
collectUpdateParameters for dynamic templates, so the existing
updateWorkspace flow still performs the build.

Also runs the lint and format tools through Node so pnpm lint and pnpm
format work on Windows.
@EhabY
EhabY force-pushed the feat/workspace-update-parameters branch from cab6547 to f89dcac Compare September 24, 2026 19:50
Adds ValidationMessage to @repo/ui with VS Code's info, warning, and error
input validation styles and stories for every theme, and gives invalid text
controls and selects the validation border. The workspace update form uses
it for parameter diagnostics.
@EhabY
EhabY force-pushed the feat/workspace-update-parameters branch from f89dcac to ea26cd1 Compare September 24, 2026 19:58

This branch has not been deployed

No deployments
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