-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix(web): hide archive confirmation in settings with new sidebar #6226
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
0118351
ab04868
9637444
9a8cb71
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 |
|---|---|---|
|
|
@@ -2187,31 +2187,33 @@ export function GeneralSettingsPanel() { | |
| } | ||
| /> | ||
|
|
||
| <SettingsRow | ||
| {...searchableSetting("archive-confirmation")} | ||
| description="Require a second click on the inline archive action before a thread is archived." | ||
| resetAction={ | ||
| settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive ? ( | ||
| <SettingResetButton | ||
| label="archive confirmation" | ||
| onClick={() => | ||
| updateSettings({ | ||
| confirmThreadArchive: DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive, | ||
| }) | ||
| {settings.legacySidebarEnabled ? ( | ||
| <SettingsRow | ||
| {...searchableSetting("archive-confirmation")} | ||
| description="Require a second click on the inline archive action before a thread is archived." | ||
| resetAction={ | ||
| settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive ? ( | ||
| <SettingResetButton | ||
| label="archive confirmation" | ||
| onClick={() => | ||
| updateSettings({ | ||
| confirmThreadArchive: DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive, | ||
| }) | ||
| } | ||
| /> | ||
| ) : null | ||
| } | ||
| control={ | ||
| <Switch | ||
| checked={settings.confirmThreadArchive} | ||
| onCheckedChange={(checked) => | ||
| updateSettings({ confirmThreadArchive: Boolean(checked) }) | ||
| } | ||
| aria-label="Confirm thread archiving" | ||
| /> | ||
| ) : null | ||
| } | ||
| control={ | ||
| <Switch | ||
| checked={settings.confirmThreadArchive} | ||
| onCheckedChange={(checked) => | ||
| updateSettings({ confirmThreadArchive: Boolean(checked) }) | ||
| } | ||
| aria-label="Confirm thread archiving" | ||
| /> | ||
| } | ||
| /> | ||
| } | ||
| /> | ||
| ) : null} | ||
|
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. Hidden archive setting still appliesMedium Severity Hiding Reviewed by Cursor Bugbot for commit 9a8cb71. Configure here.
Contributor
Author
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. |
||
|
|
||
| <SettingsRow | ||
| {...searchableSetting("delete-confirmation")} | ||
|
|
||



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.
confirmThreadArchiveis not legacy-sidebar-only: the default sidebar (Sidebar.tsx:1689→ archive case at:3150) and the chat header thread menu (useThreadActionMenu.ts:86→:260, used byChatHeader.tsx) both still gate archive on it. Hiding the row here (and filteringarchive-confirmationout of the search index) leaves that confirmation dialog reachable but unconfigurable — a user who turned it on under the legacy sidebar and then switched back is stuck with it, with no row and no search hit to turn it off.Smallest fix: either keep the row rendered unconditionally (and drop
requiresLegacySidebarfrom the search item), or also scope the runtime behavior — makeSidebar.tsxanduseThreadActionMenuignoreconfirmThreadArchivewhen the legacy sidebar is off — so the control and the behavior are hidden together.If the row does stay conditional, please gate it on the shared
useLegacySidebarEnabled()hook rather than rawsettings.legacySidebarEnabled;SettingsSidebarNavuses the hook, and its hydration guard exists precisely so this decision has one source of truth.Posted via Macroscope — UI Consistency