Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add remove task button into the tasks list#20036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 4 commits intomainfrombq/add-remove-task-on-table
Oct 1, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

Demo:

Screen.Recording.2025-09-30.at.10.43.32.mov

Closes#19525

@BrunoQuaresmaBrunoQuaresma self-assigned thisSep 30, 2025
@BrunoQuaresmaBrunoQuaresma changed the titlefeat: add remove task into the tasks listfeat: add remove task button into the tasks listSep 30, 2025
Copy link
Member

@ParkreinerParkreiner left a comment

Choose a reason for hiding this comment

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

I think this is in a solid spot. My main concern is having a dialog component associated with each individual task, but I'm willing to punt that work until we know that it's causing performance problems

Comment on lines +187 to +193
<TaskDeleteDialog
task={task}
open={isDeleteDialogOpen}
onClose={()=>{
setIsDeleteDialogOpen(false);
}}
/>
Copy link
Member

Choose a reason for hiding this comment

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

Do we necessarily want to mount a deletion dialog for each individual task? We would only ever have one open at a time, and while theConfirmDialog shouldn't load any DOM nodes while closed, we're still making JSX for each one

Wondering if we could have something like a piece ofactiveTaskId state, and then that affects the content and logic that gets fed into the main dialog. Then, if it starts off asnull, thenull case would be treated as closed, and all other values would be treated as open

BrunoQuaresma reacted with thumbs up emoji
Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

Rendering the delete dialog within the row follows the same philosophy as dropdowns: only one is open at a time, but we handle it per row. I know placement matters, but performance-wise I’d expect it to be similar.

Another point: keeping state in the list would re-render the entire list, whereas putting it inside the row means only that row re-renders, which should be more performant. Also, controlling state from the parent adds indirection; following the principle of colocation, keeping state close to where it’s used tends to make the code easier to reason about.

Does that make sense?

Copy link
Member

@code-ashercode-asher left a comment
edited
Loading

Choose a reason for hiding this comment

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

Looks good! Should we show "deleting" in the status column (and possibly disable the delete button)? Right now it looks like nothing happens when deleting a task, until it finally disappears (actually I wonder if we should show the task state only if the workspace is running, otherwise we should show the workspace state, or show both at least).

It also gets a bit wonky if you try to delete a task while the workspace is in a transition state like stopping or starting (it says "resource not found").

But possibly this will be resolved later, I recall you mentioned there was some work to be done for how this data is fetched to be displayed on the page.

exportconstDeleteTaskSuccess:Story={
decorators:[withGlobalSnackbar],
args:{
open:true,
Copy link
Member

Choose a reason for hiding this comment

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

Do we also need to pass intask andonClose since those are non-optional args?

BrunoQuaresma reacted with thumbs up emoji
Copy link
CollaboratorAuthor

@BrunoQuaresmaBrunoQuaresmaOct 1, 2025
edited
Loading

Choose a reason for hiding this comment

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

It’s not necessary, and Storybook won’t complain about it, or it is what I would expect but I see some storybook errors related toonClose.

Copy link
Member

Choose a reason for hiding this comment

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

Ah yeah I noticed there is no actual enforcement of the types in Storybook tests, but really seems like there should be. 🤔 Seems weird to discard type safety for tests.

getErrorDetail(error),
);
}finally{
props.onClose();
Copy link
Member

Choose a reason for hiding this comment

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

Just curious if there is a reasononSuccess is being destructured above but notonClose.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

onSuccess isn’t part of theConfirmDialog props—that’s the only reason.

Copy link
Member

Choose a reason for hiding this comment

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

I might be misunderstanding, butonClose is not a part ofConfirmDialog props either? BothonClose andonSuccess are called in thisonConfirm callback, so it looks inconsistent.

No big deal though, just wondered if there was a reason for it or was just random.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

You're right, my bad.

@bpmct
Copy link
Member

Bulk actions next? 👀

@bpmct
Copy link
Member

For later discussions, I think it's cool how codex supports archiving

Screen.Recording.2025-09-30.at.5.51.05.PM.mov

@BrunoQuaresma
Copy link
CollaboratorAuthor

Bulk actions next? 👀

That could definitely be a good next step.

For later discussions, I think it's cool how codex supports archiving

Agreed—that would be a nice feature. We’d need to define what “archiving” means in terms of resource usage and data retention.

@BrunoQuaresmaBrunoQuaresma merged commitf23a6a1 intomainOct 1, 2025
32 checks passed
@BrunoQuaresmaBrunoQuaresma deleted the bq/add-remove-task-on-table branchOctober 1, 2025 18:37
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 1, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@code-ashercode-ashercode-asher approved these changes

@ParkreinerParkreinerParkreiner approved these changes

@aslilacaslilacAwaiting requested review from aslilacaslilac is a code owner

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Implement an easier way to kill task
4 participants
@BrunoQuaresma@bpmct@Parkreiner@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp