Skip to content

fix: clear prompt after task creation - #20344

Merged
BrunoQuaresma merged 1 commit into
mainfrom
bq/clear-prompt-after-task-creation
Oct 17, 2025
Merged

BrunoQuaresma merged 1 commit into
mainfrom
bq/clear-prompt-after-task-creation

Conversation

@BrunoQuaresma

@BrunoQuaresma BrunoQuaresma commented Oct 16, 2025 •

Copy link
Copy Markdown
Contributor

Fix #20255

@BrunoQuaresma
BrunoQuaresma requested a review from a team October 16, 2025 13:48
@BrunoQuaresma BrunoQuaresma self-assigned this Oct 16, 2025
@BrunoQuaresma
BrunoQuaresma requested review from aqandrew and removed request for a team October 16, 2025 13:48

@buenos-nachos buenos-nachos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes make sense to me. Just had one suggestion if we can get it to work

Comment on lines +118 to +121
await step("Clears prompt", async () => {
const prompt = await canvas.findByLabelText(/prompt/i);
expect(prompt).toHaveValue("");
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we able to use a role selector here? Maybe something like:

const prompt = await canvas.findByRole("textbox", {
  name: /prompt/i,
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it’s more accessible in this case to rely on the label, since that’s what both screen readers and users interact with. For example, when we get an element by role, we’re not checking whether it actually has an accessible label.

By getting an element by label, I don’t really care what type of element it is, because I can still perform the action I need.

Makes sense?

@BrunoQuaresma
BrunoQuaresma merged commit 09a41f3 into main Oct 17, 2025
3 checks passed
@BrunoQuaresma
BrunoQuaresma deleted the bq/clear-prompt-after-task-creation branch October 17, 2025 12:56
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 17, 2025
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.

bug: coder task prompt box no longer clears after creating a new task

2 participants