Skip to content

Conversation

@aslilac
Copy link
Member

@aslilac aslilac commented Nov 10, 2025

Delete all of the old frontend code and fix all of the tests that broke in the process

I found a number of quirks and bugs that we should probably address, but I think this is a solid chunk of work to merge

@aslilac aslilac marked this pull request as ready for review November 20, 2025 23:29
Comment on lines -82 to -88
<DebouncedParameterField
id={id}
parameter={parameter}
value={value}
onChange={onChange}
disabled={disabled}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Deboucing is quite important for input, textarea and slider parameters to allow the UI to remain responsive, if this is getting removed, how is debouncing being handled?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm debouncing the websocket messages now directly instead of making that the fields jobs

having the fields not update the state immediately means that you have to wait half a second before you can actually hit enter/click create.

return (
<div
className="flex flex-col gap-2"
data-testid={`parameter-field-${parameter.name}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a few places that were changed to use display name to lookup a parameter but the data-testid here is still using name,
page.getByTestId( parameter-field-${richParameter.displayName}, );

Copy link
Member Author

Choose a reason for hiding this comment

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

parameter.name here is, confusingly, the "displayName"

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

Most excellent 👌

One main question and some observations from messing around with it (that are probably out of scope, and you may have already have them written down):

  1. Do we need to do anything with the use_classic_parameter_flow setting before merging this? Dynamic parameters have to be enabled in the template settings, but then when creating a workspace it uses dynamic parameters regardless of the setting. But then other spots can still use the classic flow, like the ephemeral build popup, or the /settings/parameters page.
  2. One weird thing (I bet this is a preexisting issue), if I have a number input and I type text into it, I get no error feedback. If I type a number then erase it I get "" is not a number, but then if I type again the error still says "" and not the actual input I wrote. Maybe the bigger issue is that Firefox lets me type any text into a number field though lol.
  3. I know this is an preexisting issue and out of scope for this PR, but I did want to mention it feels kinda weird when the Required badge disappears after filling out the field, and it does not come back after removing the value either. Since we already show a * when the field is required, maybe we show the badge instead of * and remove the logic that currently toggles the badge.

if (validation_max !== null) {
inputProps.max = validation_max;
}
} else if (parameter.styling?.mask_input) {
Copy link
Member

Choose a reason for hiding this comment

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

nbd at all but could make sense to use the var that was derived

Suggested change
} else if (parameter.styling?.mask_input) {
} else if (maskInput) {

import type { AutofillBuildParameter } from "utils/richParameters";
import { paramsUsedToCreateWorkspace } from "utils/workspace";
import { CreateWorkspacePageView } from "./CreateWorkspacePageView";
import { CreateWorkspacePageViewExperimental } from "./CreateWorkspacePageViewExperimental";
Copy link
Member

Choose a reason for hiding this comment

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

Should we call this just CreateWorkspacePageView now?

type ExternalAuthPollingState = "idle" | "polling" | "abandoned";

const CreateWorkspacePage: FC = () => {
const CreateWorkspacePageExperimental: FC = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Similarly here, should this just be CreateWorkspacePage now?

};

export default CreateWorkspacePage;
export default CreateWorkspacePageExperimental;
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep the name as CreateWorkspacePage

<Loader />
) : (
<CreateWorkspacePageView
<CreateWorkspacePageViewExperimental
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep the name as CreateWorkspacePageView

@jaaydenh
Copy link
Contributor

jaaydenh commented Nov 24, 2025

CreateWorkspacePageViewExperimental.stories.tsx should be updated to CreateWorkspacePageView.stories.tsx

@jaaydenh
Copy link
Contributor

Just for continuity if we ever look at the PR sometime in the future it may be helpful to link to issues for remaining work, bugs that are still needed. For example, removing classic parameters for the WorkspaceParametersPage.tsx

Copy link
Contributor

@jaaydenh jaaydenh left a comment

Choose a reason for hiding this comment

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

After testing, I didn't discover any new issues. Left some minor comments but otherwise should be good to go.

@aslilac aslilac force-pushed the lilac/remove-old-workspace-creation-form branch from f51c0dc to 782c6fa Compare November 25, 2025 21:51
@aslilac aslilac merged commit 956cbe7 into main Nov 25, 2025
31 checks passed
@aslilac aslilac deleted the lilac/remove-old-workspace-creation-form branch November 25, 2025 22:07
@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2025
@aslilac
Copy link
Member Author

aslilac commented Dec 8, 2025

Closes coder/internal#1075

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.

4 participants