Skip to content

fix: handle blank dynamic parameter values consistently#26122

Open
code-asher wants to merge 4 commits into
mainfrom
asher/parameter-submit-fixes
Open

fix: handle blank dynamic parameter values consistently#26122
code-asher wants to merge 4 commits into
mainfrom
asher/parameter-submit-fixes

Conversation

@code-asher
Copy link
Copy Markdown
Member

@code-asher code-asher commented Jun 6, 2026

Fixes https://linear.app/codercom/issue/DEVEX-243/unable-to-remove-value-from-parameter-with-default

There was inconsistency with what the form showed and what actually was sent to the backend. I opted to make it so that explicitly blank values are always sent rather than have blank values silently changing to the default value (which in addition to being surprising also prevents you from submitting the edit form due to hasUnsyncedParameters).

An alternative would be to make it so blank values get updated in the form to their defaults, but I feel like that behavior would be more surprising. An explicit reset button might be better for that if we need it?

Also fix a minor issue in the mock websocket where it would fire responses before we could get a handle set to ws.current which basically caused client responses to get missed.

The actual changes are minor (basically just adding undefined checks); most of this is tests for both user input and auto-fill code paths for both the create and edit workspace settings pages to not only ensure that the form shows the right values, but that the websocket and API requests also use the right values.

This made it so we could not store it in ws.current before the message
handler fired, which in some tests would result in not being able to
send the initial message since we relied on having the socket in that
handler.
These mirror the template and workspace build parameters which makes it
much easier to reason about how things should work in tests.
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 6, 2026

DEVEX-243

@code-asher code-asher force-pushed the asher/parameter-submit-fixes branch 2 times, most recently from 38f9a4e to f5b738b Compare June 6, 2026 01:08
@code-asher code-asher force-pushed the asher/parameter-submit-fixes branch from f5b738b to 6240369 Compare June 6, 2026 01:14
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