Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(inbox): turn compact rows off by default again (MUL-9927) (#11263)
Bohan Jiang8c32e8f2ee87
diff --git a/apps/docs/components/demos/inbox-demo.tsx b/apps/docs/components/demos/inbox-demo.tsxindex cab999cedd..fae9acacc3 100644--- a/apps/docs/components/demos/inbox-demo.tsx+++ b/apps/docs/components/demos/inbox-demo.tsx@@ -704,24 +704,35 @@ export function InboxDemo() {aria-current={active ? "page" : undefined}onClick={() => setPhase("opened")}className={cn(- "flex h-8 w-full items-center gap-2 rounded-md px-2 text-left motion-safe:animate-in motion-safe:fade-in",+ "flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left motion-safe:animate-in motion-safe:fade-in",active ? "bg-accent" : "enabled:hover:bg-accent/50",)}>- <DemoStatus status={statusOf(notice.id)} />- <span- className={cn(- "min-w-0 flex-1 truncate text-body",- rowUnread ? "font-medium text-foreground" : "text-muted-foreground",- )}- >- {notice.title}+ <span className="mt-[3px] flex shrink-0">+ <DemoStatus status={statusOf(notice.id)} />+ </span>+ <span className="flex min-w-0 flex-1 flex-col">+ <span className="flex min-w-0 items-center gap-2 leading-5">+ <span+ className={cn(+ "min-w-0 flex-1 truncate text-body",+ rowUnread ? "font-medium text-foreground" : "text-muted-foreground",+ )}+ >+ {notice.title}+ </span>+ <span className="shrink-0 text-caption text-faint-foreground tabular-nums">{notice.time}</span>+ </span>+ <span className="mt-0.5 flex min-w-0 items-center gap-2 text-caption leading-4 text-muted-foreground">+ <span className="flex min-w-0 flex-1 items-center gap-1.5">+ <RowAvatar name={notice.actor} agent={notice.agent} />+ <span className="min-w-0 flex-1 truncate">+ <span className="font-medium">{notice.actor}</span> {notice.detail}+ </span>+ </span>+ {rowUnread && <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-brand" />}+ </span></span>- <span className="shrink-0 text-caption text-faint-foreground tabular-nums">{notice.time}</span>- <span- aria-hidden- className={cn("size-1.5 shrink-0 rounded-full", rowUnread ? "bg-brand" : "bg-transparent")}- /></button></CoachMark></li>diff --git a/apps/docs/content/docs/inbox.fr.mdx b/apps/docs/content/docs/inbox.fr.mdxindex f2c69e0c77..a7b065872d 100644--- a/apps/docs/content/docs/inbox.fr.mdx+++ b/apps/docs/content/docs/inbox.fr.mdx@@ -12,7 +12,7 @@ La boîte de réception rassemble l'activité de travail qui vous concerne et siLa boîte de réception est une section du panneau **Travail**, sous les épingles et au-dessus des vues et des projets ; sans épingle, c'est la première section. Son en-tête porte trois onglets : **Boîte de réception**, **Reportés** et **Archivées**. Le nombre de non-lus s'affiche à côté de **Boîte de réception** et en badge sur **Travail** dans la barre d'applications ; un clic droit sur **Travail** propose **Tout marquer comme lu**.-L'onglet **Boîte de réception** affiche une ligne par tâche, de la plus récente à la plus ancienne, lues et non lues confondues. Une ligne montre le statut de la tâche, son titre et l'heure ; un point signale une ligne non lue. Désactivez **Lignes compactes** dans les réglages d'affichage pour ajouter qui a fait quoi sur une deuxième ligne. Survolez une ligne pour ouvrir une carte avec le titre complet, le commentaire, et **Ouvrir**, **Marquer comme lu** et **Archiver**.+L'onglet **Boîte de réception** affiche une ligne par tâche, de la plus récente à la plus ancienne, lues et non lues confondues. Une ligne montre le statut de la tâche, son titre et l'heure, et qui a fait quoi sur une deuxième ligne ; un point signale une ligne non lue. Activez **Lignes compactes** dans les réglages d'affichage pour garder chaque ligne sur une seule ligne. Survolez une ligne pour ouvrir une carte avec le titre complet, le commentaire, et **Ouvrir**, **Marquer comme lu** et **Archiver**.Sur téléphone, le panneau Travail se trouve dans le tiroir. Sa section Boîte de réception se termine par **Toutes les notifications**, qui ouvre la page Boîte de réception avec sa propre liste, les mêmes trois onglets et ses filtres.@@ -152,7 +152,7 @@ Une notification ultérieure sur la tâche revient dans la boîte de réception.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, activé par défaut ; désactivé, chaque ligne ajoute qui a fait quoi sur une deuxième ligne.+- **Lignes compactes** : une seule ligne par notification, sans qui a fait quoi. Désactivé par défaut.- **Nombre de non lus** : le nombre à côté du titre de la section.- **Badge de non lus sur Travail** : le badge sur Travail dans la barre d'applications.diff --git a/apps/docs/content/docs/inbox.ja.mdx b/apps/docs/content/docs/inbox.ja.mdxindex 77c7069f8c..7b09fd23a7 100644--- a/apps/docs/content/docs/inbox.ja.mdx+++ b/apps/docs/content/docs/inbox.ja.mdx@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";インボックスは **作業** パネルのセクションで、ピン留め済みの下、ビューとプロジェクトの上にあります。ピン留めがないときは最初のセクションになります。見出しには **インボックス**、**スヌーズ中**、**アーカイブ済み** の 3 つのタブがあります。未読数は **インボックス** の横と、アプリレールの **作業** のバッジに表示されます。**作業** を右クリックすると **すべて既読にする** を使えます。-**インボックス** タブにはタスクごとに 1 行ずつ、新しい順に、既読・未読を問わず並びます。行にはタスクのステータス、タイトルと時刻が表示され、未読の行にはドットが付きます。表示設定で **コンパクト表示** をオフにすると、誰が何をしたかが 2 行目に加わります。行にカーソルを合わせると、タイトル全文とコメントを表示するカードが開き、**開く**、**既読にする**、**アーカイブ** を使えます。+**インボックス** タブにはタスクごとに 1 行ずつ、新しい順に、既読・未読を問わず並びます。行にはタスクのステータス、タイトルと時刻、2 行目に誰が何をしたかが表示され、未読の行にはドットが付きます。表示設定で **コンパクト表示** をオンにすると、各行が 1 行になります。行にカーソルを合わせると、タイトル全文とコメントを表示するカードが開き、**開く**、**既読にする**、**アーカイブ** を使えます。スマートフォンでは、作業パネルはドロワーの中にあります。そのインボックスセクションの末尾にある **すべての通知** から、独自のリスト、同じ 3 つのタブ、フィルターを持つインボックスページを開けます。@@ -152,7 +152,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1wインボックスセクションの見出しにある設定ボタンで表示設定を開けます。この設定はこのデバイスにだけ保存されます。- **表示件数**:5、10、20 件。残りは「さらに N 件を表示」の行にまとまります。-- **コンパクト表示**:1 件を 1 行で表示します。既定でオンで、オフにすると誰が何をしたかが 2 行目に加わります。+- **コンパクト表示**:1 件を 1 行で表示し、誰が何をしたかは表示しません。既定ではオフです。- **未読数**:セクション名の横の数字です。- **「作業」に未読バッジを表示**:アプリレールの作業のバッジです。diff --git a/apps/docs/content/docs/inbox.ko.mdx b/apps/docs/content/docs/inbox.ko.mdxindex 0756509459..34e81e9458 100644--- a/apps/docs/content/docs/inbox.ko.mdx+++ b/apps/docs/content/docs/inbox.ko.mdx@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";인박스는 **작업** 패널의 섹션으로, 고정됨 아래, 뷰와 프로젝트 위에 있습니다. 고정한 항목이 없으면 첫 번째 섹션이 됩니다. 섹션 제목에는 **인박스**, **미뤄둔 항목**, **보관됨** 세 개의 탭이 있습니다. 읽지 않은 수는 **인박스** 옆과 앱 레일의 **작업** 배지에 표시됩니다. **작업**을 오른쪽 클릭하면 **모두 읽음으로 표시**를 쓸 수 있습니다.-**인박스** 탭에는 태스크마다 한 행씩, 최신순으로, 읽음 여부와 관계없이 표시됩니다. 행에는 태스크 상태, 제목과 시간이 보이고, 읽지 않은 행에는 점이 붙습니다. 표시 설정에서 **간결하게 표시**를 끄면 누가 무엇을 했는지가 두 번째 줄에 더해집니다. 행 위에 마우스를 올리면 전체 제목과 댓글이 담긴 카드가 열리고, **열기**, **읽음으로 표시**, **보관**을 쓸 수 있습니다.+**인박스** 탭에는 태스크마다 한 행씩, 최신순으로, 읽음 여부와 관계없이 표시됩니다. 행에는 태스크 상태, 제목과 시간, 그리고 두 번째 줄에 누가 무엇을 했는지가 보이고, 읽지 않은 행에는 점이 붙습니다. 표시 설정에서 **간결하게 표시**를 켜면 각 행이 한 줄로 줄어듭니다. 행 위에 마우스를 올리면 전체 제목과 댓글이 담긴 카드가 열리고, **열기**, **읽음으로 표시**, **보관**을 쓸 수 있습니다.휴대폰에서는 작업 패널이 서랍 안에 있습니다. 그 인박스 섹션 맨 아래의 **모든 알림**을 누르면 자체 목록, 같은 세 개의 탭, 필터가 있는 인박스 페이지가 열립니다.@@ -152,7 +152,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 1778527726..2b6a74562a 100644--- a/apps/docs/content/docs/inbox.mdx+++ b/apps/docs/content/docs/inbox.mdx@@ -12,7 +12,7 @@ The inbox collects the work activity that concerns you and flags where somethingThe inbox is a section of the **Work** panel, below Pinned and above Views and Projects; with nothing pinned, it is the first section. Its header holds three tabs: **Inbox**, **Snoozed** and **Archived**. The unread count shows next to **Inbox** and as a badge on **Work** in the app rail; right-click **Work** for **Mark all as read**.-The **Inbox** tab lists one row per issue, newest first, read and unread alike. A row shows the issue's status, its title and time; a dot marks it unread. Turn off **Compact rows** in the display settings to add who did what on a second line. Hover a row for a card with the full title, the comment, and **Open**, **Mark as read**, and **Archive**.+The **Inbox** tab lists one row per issue, newest first, read and unread alike. A row shows the issue's status, its title and time, and who did what on a second line; a dot marks it unread. Turn on **Compact rows** in the display settings to keep each row to one line. Hover a row for a card with the full title, the comment, and **Open**, **Mark as read**, and **Archive**.On a phone, the Work panel sits in the drawer. Its Inbox section ends with **All notifications**, which opens the Inbox page with its own list, the same three tabs, and filters.@@ -152,7 +152,7 @@ A later notification on the issue lands in the inbox again.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, on by default; turned off, rows add who did what on a second line.+- **Compact rows**: one line per row, without who did what. Off by default.- **Unread count**: the number next to the section title.- **Unread badge on Work**: the badge on Work in the app rail.diff --git a/apps/docs/content/docs/inbox.zh-Hant.mdx b/apps/docs/content/docs/inbox.zh-Hant.mdxindex 1f2a4306dd..07ad8317ec 100644--- a/apps/docs/content/docs/inbox.zh-Hant.mdx+++ b/apps/docs/content/docs/inbox.zh-Hant.mdx@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";收件箱是**工作**面板裡的一個分區,排在固定之後、檢視和專案之前;沒有固定項時,它就是第一個分區。分區標題列有三個分頁:**收件箱**、**已延後**和**已歸檔**。未讀數顯示在**收件箱**旁,也會以角標顯示在應用側欄的**工作**上;右鍵點選**工作**可以**全部標為已讀**。-**收件箱**分頁每個任務佔一列,最新的在前,已讀和未讀都在。每列顯示任務狀態、標題和時間;未讀的列帶一個圓點。在顯示設定裡關掉**緊湊顯示**,每列會多出第二行,顯示誰做了什麼。滑鼠懸停在某列上會彈出卡片,顯示完整標題和評論內容,並提供**開啟**、**標為已讀**和**歸檔**。+**收件箱**分頁每個任務佔一列,最新的在前,已讀和未讀都在。每列顯示任務狀態、標題和時間,第二行顯示誰做了什麼;未讀的列帶一個圓點。在顯示設定裡打開**緊湊顯示**,每列只保留一行。滑鼠懸停在某列上會彈出卡片,顯示完整標題和評論內容,並提供**開啟**、**標為已讀**和**歸檔**。在手機上,工作面板收在抽屜裡。其中的收件箱分區末尾有**全部通知**,點開是收件箱頁面,帶自己的列表、同樣的三個分頁和篩選。@@ -152,7 +152,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 b404fc2af3..6ff86ebb4f 100644--- a/apps/docs/content/docs/inbox.zh.mdx+++ b/apps/docs/content/docs/inbox.zh.mdx@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";收件箱是**工作**面板里的一个分区,排在固定之后、视图和项目之前;没有固定项时,它就是第一个分区。分区标题栏有三个标签:**收件箱**、**已延后**和**已归档**。未读数显示在**收件箱**旁,也会以角标显示在应用侧栏的**工作**上;右键点击**工作**可以**全部标为已读**。-**收件箱**标签每个任务占一行,最新的在前,已读和未读都在。每行显示任务状态、标题和时间;未读的行带一个圆点。在显示设置里关掉**紧凑显示**,每行会多出第二行,显示谁做了什么。鼠标悬停在某行上会弹出卡片,显示完整标题和评论内容,并提供**打开**、**标为已读**和**归档**。+**收件箱**标签每个任务占一行,最新的在前,已读和未读都在。每行显示任务状态、标题和时间,第二行显示谁做了什么;未读的行带一个圆点。在显示设置里打开**紧凑显示**,每行只保留一行。鼠标悬停在某行上会弹出卡片,显示完整标题和评论内容,并提供**打开**、**标为已读**和**归档**。在手机上,工作面板收在抽屉里。其中的收件箱分区末尾有**全部通知**,点开是收件箱页面,带自己的列表、同样的三个标签和筛选。@@ -152,7 +152,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w收件箱分区标题栏的设置按钮会打开它的显示设置,只保存在当前设备上:- **显示条数**:5、10 或 20 条;其余的收在"再显示 N 项"里。-- **紧凑显示**:每行只占一行高度,默认开启;关掉后每行多出第二行,显示谁做了什么。+- **紧凑显示**:每行只占一行高度,不显示谁做了什么。默认关闭。- **未读数量**:分区标题旁的数字。- **在"工作"上显示未读数**:应用侧栏里工作上的角标。diff --git a/packages/core/issues/stores/sidebar-tree-store.test.ts b/packages/core/issues/stores/sidebar-tree-store.test.tsindex 45638389a9..a84dd6563f 100644--- a/packages/core/issues/stores/sidebar-tree-store.test.ts+++ b/packages/core/issues/stores/sidebar-tree-store.test.ts@@ -1,7 +1,7 @@// @vitest-environment jsdomimport { afterEach, beforeEach, describe, expect, it } from "vitest";import { setCurrentWorkspace } from "../../platform/workspace-storage";-import { useSidebarTreeStore } from "./sidebar-tree-store";+import { DEFAULT_SIDEBAR_INBOX_SETTINGS, useSidebarTreeStore } from "./sidebar-tree-store";beforeEach(() => {localStorage.clear();@@ -65,26 +65,39 @@ describe("useSidebarTreeStore", () => {expect(state.needsAttentionCollapsed).toBe(false);});- it("makes the Inbox section compact once for preferences stored before it was the default", async () => {- localStorage.setItem("multica_sidebar_tree:before", JSON.stringify({- state: { inboxSettings: { limit: 10, showCount: false, railBadge: true, compact: false } },- version: 0,+ it("keeps Inbox rows off compact by default, and undoes the one-time compact switch", async () => {+ expect(DEFAULT_SIDEBAR_INBOX_SETTINGS.compact).toBe(false);++ // Version 1 forced compact on; that value goes back to off.+ localStorage.setItem("multica_sidebar_tree:forced", JSON.stringify({+ state: { inboxSettings: { limit: 10, showCount: false, railBadge: true, compact: true } },+ version: 1,}));- setCurrentWorkspace("before", "ws-before");+ setCurrentWorkspace("forced", "ws-forced");await Promise.resolve();expect(useSidebarTreeStore.getState().inboxSettings).toEqual({limit: 10,showCount: false,railBadge: true,- compact: true,+ compact: false,});- localStorage.setItem("multica_sidebar_tree:after", JSON.stringify({- state: { inboxSettings: { limit: 5, showCount: true, railBadge: true, compact: false } },- version: 1,+ // A copy that never ran version 1 keeps the user's own choice.+ localStorage.setItem("multica_sidebar_tree:chosen", JSON.stringify({+ state: { inboxSettings: { limit: 5, showCount: true, railBadge: true, compact: true } },+ version: 0,+ }));+ setCurrentWorkspace("chosen", "ws-chosen");+ await Promise.resolve();+ expect(useSidebarTreeStore.getState().inboxSettings.compact).toBe(true);++ // A choice made after this version stays.+ localStorage.setItem("multica_sidebar_tree:current", JSON.stringify({+ state: { inboxSettings: { limit: 5, showCount: true, railBadge: true, compact: true } },+ version: 2,}));- setCurrentWorkspace("after", "ws-after");+ setCurrentWorkspace("current", "ws-current");await Promise.resolve();- expect(useSidebarTreeStore.getState().inboxSettings.compact).toBe(false);+ expect(useSidebarTreeStore.getState().inboxSettings.compact).toBe(true);});});diff --git a/packages/core/issues/stores/sidebar-tree-store.ts b/packages/core/issues/stores/sidebar-tree-store.tsindex 87de33da71..9d45c9ff49 100644--- a/packages/core/issues/stores/sidebar-tree-store.ts+++ b/packages/core/issues/stores/sidebar-tree-store.ts@@ -68,7 +68,7 @@ export const DEFAULT_SIDEBAR_INBOX_SETTINGS: SidebarInboxSettings = {limit: 5,showCount: true,railBadge: true,- compact: true,+ compact: false,};export interface SidebarLocateRequest {@@ -177,13 +177,15 @@ export const useSidebarTreeStore = create<SidebarTreeState>()({name: "multica_sidebar_tree",storage: createJSONStorage(() => createWorkspaceAwareStorage(defaultStorage)),- // 1: the Inbox section became compact by default. Every device had- // stored the old default, which says nothing about a choice, so each- // one starts compact once.- version: 1,+ // 1: the Inbox section briefly became compact by default, and turned+ // compact on once for every stored copy.+ // 2: compact is off by default again. A version-1 copy holds that forced+ // value rather than a choice, so it goes back to off once; an older copy+ // never ran version 1 and keeps what the user picked.+ version: 2,migrate: (persisted, version) => {const p = (persisted ?? {}) as Partial<PersistedSidebarTree>;- if (version < 1 && p.inboxSettings) return { ...p, inboxSettings: { ...p.inboxSettings, compact: true } };+ if (version === 1 && p.inboxSettings) return { ...p, inboxSettings: { ...p.inboxSettings, compact: false } };return p;},partialize: (state): PersistedSidebarTree => ({