-
Notifications
You must be signed in to change notification settings - Fork 970
feat(desktop): confirm before removing workspace from sidebar #4524
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ import { create } from "zustand"; | |
|
|
||
| export interface RemoveFromSidebarTarget { | ||
| workspaceId: string; | ||
| workspaceName: string; | ||
| projectId: string; | ||
| isMain: boolean; | ||
| tick: number; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/desktop/src/renderer/stores/remove-workspace-from-sidebar-intent.ts
Line: 8
Comment:
**`tick` is now dead state**
`tick` is incremented on every `request()` call but is no longer consumed anywhere — the old `useEffect` guard (`target.tick === lastTickRef.current`) was removed when `RemoveFromSidebarMount` became an `AlertDialog`. The dialog open/close state is driven entirely by `!!target`, so the field serves no runtime purpose. Consider removing `tick` from `RemoveFromSidebarTarget` and the `request` implementation to avoid confusion for future readers.
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ButtonbypassesAlertDialogaccessibility primitivesRadix UI's
AlertDialogActionandAlertDialogCancelcarry built-in accessibility semantics for thealertdialogrole —AlertDialogCancelreceives focus by default on open, and both handle keyboard dismiss correctly with their ARIA roles. Using plainButtoncomponents means those semantics are absent. The current implementation works visually, but screen readers and keyboard-only users may not get the expected cancel-first focus order or the correct element roles.Prompt To Fix With AI