chore(coderd): introduce TaskAppID and deprecate AITaskSidebarAppID (#20336)

As we're moving away from the SidebarAppID nomenclature, this PR
introduces a new `TaskAppID` field to `codersdk.WorkspaceBuild` and
deprecates the `AITaskSidebarAppID` field. They both contain the same
value.
This commit is contained in:
Danielle Maywood
2025-10-24 10:57:32 +01:00
committed by GitHub
parent e8e31dcb2c
commit e60112e54f
12 changed files with 49 additions and 16 deletions
+5 -5
View File
@@ -635,9 +635,9 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
// @Router /api/experimental/tasks/{user}/{task}/send [post]
//
// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
// taskSend submits task input to the tasks sidebar app by dialing the agent
// taskSend submits task input to the task app by dialing the agent
// directly over the tailnet. We enforce ApplicationConnect RBAC on the
// workspace and validate the sidebar app health.
// workspace and validate the task app health.
func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
task := httpmw.TaskParam(r)
@@ -709,7 +709,7 @@ func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
//
// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
// taskLogs reads task output by dialing the agent directly over the tailnet.
// We enforce ApplicationConnect RBAC on the workspace and validate the sidebar app health.
// We enforce ApplicationConnect RBAC on the workspace and validate the task app health.
func (api *API) taskLogs(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
task := httpmw.TaskParam(r)
@@ -767,7 +767,7 @@ func (api *API) taskLogs(rw http.ResponseWriter, r *http.Request) {
//
// - Fetch the task workspace
// - Authorize ApplicationConnect on the workspace
// - Validate the AI task and sidebar app health
// - Validate the AI task and task app health
// - Dial the agent and construct an HTTP client to the apps loopback URL
//
// The provided callback receives the context, an HTTP client that dials via the
@@ -832,7 +832,7 @@ func (api *API) authAndDoWithTaskAppClient(
appURL := app.Url.String
if appURL == "" {
return httperror.NewResponseError(http.StatusInternalServerError, codersdk.Response{
Message: "Task sidebar app URL is not configured.",
Message: "Task app URL is not configured.",
})
}
parsedURL, err := url.Parse(appURL)