From f974add3730452bcf242af55fd1c5fe68ffda77f Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Fri, 30 May 2025 11:00:26 -0300 Subject: [PATCH 01/58] chore: rollback PR #18025 (#18118) Rollback https://github.com/coder/coder/pull/18025 --- cli/testdata/coder_list_--output_json.golden | 2 +- coderd/apidoc/docs.go | 4 +- coderd/apidoc/swagger.json | 4 +- coderd/workspacebuilds.go | 3 +- coderd/workspacebuilds_test.go | 3 +- codersdk/workspacebuilds.go | 16 ++--- docs/reference/api/builds.md | 18 ++--- docs/reference/api/schemas.md | 70 +++++++++---------- docs/reference/api/workspaces.md | 18 ++--- site/src/api/api.ts | 2 +- site/src/api/queries/workspaces.ts | 2 +- site/src/api/typesGenerated.ts | 3 +- .../WorkspaceBuildPageView.tsx | 6 +- .../pages/WorkspacePage/HistorySidebar.tsx | 2 +- site/src/testHelpers/entities.ts | 8 +-- 15 files changed, 69 insertions(+), 92 deletions(-) diff --git a/cli/testdata/coder_list_--output_json.golden b/cli/testdata/coder_list_--output_json.golden index d8e6a306cabcf..c37c89c4efe2a 100644 --- a/cli/testdata/coder_list_--output_json.golden +++ b/cli/testdata/coder_list_--output_json.golden @@ -23,7 +23,7 @@ "workspace_id": "===========[workspace ID]===========", "workspace_name": "test-workspace", "workspace_owner_id": "==========[first user ID]===========", - "workspace_owner_username": "testuser", + "workspace_owner_name": "testuser", "template_version_id": "============[version ID]============", "template_version_name": "===========[version name]===========", "build_number": 1, diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 5e8b8d6afa89e..16a51d187a486 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -17865,9 +17865,7 @@ const docTemplate = `{ "format": "uuid" }, "workspace_owner_name": { - "type": "string" - }, - "workspace_owner_username": { + "description": "WorkspaceOwnerName is the username of the owner of the workspace.", "type": "string" } } diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index ef32dcd24f375..986862df59a09 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -16315,9 +16315,7 @@ "format": "uuid" }, "workspace_owner_name": { - "type": "string" - }, - "workspace_owner_username": { + "description": "WorkspaceOwnerName is the username of the owner of the workspace.", "type": "string" } } diff --git a/coderd/workspacebuilds.go b/coderd/workspacebuilds.go index 55598abe726b3..c01004653f86e 100644 --- a/coderd/workspacebuilds.go +++ b/coderd/workspacebuilds.go @@ -1098,8 +1098,7 @@ func (api *API) convertWorkspaceBuild( CreatedAt: build.CreatedAt, UpdatedAt: build.UpdatedAt, WorkspaceOwnerID: workspace.OwnerID, - WorkspaceOwnerName: workspace.OwnerName, - WorkspaceOwnerUsername: workspace.OwnerUsername, + WorkspaceOwnerName: workspace.OwnerUsername, WorkspaceOwnerAvatarURL: workspace.OwnerAvatarUrl, WorkspaceID: build.WorkspaceID, WorkspaceName: workspace.Name, diff --git a/coderd/workspacebuilds_test.go b/coderd/workspacebuilds_test.go index c121523c4da4a..ac33c9e92c4f7 100644 --- a/coderd/workspacebuilds_test.go +++ b/coderd/workspacebuilds_test.go @@ -79,8 +79,7 @@ func TestWorkspaceBuild(t *testing.T) { }, testutil.WaitShort, testutil.IntervalFast) wb, err := client.WorkspaceBuild(testutil.Context(t, testutil.WaitShort), workspace.LatestBuild.ID) require.NoError(t, err) - require.Equal(t, up.Username, wb.WorkspaceOwnerUsername) - require.Equal(t, up.Name, wb.WorkspaceOwnerName) + require.Equal(t, up.Username, wb.WorkspaceOwnerName) require.Equal(t, up.AvatarURL, wb.WorkspaceOwnerAvatarURL) } diff --git a/codersdk/workspacebuilds.go b/codersdk/workspacebuilds.go index dd7af027ae701..d3372b272548f 100644 --- a/codersdk/workspacebuilds.go +++ b/codersdk/workspacebuilds.go @@ -51,14 +51,14 @@ const ( // WorkspaceBuild is an at-point representation of a workspace state. // BuildNumbers start at 1 and increase by 1 for each subsequent build type WorkspaceBuild struct { - ID uuid.UUID `json:"id" format:"uuid"` - CreatedAt time.Time `json:"created_at" format:"date-time"` - UpdatedAt time.Time `json:"updated_at" format:"date-time"` - WorkspaceID uuid.UUID `json:"workspace_id" format:"uuid"` - WorkspaceName string `json:"workspace_name"` - WorkspaceOwnerID uuid.UUID `json:"workspace_owner_id" format:"uuid"` - WorkspaceOwnerName string `json:"workspace_owner_name,omitempty"` - WorkspaceOwnerUsername string `json:"workspace_owner_username"` + ID uuid.UUID `json:"id" format:"uuid"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + WorkspaceID uuid.UUID `json:"workspace_id" format:"uuid"` + WorkspaceName string `json:"workspace_name"` + WorkspaceOwnerID uuid.UUID `json:"workspace_owner_id" format:"uuid"` + // WorkspaceOwnerName is the username of the owner of the workspace. + WorkspaceOwnerName string `json:"workspace_owner_name"` WorkspaceOwnerAvatarURL string `json:"workspace_owner_avatar_url,omitempty"` TemplateVersionID uuid.UUID `json:"template_version_id" format:"uuid"` TemplateVersionName string `json:"template_version_name"` diff --git a/docs/reference/api/builds.md b/docs/reference/api/builds.md index 2d0742737a3ad..9db3fe370a3d2 100644 --- a/docs/reference/api/builds.md +++ b/docs/reference/api/builds.md @@ -225,8 +225,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" } ``` @@ -461,8 +460,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \ "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" } ``` @@ -1176,8 +1174,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" } ``` @@ -1485,8 +1482,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \ "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" } ] ``` @@ -1658,8 +1654,7 @@ Status Code **200** | `» workspace_name` | string | false | | | | `» workspace_owner_avatar_url` | string | false | | | | `» workspace_owner_id` | string(uuid) | false | | | -| `» workspace_owner_name` | string | false | | | -| `» workspace_owner_username` | string | false | | | +| `» workspace_owner_name` | string | false | | Workspace owner name is the username of the owner of the workspace. | #### Enumerated Values @@ -1972,8 +1967,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \ "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" } ``` diff --git a/docs/reference/api/schemas.md b/docs/reference/api/schemas.md index 65e3b5f7c8ec8..f8e2152f629be 100644 --- a/docs/reference/api/schemas.md +++ b/docs/reference/api/schemas.md @@ -8422,8 +8422,7 @@ If the schedule is empty, the user will be updated to use the default schedule.| "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", @@ -9414,39 +9413,37 @@ If the schedule is empty, the user will be updated to use the default schedule.| "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" -} -``` - -### Properties - -| Name | Type | Required | Restrictions | Description | -|------------------------------|-------------------------------------------------------------------|----------|--------------|-------------| -| `build_number` | integer | false | | | -| `created_at` | string | false | | | -| `daily_cost` | integer | false | | | -| `deadline` | string | false | | | -| `id` | string | false | | | -| `initiator_id` | string | false | | | -| `initiator_name` | string | false | | | -| `job` | [codersdk.ProvisionerJob](#codersdkprovisionerjob) | false | | | -| `matched_provisioners` | [codersdk.MatchedProvisioners](#codersdkmatchedprovisioners) | false | | | -| `max_deadline` | string | false | | | -| `reason` | [codersdk.BuildReason](#codersdkbuildreason) | false | | | -| `resources` | array of [codersdk.WorkspaceResource](#codersdkworkspaceresource) | false | | | -| `status` | [codersdk.WorkspaceStatus](#codersdkworkspacestatus) | false | | | -| `template_version_id` | string | false | | | -| `template_version_name` | string | false | | | -| `template_version_preset_id` | string | false | | | -| `transition` | [codersdk.WorkspaceTransition](#codersdkworkspacetransition) | false | | | -| `updated_at` | string | false | | | -| `workspace_id` | string | false | | | -| `workspace_name` | string | false | | | -| `workspace_owner_avatar_url` | string | false | | | -| `workspace_owner_id` | string | false | | | -| `workspace_owner_name` | string | false | | | -| `workspace_owner_username` | string | false | | | + "workspace_owner_name": "string" +} +``` + +### Properties + +| Name | Type | Required | Restrictions | Description | +|------------------------------|-------------------------------------------------------------------|----------|--------------|---------------------------------------------------------------------| +| `build_number` | integer | false | | | +| `created_at` | string | false | | | +| `daily_cost` | integer | false | | | +| `deadline` | string | false | | | +| `id` | string | false | | | +| `initiator_id` | string | false | | | +| `initiator_name` | string | false | | | +| `job` | [codersdk.ProvisionerJob](#codersdkprovisionerjob) | false | | | +| `matched_provisioners` | [codersdk.MatchedProvisioners](#codersdkmatchedprovisioners) | false | | | +| `max_deadline` | string | false | | | +| `reason` | [codersdk.BuildReason](#codersdkbuildreason) | false | | | +| `resources` | array of [codersdk.WorkspaceResource](#codersdkworkspaceresource) | false | | | +| `status` | [codersdk.WorkspaceStatus](#codersdkworkspacestatus) | false | | | +| `template_version_id` | string | false | | | +| `template_version_name` | string | false | | | +| `template_version_preset_id` | string | false | | | +| `transition` | [codersdk.WorkspaceTransition](#codersdkworkspacetransition) | false | | | +| `updated_at` | string | false | | | +| `workspace_id` | string | false | | | +| `workspace_name` | string | false | | | +| `workspace_owner_avatar_url` | string | false | | | +| `workspace_owner_id` | string | false | | | +| `workspace_owner_name` | string | false | | Workspace owner name is the username of the owner of the workspace. | #### Enumerated Values @@ -10125,8 +10122,7 @@ If the schedule is empty, the user will be updated to use the default schedule.| "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", diff --git a/docs/reference/api/workspaces.md b/docs/reference/api/workspaces.md index 1e73787dfb77e..de6fb8331047d 100644 --- a/docs/reference/api/workspaces.md +++ b/docs/reference/api/workspaces.md @@ -280,8 +280,7 @@ of the template will be used. "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", @@ -565,8 +564,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", @@ -876,8 +874,7 @@ of the template will be used. "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", @@ -1147,8 +1144,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \ "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", @@ -1433,8 +1429,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \ "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", @@ -1834,8 +1829,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \ "workspace_name": "string", "workspace_owner_avatar_url": "string", "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7", - "workspace_owner_name": "string", - "workspace_owner_username": "string" + "workspace_owner_name": "string" }, "name": "string", "next_start_at": "2019-08-24T14:15:22Z", diff --git a/site/src/api/api.ts b/site/src/api/api.ts index a0f2d487b8603..81931c003c99d 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -1165,7 +1165,7 @@ class ApiMethods { ) ) { const { job } = await this.getWorkspaceBuildByNumber( - build.workspace_owner_username, + build.workspace_owner_name, build.workspace_name, build.build_number, ); diff --git a/site/src/api/queries/workspaces.ts b/site/src/api/queries/workspaces.ts index 61bc7f0e70c22..6c6a1aa19825c 100644 --- a/site/src/api/queries/workspaces.ts +++ b/site/src/api/queries/workspaces.ts @@ -279,7 +279,7 @@ const updateWorkspaceBuild = async ( queryClient: QueryClient, ) => { const workspaceKey = workspaceByOwnerAndNameKey( - build.workspace_owner_username, + build.workspace_owner_name, build.workspace_name, ); const previousData = queryClient.getQueryData(workspaceKey); diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index 8465f3d02be38..9fa6e45fa30da 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -3623,8 +3623,7 @@ export interface WorkspaceBuild { readonly workspace_id: string; readonly workspace_name: string; readonly workspace_owner_id: string; - readonly workspace_owner_name?: string; - readonly workspace_owner_username: string; + readonly workspace_owner_name: string; readonly workspace_owner_avatar_url?: string; readonly template_version_id: string; readonly template_version_name: string; diff --git a/site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx b/site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx index 09a4676cf6d60..6add701c8b688 100644 --- a/site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx +++ b/site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx @@ -104,7 +104,7 @@ export const WorkspaceBuildPageView: FC = ({ label="Workspace" value={ {build.workspace_name} @@ -158,7 +158,7 @@ export const WorkspaceBuildPageView: FC = ({ {builds?.map((build) => ( @@ -205,7 +205,7 @@ export const WorkspaceBuildPageView: FC = ({ fontWeight: 600, }} > - {`coder rm ${`${build.workspace_owner_username}/${build.workspace_name}`} --orphan`} + {`coder rm ${`${build.workspace_owner_name}/${build.workspace_name}`} --orphan`} {" "} to delete the workspace skipping resource destruction. diff --git a/site/src/pages/WorkspacePage/HistorySidebar.tsx b/site/src/pages/WorkspacePage/HistorySidebar.tsx index 2976a6daa3b71..2d978fb2a7d83 100644 --- a/site/src/pages/WorkspacePage/HistorySidebar.tsx +++ b/site/src/pages/WorkspacePage/HistorySidebar.tsx @@ -35,7 +35,7 @@ export const HistorySidebar: FC = ({ workspace }) => { diff --git a/site/src/testHelpers/entities.ts b/site/src/testHelpers/entities.ts index a76476ba28fcd..72ad6fa508a02 100644 --- a/site/src/testHelpers/entities.ts +++ b/site/src/testHelpers/entities.ts @@ -1288,7 +1288,7 @@ export const MockWorkspaceBuild: TypesGen.WorkspaceBuild = { updated_at: "2022-05-17T17:39:01.382927298Z", workspace_name: "test-workspace", workspace_owner_id: MockUserOwner.id, - workspace_owner_username: MockUserOwner.username, + workspace_owner_name: MockUserOwner.username, workspace_owner_avatar_url: MockUserOwner.avatar_url, workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3", deadline: "2022-05-17T23:39:00.00Z", @@ -1316,7 +1316,7 @@ const MockWorkspaceBuildAutostart: TypesGen.WorkspaceBuild = { updated_at: "2022-05-17T17:39:01.382927298Z", workspace_name: "test-workspace", workspace_owner_id: MockUserOwner.id, - workspace_owner_username: MockUserOwner.username, + workspace_owner_name: MockUserOwner.username, workspace_owner_avatar_url: MockUserOwner.avatar_url, workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3", deadline: "2022-05-17T23:39:00.00Z", @@ -1340,7 +1340,7 @@ const MockWorkspaceBuildAutostop: TypesGen.WorkspaceBuild = { updated_at: "2022-05-17T17:39:01.382927298Z", workspace_name: "test-workspace", workspace_owner_id: MockUserOwner.id, - workspace_owner_username: MockUserOwner.username, + workspace_owner_name: MockUserOwner.username, workspace_owner_avatar_url: MockUserOwner.avatar_url, workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3", deadline: "2022-05-17T23:39:00.00Z", @@ -1366,7 +1366,7 @@ export const MockFailedWorkspaceBuild = ( updated_at: "2022-05-17T17:39:01.382927298Z", workspace_name: "test-workspace", workspace_owner_id: MockUserOwner.id, - workspace_owner_username: MockUserOwner.username, + workspace_owner_name: MockUserOwner.username, workspace_owner_avatar_url: MockUserOwner.avatar_url, workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3", deadline: "2022-05-17T23:39:00.00Z", From be8474a8a06e2b6a67499d3f5e88d5e14319fc84 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Fri, 30 May 2025 11:00:53 -0300 Subject: [PATCH 02/58] feat: add textarea auto size (#18127) Demo: https://github.com/user-attachments/assets/aa179ac2-6f2f-43a6-8d74-8a936eea5a29 --- site/package.json | 1 + site/pnpm-lock.yaml | 64 ++++++++++++++++++++++++++ site/src/pages/TasksPage/TasksPage.tsx | 5 +- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/site/package.json b/site/package.json index 62da2c42abc4c..b099706bd57a3 100644 --- a/site/package.json +++ b/site/package.json @@ -105,6 +105,7 @@ "react-query": "npm:@tanstack/react-query@5.77.0", "react-router-dom": "6.26.2", "react-syntax-highlighter": "15.6.1", + "react-textarea-autosize": "8.5.9", "react-virtualized-auto-sizer": "1.0.24", "react-window": "1.8.11", "recharts": "2.15.0", diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml index 9adc62dfed1e1..7b332074b32fc 100644 --- a/site/pnpm-lock.yaml +++ b/site/pnpm-lock.yaml @@ -229,6 +229,9 @@ importers: react-syntax-highlighter: specifier: 15.6.1 version: 15.6.1(react@18.3.1) + react-textarea-autosize: + specifier: 8.5.9 + version: 8.5.9(@types/react@18.3.12)(react@18.3.1) react-virtualized-auto-sizer: specifier: 1.0.24 version: 1.0.24(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -5481,6 +5484,12 @@ packages: peerDependencies: react: '>= 0.14.0' + react-textarea-autosize@8.5.9: + resolution: {integrity: sha512-U1DGlIQN5AwgjTyOEnI1oCcMuEr1pv1qOtklB2l4nyMGbHzWrI0eFsYK0zos2YWqAolJyG0IWJaqWmWj5ETh0A==, tarball: https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.9.tgz} + engines: {node: '>=10'} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-transition-group@4.4.5: resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==, tarball: https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz} peerDependencies: @@ -6176,6 +6185,33 @@ packages: '@types/react': optional: true + use-composed-ref@1.4.0: + resolution: {integrity: sha512-djviaxuOOh7wkj0paeO1Q/4wMZ8Zrnag5H6yBvzN7AKKe8beOaED9SF5/ByLqsku8NP4zQqsvM2u3ew/tJK8/w==, tarball: https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.4.0.tgz} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + use-isomorphic-layout-effect@1.2.1: + resolution: {integrity: sha512-tpZZ+EX0gaghDAiFR37hj5MgY6ZN55kLiPkJsKxBMZ6GZdOSPJXiOzPM984oPYZ5AnehYx5WQp1+ME8I/P/pRA==, tarball: https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.2.1.tgz} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + use-latest@1.3.0: + resolution: {integrity: sha512-mhg3xdm9NaM8q+gLT8KryJPnRFOz1/5XPBhmDEVZK1webPzDjrPk7f/mbpeLqTgB9msytYWANxgALOCJKnLvcQ==, tarball: https://registry.npmjs.org/use-latest/-/use-latest-1.3.0.tgz} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + use-sidecar@1.1.2: resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==, tarball: https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz} engines: {node: '>=10'} @@ -12397,6 +12433,15 @@ snapshots: react: 18.3.1 refractor: 3.6.0 + react-textarea-autosize@8.5.9(@types/react@18.3.12)(react@18.3.1): + dependencies: + '@babel/runtime': 7.26.10 + react: 18.3.1 + use-composed-ref: 1.4.0(@types/react@18.3.12)(react@18.3.1) + use-latest: 1.3.0(@types/react@18.3.12)(react@18.3.1) + transitivePeerDependencies: + - '@types/react' + react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.26.10 @@ -13189,6 +13234,25 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + use-composed-ref@1.4.0(@types/react@18.3.12)(react@18.3.1): + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.12 + + use-isomorphic-layout-effect@1.2.1(@types/react@18.3.12)(react@18.3.1): + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.12 + + use-latest@1.3.0(@types/react@18.3.12)(react@18.3.1): + dependencies: + react: 18.3.1 + use-isomorphic-layout-effect: 1.2.1(@types/react@18.3.12)(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.12 + use-sidecar@1.1.2(@types/react@18.3.12)(react@18.3.1): dependencies: detect-node-es: 1.1.0 diff --git a/site/src/pages/TasksPage/TasksPage.tsx b/site/src/pages/TasksPage/TasksPage.tsx index c4a0ae897bd37..9f07d0b0c6cdd 100644 --- a/site/src/pages/TasksPage/TasksPage.tsx +++ b/site/src/pages/TasksPage/TasksPage.tsx @@ -49,6 +49,7 @@ import type { FC, PropsWithChildren, ReactNode } from "react"; import { Helmet } from "react-helmet-async"; import { useMutation, useQuery, useQueryClient } from "react-query"; import { Link as RouterLink } from "react-router-dom"; +import TextareaAutosize from "react-textarea-autosize"; import { cn } from "utils/cn"; import { pageTitle } from "utils/page"; import { relativeTime } from "utils/time"; @@ -204,7 +205,7 @@ const TaskForm: FC = ({ templates }) => { -