Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(inbox): keep the Inbox section's display settings on their own button; filter from ⋯ (MUL-9926) (#11275)
Jiayuan Zhang7bd98011f5be
diff --git a/apps/docs/content/docs/inbox.fr.mdx b/apps/docs/content/docs/inbox.fr.mdxindex c64315eb27..f60fc439f2 100644--- a/apps/docs/content/docs/inbox.fr.mdx+++ b/apps/docs/content/docs/inbox.fr.mdx@@ -103,7 +103,7 @@ La tâche affiche une barre sous son en-tête. Elle indique qui a fait quoi, etLa suivante est la ligne suivante que la section affiche avec ses filtres actuels : vous parcourez ainsi la boîte de réception sans revenir à la liste.-Le bouton de filtre dans l'en-tête de la section restreint la liste par type de notification, date de réception et expéditeur, ou par statut et priorité de la tâche. Une section filtrée garde le bouton visible, et **Effacer les filtres** la réinitialise.+Sur les onglets **Boîte de réception** et **Archivées**, **Filtrer**, dans le menu ⋯ de la section, restreint la liste par type de notification, date de réception et expéditeur, ou par statut et priorité de la tâche. Tant que des filtres sont actifs, un bouton de filtre avec leur nombre s'affiche dans l'en-tête de la section et permet de les rouvrir ; **Effacer les filtres** les réinitialise.Dans l'onglet **Boîte de réception**, le menu ⋯ de la section regroupe les actions groupées :@@ -149,7 +149,7 @@ Une notification ultérieure sur la tâche revient dans la boîte de réception.## Affichage et types de notification-**Affichage de la boîte de réception**, dans le menu ⋯ de l'en-tête de la section (présent sur chaque onglet), ouvre ses réglages d'affichage, enregistrés sur cet appareil :+Le bouton de réglages dans l'en-tête de la section Boîte de réception ouvre ses réglages d'affichage, enregistrés sur cet appareil :- **Lignes affichées** : 5, 10 ou 20 ; une ligne « Afficher N de plus » donne accès au reste.- **Lignes compactes** : une seule ligne par notification, sans qui a fait quoi. Désactivé par défaut.diff --git a/apps/docs/content/docs/inbox.ja.mdx b/apps/docs/content/docs/inbox.ja.mdxindex 4b9f175c01..07de2d7e39 100644--- a/apps/docs/content/docs/inbox.ja.mdx+++ b/apps/docs/content/docs/inbox.ja.mdx@@ -103,7 +103,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w次の通知とは、セクションが現在のフィルターで表示している次の行のことです。リストに戻らずにインボックスを順に片付けられます。-セクション見出しのフィルターボタンでは、通知の種類、受信日時、送信者で絞り込めるほか、タスクのステータスや優先度でも絞り込めます。絞り込み中はボタンが常に表示され、**フィルターをクリア** で元に戻せます。+**インボックス** と **アーカイブ済み** タブでは、セクションの ⋯ メニューの **フィルター** で、通知の種類、受信日時、送信者で絞り込めるほか、タスクのステータスや優先度でも絞り込めます。絞り込み中はセクション見出しに条件数付きのフィルターボタンが表示され、そこから開き直せます。**フィルターをクリア** で元に戻せます。**インボックス** タブでは、セクションの ⋯ メニューに次の一括操作があります。@@ -149,7 +149,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w## 表示と通知タイプ-インボックスセクションの見出しにある ⋯ メニュー(どのタブにもあります)の **インボックスの表示** で表示設定を開けます。この設定はこのデバイスにだけ保存されます。+インボックスセクションの見出しにある設定ボタンで表示設定を開けます。この設定はこのデバイスにだけ保存されます。- **表示件数**:5、10、20 件。残りは「さらに N 件を表示」の行にまとまります。- **コンパクト表示**:1 件を 1 行で表示し、誰が何をしたかは表示しません。既定ではオフです。diff --git a/apps/docs/content/docs/inbox.ko.mdx b/apps/docs/content/docs/inbox.ko.mdxindex 964fe37802..d4280dc959 100644--- a/apps/docs/content/docs/inbox.ko.mdx+++ b/apps/docs/content/docs/inbox.ko.mdx@@ -103,7 +103,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns다음 알림은 섹션이 현재 필터로 보여 주는 다음 행입니다. 목록으로 돌아가지 않고 인박스를 차례로 처리할 수 있습니다.-섹션 제목 줄의 필터 버튼으로 알림 유형, 받은 시간, 보낸 사람으로 좁히거나 태스크의 상태와 우선순위로 좁힐 수 있습니다. 필터가 적용된 동안에는 버튼이 계속 보이며, **필터 지우기**로 되돌릴 수 있습니다.+**인박스**와 **보관됨** 탭에서는 섹션 ⋯ 메뉴의 **필터**로 알림 유형, 받은 시간, 보낸 사람으로 좁히거나 태스크의 상태와 우선순위로 좁힐 수 있습니다. 필터가 적용된 동안에는 섹션 제목 줄에 조건 수가 표시된 필터 버튼이 나타나며, 이 버튼으로 다시 열 수 있습니다. **필터 지우기**로 되돌릴 수 있습니다.**인박스** 탭에서 섹션의 ⋯ 메뉴에는 다음 일괄 작업이 있습니다.@@ -149,7 +149,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns## 표시와 알림 유형-인박스 섹션 제목 줄의 ⋯ 메뉴(모든 탭에 있음)에서 **인박스 표시**를 누르면 표시 설정이 열립니다. 이 설정은 현재 기기에만 저장됩니다.+인박스 섹션 제목 줄의 설정 버튼을 누르면 표시 설정이 열립니다. 이 설정은 현재 기기에만 저장됩니다.- **표시 개수**: 5, 10, 20개. 나머지는 "N개 더 보기" 행에 모입니다.- **간결하게 표시**: 한 항목을 한 줄로 표시하고, 누가 무엇을 했는지는 표시하지 않습니다. 기본으로 꺼져 있습니다.diff --git a/apps/docs/content/docs/inbox.mdx b/apps/docs/content/docs/inbox.mdxindex d9cdd18d8f..bb1704013a 100644--- a/apps/docs/content/docs/inbox.mdx+++ b/apps/docs/content/docs/inbox.mdx@@ -103,7 +103,7 @@ The issue shows a bar under its header. It says who did what, and when, then offThe next one is the next row the section lists under its current filters, so you can work through the inbox without going back to the list.-The filter button in the section header narrows the list by notification type, when it was received, and who it is from, or by the issue's status and priority. A filtered section keeps the button visible, and **Clear filters** resets it.+**Filter**, in the section's ⋯ menu on the **Inbox** and **Archived** tabs, narrows the list by notification type, when it was received, and who it is from, or by the issue's status and priority. While filters are set, a filter button with their count shows in the section header and reopens them; **Clear filters** resets them.On the **Inbox** tab, the section's ⋯ menu holds the bulk actions:@@ -149,7 +149,7 @@ A later notification on the issue lands in the inbox again.## Display and notification types-**Inbox display**, in the ⋯ menu of the Inbox section header on every tab, opens its display settings, which are saved on this device:+The sliders button in the Inbox section header opens its display settings, which are saved on this device:- **Rows shown**: 5, 10, or 20; a **Show more** row lists the rest.- **Compact rows**: one line per row, without who did what. Off by default.diff --git a/apps/docs/content/docs/inbox.zh-Hant.mdx b/apps/docs/content/docs/inbox.zh-Hant.mdxindex 1a0963c5d9..436a23a80e 100644--- a/apps/docs/content/docs/inbox.zh-Hant.mdx+++ b/apps/docs/content/docs/inbox.zh-Hant.mdx@@ -103,7 +103,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w"下一條"是分區在當前篩選下列出的下一列,因此不用回到列表,就能把收件箱一條條處理完。-分區標題列的篩選按鈕可以按通知類型、收到時間和來自誰篩選,也可以按任務的狀態和優先順序篩選。分區處於篩選狀態時,這個按鈕會一直顯示,點**清除篩選**即可恢復。+在**收件箱**和**已歸檔**分頁下,分區 ⋯ 選單裡的**篩選**可以按通知類型、收到時間和來自誰篩選,也可以按任務的狀態和優先順序篩選。設定了篩選條件時,分區標題列會顯示帶條件數的篩選按鈕,點它可以再次開啟篩選;點**清除篩選**即可恢復。在**收件箱**分頁下,分區的 ⋯ 選單裡有以下批次操作:@@ -149,7 +149,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w## 顯示與通知類型-收件箱分區標題列的 ⋯ 選單裡(每個分頁下都有)的**收件箱顯示**會開啟它的顯示設定,只儲存在目前裝置上:+收件箱分區標題列的設定按鈕會開啟它的顯示設定,只儲存在目前裝置上:- **顯示筆數**:5、10 或 20 筆;其餘的收在"再顯示 N 項"裡。- **緊湊顯示**:每列只佔一行高度,不顯示誰做了什麼。預設關閉。diff --git a/apps/docs/content/docs/inbox.zh.mdx b/apps/docs/content/docs/inbox.zh.mdxindex c0c55ae4e2..d63040cfb3 100644--- a/apps/docs/content/docs/inbox.zh.mdx+++ b/apps/docs/content/docs/inbox.zh.mdx@@ -103,7 +103,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w"下一条"是分区在当前筛选下列出的下一行,因此不用回到列表,就能把收件箱一条条处理完。-分区标题栏的筛选按钮可以按通知类型、收到时间和来自谁筛选,也可以按任务的状态和优先级筛选。分区处于筛选状态时,这个按钮会一直显示,点**清除筛选**即可恢复。+在**收件箱**和**已归档**标签下,分区 ⋯ 菜单里的**筛选**可以按通知类型、收到时间和来自谁筛选,也可以按任务的状态和优先级筛选。设置了筛选条件时,分区标题栏会显示带条件数的筛选按钮,点它可以再次打开筛选;点**清除筛选**即可恢复。在**收件箱**标签下,分区的 ⋯ 菜单里有以下批量操作:@@ -149,7 +149,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w## 显示与通知类型-收件箱分区标题栏的 ⋯ 菜单里(每个标签下都有)的**收件箱显示**会打开它的显示设置,只保存在当前设备上:+收件箱分区标题栏的设置按钮会打开它的显示设置,只保存在当前设备上:- **显示条数**:5、10 或 20 条;其余的收在"再显示 N 项"里。- **紧凑显示**:每行只占一行高度,不显示谁做了什么。默认关闭。diff --git a/packages/views/inbox/components/inbox-filter-menu.tsx b/packages/views/inbox/components/inbox-filter-menu.tsxindex a5e465bcfb..1f38044e4c 100644--- a/packages/views/inbox/components/inbox-filter-menu.tsx+++ b/packages/views/inbox/components/inbox-filter-menu.tsx@@ -1,6 +1,6 @@"use client";-import { useEffect, useMemo, useState, type ReactNode } from "react";+import { useEffect, useMemo, useState, type ReactNode, type RefObject } from "react";import { Filter, RotateCcw, Search } from "@multica/ui/icons";import { PRIORITY_DISPLAY_ORDER } from "@multica/core/issues/config";import { DUE_DATE_FILTERS, FILTER_NONE_VALUE } from "@multica/core/issues/stores/filter-tree";@@ -111,6 +111,15 @@ function ValueItem({);}+/** Opens the filter from another control, such as an item of a section's ⋯ menu. */+export interface InboxFilterMenuOpener {+ /** Open from this control; opening from the menu's own trigger leaves it false. */+ open: boolean;+ onClose: () => void;+ /** The control the menu hangs from and hands focus back to while opened from it. */+ anchor: RefObject<HTMLElement | null>;+}+/*** The inbox filter, shaped like the issue filter: search, the dimensions in* use pinned on top, then notification and issue fields, "is" / "is not" per@@ -127,6 +136,7 @@ export function InboxFilterMenu({activeIssueIds = EMPTY_ISSUE_IDS,archived = false,sectionTrigger,+ opener,}: {wsId: string;items: InboxItem[];@@ -140,6 +150,11 @@ export function InboxFilterMenu({* styled by the section, its menu opening to the right.*/sectionTrigger?: { className: string; activeClassName: string };+ /**+ * Opens the menu from elsewhere. The trigger then shows only while filters+ * are set, so a filtered list still says so at a glance.+ */+ opener?: InboxFilterMenuOpener;}) {const { t } = useT("inbox");const { t: tIssues } = useT("issues");@@ -149,13 +164,18 @@ export function InboxFilterMenu({const store = useInboxFilterStore.getState();const clearPriorityFilters = useInboxFilterStore((state) => state.clearPriorityFilters);const clearIssueFieldFilters = useInboxFilterStore((state) => state.clearIssueFieldFilters);- const [open, setOpen] = useState(false);+ const [ownOpen, setOwnOpen] = useState(false);+ const open = ownOpen || (opener?.open ?? false);+ // Kept from the moment the menu opens: the opener closes first, the menu's+ // close and focus return after.+ const [fromOpener, setFromOpener] = useState(false);// The body is built only while the menu is open or closing: the trigger// also sits in the always-mounted Work panel, which re-renders often.const [bodyMounted, setBodyMounted] = useState(false);const [search, setSearch] = useState("");const [activeAtOpen, setActiveAtOpen] = useState<ReadonlySet<InboxFilterKey> | null>(null);const query = search.trim().toLowerCase();+ const [wasOpen, setWasOpen] = useState(false);const { getActorName, getActorInitials, getActorAvatarUrl } = useActorName();const effectiveFilters = useMemo(@@ -165,6 +185,13 @@ export function InboxFilterMenu({const facetsQuery = useQuery({ ...archivedInboxFacetsOptions(wsId, effectiveFilters), enabled: archived && open });const facets = archived ? facetsQuery.data : undefined;const activeCount = inboxFilterCount(effectiveFilters);+ if (open !== wasOpen) {+ setWasOpen(open);+ if (open) setBodyMounted(true);+ if (open) setFromOpener(!ownOpen);+ setActiveAtOpen(open ? new Set(activeInboxFilterKeys(effectiveFilters)) : null);+ if (!open) setSearch("");+ }const chips = useInboxFilterChips(wsId, effectiveFilters);const chipByKey = new Map(chips.map((chip) => [chip.key, chip]));@@ -608,13 +635,13 @@ export function InboxFilterMenu({if (!next) setBodyMounted(false);}}onOpenChange={(next) => {- setOpen(next);- if (next) setBodyMounted(true);- setActiveAtOpen(next ? new Set(activeInboxFilterKeys(effectiveFilters)) : null);- if (!next) setSearch("");+ setOwnOpen(next);+ if (!next) opener?.onClose();}}>{sectionTrigger ? (+ // Hidden rather than unmounted: without a mounted trigger, opening a+ // submenu closes the whole menu.<DropdownMenuTriggerrender={<button@@ -625,6 +652,9 @@ export function InboxFilterMenu({"data-popup-open:bg-surface-selected data-popup-open:opacity-100",activeCount > 0 ? sectionTrigger.activeClassName : "data-popup-open:text-foreground",)}+ // Kept while the menu is open, so clearing the last filter+ // inside it does not pull the trigger out from under it.+ hidden={!!opener && activeCount === 0 && !(open && activeAtOpen !== null && activeAtOpen.size > 0)}/>}>@@ -659,6 +689,9 @@ export function InboxFilterMenu({side={sectionTrigger ? "right" : undefined}align={sectionTrigger ? "start" : "end"}sideOffset={sectionTrigger ? 8 : undefined}+ anchor={fromOpener ? opener?.anchor : undefined}+ // Back to the opener, also when the trigger hides as the last filter clears.+ finalFocus={fromOpener || activeCount === 0 ? opener?.anchor : undefined}className="w-auto min-w-64 p-0"><div data-filter-search className="flex items-center gap-1.5 border-b border-foreground/5 px-2.5 py-2">diff --git a/packages/views/layout/panels/inbox-section.test.tsx b/packages/views/layout/panels/inbox-section.test.tsxindex 24d7a282fb..0ff6ac6eba 100644--- a/packages/views/layout/panels/inbox-section.test.tsx+++ b/packages/views/layout/panels/inbox-section.test.tsx@@ -274,7 +274,8 @@ describe("InboxSection", () => {fireEvent.click(screen.getByRole("button", { name: "Clear filters" }));expect(rows()).toHaveLength(1);- expect(screen.getByRole("button", { name: "Filter inbox" })).toBeInTheDocument();+ // Unfiltered, the filter waits in the actions menu.+ expect(screen.queryByRole("button", { name: "Filter inbox" })).toBeNull();});it("puts who did what under the title, or keeps one line when compact", () => {@@ -501,12 +502,24 @@ describe("InboxSection", () => {expect(within(tablist).getByText("Snoozed")).not.toHaveClass("sr-only");});- it("opens the display settings from the actions menu", async () => {+ it("opens the display settings from their own button, as the other sections do", async () => {renderSection([item({ id: "n1", issue_id: "issue-a" })]);- expect(screen.queryByRole("button", { name: "Inbox display" })).toBeNull();+ fireEvent.click(screen.getByRole("button", { name: "Inbox display" }));+ expect(await screen.findByRole("dialog")).toBeInTheDocument();+ });++ it("opens the filter from the actions menu", async () => {+ renderSection([item({ id: "n1", issue_id: "issue-a" })]);+ expect(screen.queryByRole("button", { name: "Filter inbox" })).toBeNull();fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));- fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Inbox display" }));- expect(await screen.findByRole("dialog", { name: "Inbox display" })).toBeInTheDocument();+ fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Filter" }));+ expect(await screen.findByPlaceholderText("Filter by field or value...")).toBeInTheDocument();++ fireEvent.click(screen.getByRole("menuitem", { name: /^Read state/ }));+ fireEvent.click(await screen.findByRole("menuitemcheckbox", { name: /^Unread/ }));+ expect(useInboxFilterStore.getState().filtersByWorkspace["ws-1"]?.unreadOnly).toBe(true);+ expect(screen.getByPlaceholderText("Filter by field or value...")).toBeInTheDocument();+ expect(screen.getByRole("button", { name: "1 active filter" })).toBeInTheDocument();});it("is the whole list on a wide screen: no link out to another one, and a plain line when empty", () => {@@ -641,11 +654,8 @@ describe("InboxSection", () => {expect(tab).toHaveAttribute("aria-selected", "true");expect(rows()).toHaveLength(0);expect(screen.getByRole("link", { name: /^MUL-26/ })).toHaveAttribute("href", "/acme/inbox?view=snoozed&issue=issue-z");- // The bulk actions act on the live Inbox; the menu keeps only the display settings here.- fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));- expect(within(await screen.findByRole("menu")).getAllByRole("menuitem").map((el) => el.textContent)).toEqual([- "Inbox display",- ]);+ // The bulk actions act on the live Inbox and snoozed issues have no filter: no actions menu here.+ expect(screen.queryByRole("button", { name: "Inbox actions" })).toBeNull();fireEvent.click(screen.getByRole("button", { name: "Bring back now" }));expect(state.unsnooze).toHaveBeenCalledWith(expect.objectContaining({ id: "z1" }));diff --git a/packages/views/layout/panels/inbox-section.tsx b/packages/views/layout/panels/inbox-section.tsxindex 34f80e045a..6c0fd60748 100644--- a/packages/views/layout/panels/inbox-section.tsx+++ b/packages/views/layout/panels/inbox-section.tsx@@ -6,7 +6,7 @@ import { useVirtualizer } from "@tanstack/react-virtual";import { useQuery, useQueryClient } from "@tanstack/react-query";import { toast } from "sonner";import { useReducedMotion } from "@multica/core/appearance";-import { AlarmClock, Archive, ArchiveRestore, BellOff, BookCheck, CheckCheck, ListChecks, MoreHorizontal, SlidersHorizontal } from "@multica/ui/icons";+import { AlarmClock, Archive, ArchiveRestore, BellOff, BookCheck, CheckCheck, Filter, ListChecks, MoreHorizontal } from "@multica/ui/icons";import { IconButton } from "@multica/ui/components/common/icon-button";import { UI_EASE_OUT, UI_MOTION_DURATION } from "@multica/ui/lib/motion";import { cn } from "@multica/ui/lib/utils";@@ -199,7 +199,14 @@ export function InboxSection({}, [list.notifications]);const actionsRef = useRef<HTMLButtonElement>(null);- const [settingsOpen, setSettingsOpen] = useState(false);+ const [filterOpen, setFilterOpen] = useState(false);+ // The filter is the open tab's: a switch, from here or the Inbox page's+ // URL, closes it rather than reopening it on the next tab.+ const [filterTab, setFilterTab] = useState(tab);+ if (filterTab !== tab) {+ setFilterTab(tab);+ setFilterOpen(false);+ }const scrollRef = usePanelScrollRef();// Rows are memoized and re-render only when their own props change, not on@@ -302,23 +309,27 @@ export function InboxSection({activeIssueIds={list.activeIssueIds}archived={tab === "archived"}sectionTrigger={{- className: cn(TREE_ROW_BUTTON_CLASS, "text-muted-foreground", SECTION_SETTINGS_REVEAL_CLASS),- // A filtered list says so even while the section is not hovered.- activeClassName: "w-auto gap-0.5 px-1 text-brand opacity-100 hover:text-brand",+ className: cn(TREE_ROW_BUTTON_CLASS, "text-muted-foreground"),+ // Shown only while filters are set: a filtered list says so+ // even while the section is not hovered.+ activeClassName: "w-auto gap-0.5 px-1 text-brand hover:text-brand",}}+ opener={{ open: filterOpen, onClose: () => setFilterOpen(false), anchor: actionsRef }}+ />+ )}+ <InboxSectionSettings className={SECTION_SETTINGS_REVEAL_CLASS} />+ {tab !== "snoozed" && (+ <InboxSectionActions+ wsId={wsId}+ rows={all}+ openRowKey={openRowKey}+ bulk={tab === "inbox"}+ triggerRef={actionsRef}+ filterOpen={filterOpen}+ onOpenFilter={() => setFilterOpen(true)}+ className={SECTION_SETTINGS_REVEAL_CLASS}/>)}- <InboxSectionActions- wsId={wsId}- rows={all}- openRowKey={openRowKey}- bulk={tab === "inbox"}- triggerRef={actionsRef}- settingsOpen={settingsOpen}- onOpenSettings={() => setSettingsOpen(true)}- className={SECTION_SETTINGS_REVEAL_CLASS}- />- <InboxSectionSettings opener={{ open: settingsOpen, onOpenChange: setSettingsOpen, anchor: actionsRef }} /></div>}>@@ -502,8 +513,8 @@ function InboxSectionActions({openRowKey,bulk,triggerRef,- settingsOpen,- onOpenSettings,+ filterOpen,+ onOpenFilter,className,}: {wsId: string;@@ -512,13 +523,14 @@ function InboxSectionActions({/** Offers the bulk actions, which act on the live Inbox. */bulk: boolean;triggerRef: Ref<HTMLButtonElement>;- /** The settings hang from this menu's button, which stays shown meanwhile. */- settingsOpen: boolean;- onOpenSettings: () => void;+ /** The filter hangs from this menu's button, which stays shown meanwhile. */+ filterOpen: boolean;+ onOpenFilter: () => void;className?: string;}) {const { t } = useT("layout");const { t: tInbox } = useT("inbox");+ const { t: tIssues } = useT("issues");const qc = useQueryClient();const leave = useLeaveInboxRow();const archiveWithUndo = useArchiveInboxBatchWithUndo();@@ -577,7 +589,7 @@ function InboxSectionActions({"size-[var(--button-height-xs)]","text-muted-foreground data-popup-open:bg-surface-selected data-popup-open:text-foreground data-popup-open:opacity-100",className,- settingsOpen && "bg-surface-selected text-foreground opacity-100",+ filterOpen && "bg-surface-selected text-foreground opacity-100",)}/>}@@ -585,8 +597,13 @@ function InboxSectionActions({<MoreHorizontal className="size-3.5" /></DropdownMenuTrigger><DropdownMenuContent side="right" align="start" className="w-auto min-w-48">+ <DropdownMenuItem onClick={onOpenFilter}>+ <Filter className="size-4" />+ {tIssues(($) => $.filters.tooltip)}+ </DropdownMenuItem>{bulk && (<>+ <DropdownMenuSeparator /><DropdownMenuItemonClick={() =>markAllRead.mutate(undefined, { onError: onError(tInbox(($) => $.errors.mark_all_read_failed)) })@@ -632,13 +649,8 @@ function InboxSectionActions({<Archive className="size-4" />{tInbox(($) => $.menu.archive_all)}</DropdownMenuItem>- <DropdownMenuSeparator /></>)}- <DropdownMenuItem onClick={onOpenSettings}>- <SlidersHorizontal className="size-4" />- {t(($) => $.panels.work.inbox_settings)}- </DropdownMenuItem></DropdownMenuContent></DropdownMenu>);diff --git a/packages/views/layout/panels/sidebar-settings.tsx b/packages/views/layout/panels/sidebar-settings.tsxindex ba7717551e..a374aae7bf 100644--- a/packages/views/layout/panels/sidebar-settings.tsx+++ b/packages/views/layout/panels/sidebar-settings.tsx@@ -320,59 +320,41 @@ export function ProjectsSectionSettings({ wsId, className }: { wsId: string; cla);}-/** Opens a section's settings from another control, such as a menu item. */-export interface SectionSettingsAnchor {- open: boolean;- onOpenChange: (open: boolean) => void;- /** The control the popover hangs from and hands focus back to. */- anchor: React.RefObject<HTMLElement | null>;-}--/**- * The sliders button at the end of a section's label row, and its popover.- * With `opener`, there is no button: the popover opens from that control.- */+/** The sliders button at the end of a section's label row, and its popover. */function SectionSettingsPopover({label,className,onReset,- opener,children,}: {label: string;className?: string;/** Offered while the section's settings differ from the defaults. */onReset?: () => void;- opener?: SectionSettingsAnchor;children: React.ReactNode;}) {const { t } = useT("layout");return (- <Popover {...(opener && { open: opener.open, onOpenChange: opener.onOpenChange })}>- {!opener && (- <PopoverTrigger- render={- <button- type="button"- aria-label={label}- className={cn(- TREE_ROW_BUTTON_CLASS,- "text-muted-foreground data-popup-open:bg-surface-selected data-popup-open:text-foreground data-popup-open:opacity-100",- className,- )}- />- }- >- <SlidersHorizontal className="size-3.5" />- </PopoverTrigger>- )}+ <Popover>+ <PopoverTrigger+ render={+ <button+ type="button"+ aria-label={label}+ className={cn(+ TREE_ROW_BUTTON_CLASS,+ "text-muted-foreground data-popup-open:bg-surface-selected data-popup-open:text-foreground data-popup-open:opacity-100",+ className,+ )}+ />+ }+ >+ <SlidersHorizontal className="size-3.5" />+ </PopoverTrigger><PopoverContentside="right"align="start"sideOffset={8}- anchor={opener?.anchor}- finalFocus={opener?.anchor}- aria-label={opener ? label : undefined}className="max-h-(--available-height) w-80 gap-0 overflow-y-auto p-3">{/* Spacing separates sections — no dividers, as in the Display panel. */}@@ -450,12 +432,8 @@ function InboxNotificationTypes() {);}-/**- * The Inbox section's display, and which notifications reach the inbox. The- * section opens it from its actions menu, to keep the header's width for the- * tabs.- */-export function InboxSectionSettings({ className, opener }: { className?: string; opener?: SectionSettingsAnchor }) {+/** The Inbox section's display, and which notifications reach the inbox. */+export function InboxSectionSettings({ className }: { className?: string }) {const { t } = useT("layout");const settings = useSidebarTreeStore((s) => s.inboxSettings);const update = useSidebarTreeStore((s) => s.setInboxSettings);@@ -464,7 +442,6 @@ export function InboxSectionSettings({ className, opener }: { className?: string<SectionSettingsPopoverlabel={t(($) => $.panels.work.inbox_settings)}className={className}- opener={opener}onReset={sameSettings(settings, DEFAULT_SIDEBAR_INBOX_SETTINGS) ? undefined : () => update(DEFAULT_SIDEBAR_INBOX_SETTINGS)}><section className="space-y-3">