Skip to content

Conversation

@DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented Nov 18, 2025

This PR adds the frontend implementation for modifying task prompts. Closes coder/internal#1084


🤖 PR was initially written by Claude Sonnet 4.5 Thinking using Coder Mux and then heavily modified by a human 👩

@DanielleMaywood DanielleMaywood marked this pull request as draft November 18, 2025 00:02
@DanielleMaywood DanielleMaywood changed the title feat(tasks): add UI for modifying task prompts feat(site): allow modifying task prompts for starting tasks Nov 18, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

DanielleMaywood added a commit that referenced this pull request Nov 25, 2025
This PR adds the backend implementation for modifying task prompts. Part
of coder/internal#1084

## Changes

- New `UpdateTaskPrompt` database query to update task prompts
- New PATCH `/api/v2/tasks/{task}/prompt` endpoint

## Notes

This is part 1 of a 2-part PR stack. The frontend UI will be added in a
follow-up PR based on this branch
(#20812).

---

🤖 PR was written by Claude Sonnet 4.5 Thinking using [Coder
Mux](https://github.com/coder/cmux) and reviewed by a human 👩
Base automatically changed from danielle-change-task-prompt-backend to main November 25, 2025 11:13
david-fraley pushed a commit that referenced this pull request Nov 25, 2025
This PR adds the backend implementation for modifying task prompts. Part
of coder/internal#1084

## Changes

- New `UpdateTaskPrompt` database query to update task prompts
- New PATCH `/api/v2/tasks/{task}/prompt` endpoint

## Notes

This is part 1 of a 2-part PR stack. The frontend UI will be added in a
follow-up PR based on this branch
(#20812).

---

🤖 PR was written by Claude Sonnet 4.5 Thinking using [Coder
Mux](https://github.com/coder/cmux) and reviewed by a human 👩
@DanielleMaywood DanielleMaywood force-pushed the danielle-change-task-prompt-frontend branch 7 times, most recently from aaaa792 to fbc125b Compare November 25, 2025 20:40
@DanielleMaywood DanielleMaywood force-pushed the danielle-change-task-prompt-frontend branch from fbc125b to 2fece8e Compare November 25, 2025 20:47
@DanielleMaywood DanielleMaywood marked this pull request as ready for review November 25, 2025 20:57
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

The flow seems correct to me.

Visually I think it'd be beneficial to not just show "you can edit the prompt while ...", but also show the actual prompt here. Re-reading the prompt while waiting may help spark an idea for the user to more likely use the feature.

I also ran into the dialogue open but disabled "cannot change for active task". But that's because my sample template is very fast. It felt a bit clunky but I have no suggestion for improvement.

I'll defer FE patterns review to Kayla.

@DanielleMaywood
Copy link
Contributor Author

I also ran into the dialogue open but disabled "cannot change for active task". But that's because my sample template is very fast. It felt a bit clunky but I have no suggestion for improvement.

I am very open to any suggestions to improve this. I can fully understand the clunky feeling of it

}

const stopBuild = await API.stopWorkspace(workspace.id);
await API.waitForBuild(stopBuild);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also handle this with a try-catch, in case the stop workspace build fails?

workspace.latest_build.build_number,
);

if (currentBuild.status !== "stopped") {
Copy link
Contributor

Choose a reason for hiding this comment

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

This means that we are allowing this operation in all other build status, like running, right? In that case, this will cancel a workspace that is already running, is that expected? Shouldn't we just support currentBuild.status === pending || currentBuild.status === starting?

@github-actions github-actions bot added the stale This issue is like stale bread. label Dec 4, 2025
@github-actions github-actions bot closed this Dec 7, 2025
@DanielleMaywood DanielleMaywood removed the stale This issue is like stale bread. label Dec 10, 2025
- Move to using `formik` and a form
- Remove unneeded comment
- Use DialogClose component
- Use `useId` instead of hard-coded IDs
@DanielleMaywood DanielleMaywood marked this pull request as draft December 10, 2025 12:37
@DanielleMaywood DanielleMaywood added the doc-check Assign this label to PRs to check for any doc changes. label Dec 10, 2025
@DanielleMaywood DanielleMaywood marked this pull request as ready for review December 11, 2025 15:11
): Promise<void> => {
await this.axios.patch(`/api/v2/tasks/${user}/${id}/input`, {
input,
} satisfies TypesGen.UpdateTaskInputRequest);
Copy link
Member

Choose a reason for hiding this comment

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

god I love the satisfies keyword. thank you for actually knowing how to use it correctly. 💕

@DanielleMaywood DanielleMaywood merged commit e7bbfe2 into main Dec 11, 2025
31 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle-change-task-prompt-frontend branch December 11, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-check Assign this label to PRs to check for any doc changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impossible to edit Tasks prompt while waiting for the workspace to spin up

5 participants