Skip to content

Commit db8c208

Browse files
feat(dashboard): Give each Inbox item its own row, and stack notices too
An item row is always one actionable item. A lone ask in To do, Up for grabs, FYI, or Snoozed now shows its own row, which opens in place, not its Conversation's row. Conversation rows stay in the Conversation sections. Every Review item now names its root Conversation the same way: rootConversationId, from the root that each Conversation stores, at any depth. A child's item also has addedByLabel. The search reads the same join as before, so the cost does not change. Snooze all snoozes each item of the stack, so an item that arrives later shows by itself while the rest stay in Snoozed. Snooze all and Dismiss all put the whole stack away with the row's leave motion, and the next row after the stack opens. FYI notices stack by root, as asks do.
1 parent 24e3f91 commit db8c208

32 files changed

Lines changed: 371 additions & 366 deletions

‎design/inbox.md‎

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# Inbox
22

3-
The Inbox is the dashboard view of the Review desk. It shows the open Review
4-
items for the viewer as rows. The rows of one root Conversation sit together
5-
in a stack: a light border under the root's title. The viewer answers,
6-
dismisses, or snoozes each row on its own. `./review-desk.md` owns who sees
7-
an item and who can act on it.
3+
The Inbox shows the open Review items for the viewer, one item row each.
4+
The rows of one root Conversation sit together in a stack: a light border
5+
under the root's title. The viewer answers, dismisses, or snoozes each row
6+
on its own. `./review-desk.md` owns who sees an item and who can act on it.
87

98
## Intent
109

1110
- One stack for each root Conversation. People start and follow root
1211
Conversations. They usually do not know which Threads and Tasks run under
1312
a root, or their names. An item from a child agent shows in the stack of
1413
its root, not on its own.
15-
- Each Review item is its own row, with its own actions. An action never
16-
applies to a group of items. A pull request review and a question are
14+
- Each Review item is its own row, with its own actions. An item row is
15+
always one actionable item, such as a question or a pull request. A
16+
Conversation row is a different row, for the Conversation sections. A
17+
row action never applies to a group of items. A pull request review and a question are
1718
different decisions, and one click must not make both.
1819
- The reader finishes one Conversation before the next. Next goes to the
1920
next row in the same stack first, so the context that the reader just
@@ -24,8 +25,8 @@ an item and who can act on it.
2425

2526
## Entry points
2627

27-
- Dashboard: Inbox, with To do, Up for grabs, the Conversation sections,
28-
and Snoozed.
28+
- Dashboard: Inbox, with To do, Up for grabs, FYI, the Conversation
29+
sections, and Snoozed.
2930
- The stack title, which opens the root Conversation.
3031
- A row click, which opens the row and its answer form.
3132
- On each row, on hover: Open, Snooze, and Dismiss, as icons with their
@@ -39,20 +40,21 @@ an item and who can act on it.
3940

4041
Grouping:
4142

42-
- A child Conversation, at any depth, rolls up to its root. The row shows a
43-
quiet label that names the child, such as its Thread title, so the reader
44-
knows which sub-thread asked.
43+
- A child Conversation, at any depth, rolls up to its root. Every item has
44+
the same root field, read from the root that each Conversation stores, so
45+
depth costs nothing. The row shows a quiet label that names the child,
46+
such as its Thread title, so the reader knows which sub-thread asked.
4547
- An item rolls up only when the viewer can see its root, as
4648
`../policies/conversation-access.md` says. Otherwise it groups under the
4749
Conversation that added it. The viewer never sees a title, a name, or a
4850
root that they cannot see.
49-
- A Conversation with one item shows its normal row, with no border. A click
50-
on that row opens the Conversation.
51+
- A Conversation with one item shows that item's row, with no border. A
52+
click on it opens the row, as in a stack.
5153
- A stack of more than four rows shows the first four and "+N more in this
5254
Conversation". That control shows the rest in place. A stack also shows
5355
the rest when its open row is past the first four.
54-
- The Conversations view keeps one row per Conversation, with Pin and
55-
Archive. Stacks are for the Inbox and Snoozed.
56+
- The Conversation sections keep one Conversation row each, with Pin and
57+
Archive. Stacks are for To do, Up for grabs, FYI, and Snoozed.
5658

5759
Actions:
5860

@@ -65,12 +67,15 @@ Actions:
6567
- When an open row leaves, the next row of its stack opens, also past the
6668
fold. After the last row of the stack, the row before it opens. When the
6769
stack has no other row, the next row of the list opens.
68-
- When a stack shrinks to one row, that row becomes the normal row of its
69-
Conversation. An open row stays open.
70+
- When a stack shrinks to one row, the border goes and the row stays. An
71+
open row stays open.
72+
- Snooze all and Dismiss all put the whole stack away with the same leave
73+
motion as a row. When a row of the stack was open, the next row after the
74+
stack opens.
7075
- In To do, a stack leaves with its last row that waits on the viewer, and
7176
the next row of the list opens.
72-
- Notices do not stack. A notice about the subject of an ask folds into the
73-
ask's row. Other notices show in FYI, one row each.
77+
- A notice about the subject of an ask folds into the ask's row. Other
78+
notices show in FYI, stacked by root as asks are, one row each.
7479

7580
Order and counts:
7681

@@ -86,15 +91,15 @@ Order and counts:
8691
Snooze:
8792

8893
- Snooze on a row puts away only that item. It wakes at its time.
89-
- Snooze all on a stack puts away every row in it. It wakes at its time, or
90-
when the stack gets a newer item, also from a child.
94+
- Snooze all on a stack snoozes each of its items until the same time. An
95+
item that arrives later is not snoozed: it shows in the Inbox by itself,
96+
and the rest stay in Snoozed.
9197
- Snoozed shows each snoozed row in the stack of its root. Wake on a row
92-
wakes only that item. The other rows of a Snooze all stay snoozed.
98+
wakes only that item.
9399

94100
## Gaps
95101

96102
- A stack shows only the root's title. The Conversation row's kind pills,
97103
Brief, and activity do not show for a root with more than one item.
98-
- Snooze all and Dismiss all have no leave motion. The stack goes at once.
99104
- A snooze lives in one browser. Another browser of the same viewer shows
100-
the item.
105+
the item. Server snoozes (getsentry/junior#3567, #3392) close this gap.

‎packages/junior-dashboard/e2e/command-palette.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const CLOSED_ISSUE_ID = "agent-dispatch:event-1";
88

99
const question = {
1010
addedByConversationId: CLOSED_ISSUE_ID,
11+
rootConversationId: CLOSED_ISSUE_ID,
1112
assignedToEveryone: false,
1213
assignees: [
1314
{

‎packages/junior-dashboard/e2e/conversations-attention.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ async function mockWaitingConversation(
7878
{
7979
...reviewItem,
8080
addedByConversationId: waitingId,
81+
rootConversationId: waitingId,
8182
conversationIds: [waitingId],
8283
},
8384
]

‎packages/junior-dashboard/e2e/conversations-event-log.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ for (const view of [desktop, mobile]) {
760760
).json();
761761
const item = {
762762
addedByConversationId: conversationId,
763+
rootConversationId: conversationId,
763764
assignedToEveryone: false,
764765
assignees: [
765766
{

‎packages/junior-dashboard/e2e/inbox/command-palette.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test.describe("new UI", { tag: "@new" }, () => {
1212

1313
const question = {
1414
addedByConversationId: CLOSED_ISSUE_ID,
15+
rootConversationId: CLOSED_ISSUE_ID,
1516
assignedToEveryone: false,
1617
assignees: [
1718
{
@@ -310,7 +311,9 @@ test.describe("new UI", { tag: "@new" }, () => {
310311
.click();
311312
await expect(page).toHaveURL(/\/\?view=snoozed$/);
312313
const asks = page.getByRole("region", { name: /: asks$/ });
313-
await expect(asks).toContainText(rollout.title);
314+
await expect(
315+
page.locator(`li[data-inbox-row="${rollout.id}"]`),
316+
).toHaveAttribute("data-expanded", "true");
314317
// It wakes from the open row.
315318
await asks.getByRole("button", { name: "Wake" }).click();
316319
await expect(page.getByText("Nothing snoozed")).toBeVisible();

‎packages/junior-dashboard/e2e/inbox/conversations-event-log.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ test.describe("new UI", { tag: "@new" }, () => {
794794
).json();
795795
const item = {
796796
addedByConversationId: conversationId,
797+
rootConversationId: conversationId,
797798
assignedToEveryone: false,
798799
assignees: [
799800
{

‎packages/junior-dashboard/e2e/inbox/inbox-answer-drafts.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test.describe("new UI", { tag: "@new" }, () => {
1414
const expand = () =>
1515
page
1616
.getByRole("region", { name: "To do" })
17-
.getByRole("button", { name: "Question" })
17+
.locator('[aria-controls^="inbox-row-"]')
1818
.first()
1919
.click();
2020

‎packages/junior-dashboard/e2e/inbox/inbox-fixture.ts‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const viewer = {
1010

1111
const base = {
1212
addedByConversationId: "slack:CREVIEW:1770003600.000200",
13+
rootConversationId: "slack:CREVIEW:1770003600.000200",
1314
assignedToEveryone: false,
1415
assignees: [viewer],
1516
canAct: true,
@@ -29,6 +30,7 @@ export const conversationId = "slack:CQA123:1770003600.000200";
2930
export const rollout = {
3031
...base,
3132
addedByConversationId: conversationId,
33+
rootConversationId: conversationId,
3234
body: "Canary error rate is flat.",
3335
createdAt: "2026-08-07T11:54:30.000Z",
3436
id: "item-rollout",
@@ -117,6 +119,7 @@ const dismissedNotice = {
117119
export const migration = {
118120
...license,
119121
addedByConversationId: conversationId,
122+
rootConversationId: conversationId,
120123
body: "The billing migration is ready.",
121124
conversationIds: [conversationId],
122125
createdAt: "2026-08-07T10:20:00.000Z",
@@ -129,6 +132,7 @@ export const migration = {
129132
export const prMerge = {
130133
...base,
131134
addedByConversationId: conversationId,
135+
rootConversationId: conversationId,
132136
body: "**Retry checkout writes after lock timeouts** is approved, and GitHub says that it can merge.",
133137
conversationIds: [conversationId],
134138
createdAt: "2026-08-07T11:00:00.000Z",
@@ -147,6 +151,7 @@ export const prMerge = {
147151
export const prReview = {
148152
...prMerge,
149153
addedByConversationId: "slack:CREVIEW:1770003600.000200",
154+
rootConversationId: "slack:CREVIEW:1770003600.000200",
150155
body: "GitHub asks you to review **Pin the release train**.",
151156
conversationIds: [],
152157
createdAt: "2026-08-07T09:00:00.000Z",
@@ -174,6 +179,7 @@ const pinPullRequest = {
174179
export const pinReview = {
175180
...base,
176181
addedByConversationId: releaseConversationId,
182+
rootConversationId: releaseConversationId,
177183
body: "GitHub asks you to review #91.\n\nhttps://github.com/getsentry/payments/pull/91",
178184
conversationIds: [releaseConversationId],
179185
createdAt: "2026-08-07T09:20:00.000Z",
@@ -197,6 +203,7 @@ export const pinConflict = {
197203
export const releaseNotes = {
198204
...base,
199205
addedByConversationId: releaseConversationId,
206+
rootConversationId: releaseConversationId,
200207
body: "Release notes for 0.288.0 are drafted in the release PR.",
201208
conversationIds: [releaseConversationId],
202209
createdAt: "2026-08-07T09:30:00.000Z",
@@ -209,6 +216,7 @@ export const releaseNotes = {
209216
export const digest = {
210217
...base,
211218
addedByConversationId: "scheduler:daily-ops-digest",
219+
rootConversationId: "scheduler:daily-ops-digest",
212220
assignedToEveryone: true,
213221
assignees: [],
214222
body: "The digest skipped two noisy alerts.",
@@ -223,6 +231,7 @@ export const digest = {
223231
export const grab = {
224232
...base,
225233
addedByConversationId: "slack:CGRAB:1770003600.000300",
234+
rootConversationId: "slack:CGRAB:1770003600.000300",
226235
assignedToEveryone: true,
227236
assignees: [],
228237
body: "The usual on-call is out on Friday.",
@@ -449,12 +458,11 @@ export async function openRow(head: Locator) {
449458
.click();
450459
}
451460

452-
/** Expand the Inbox row whose head is `head` in place, with an ask pill. */
461+
/**
462+
* Expand the Inbox row whose head is `head` in place: an item row with its
463+
* head, a Conversation row with an ask pill.
464+
*/
453465
export async function expandRow(head: Locator) {
454466
const row = head.locator("xpath=ancestor::*[@data-inbox-row][1]");
455-
await row
456-
.getByRole("button")
457-
.and(row.locator('[aria-controls^="inbox-row-"]'))
458-
.first()
459-
.click();
467+
await row.locator('[aria-controls^="inbox-row-"]').first().click();
460468
}

‎packages/junior-dashboard/e2e/inbox/inbox-motion.spec.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,13 @@ test.describe("new UI", { tag: "@new" }, () => {
208208
{
209209
...license,
210210
addedByConversationId: "slack:CLICENSE:1770003600.000400",
211+
rootConversationId: "slack:CLICENSE:1770003600.000400",
211212
createdAt: "2026-08-07T08:10:00.000Z",
212213
},
213214
{
214215
...audit,
215216
addedByConversationId: "slack:CAUDIT:1770003600.000500",
217+
rootConversationId: "slack:CAUDIT:1770003600.000500",
216218
createdAt: "2026-08-07T08:20:00.000Z",
217219
},
218220
];
@@ -243,9 +245,7 @@ test.describe("new UI", { tag: "@new" }, () => {
243245
await refocus();
244246
},
245247
row: (index: number) =>
246-
page.locator(
247-
`li[data-inbox-row="todo:${asks[index]!.addedByConversationId}"]`,
248-
),
248+
page.locator(`li[data-inbox-row="todo:${asks[index]!.id}"]`),
249249
};
250250
}
251251

@@ -314,12 +314,13 @@ test.describe("new UI", { tag: "@new" }, () => {
314314
const newer = {
315315
...license,
316316
addedByConversationId: "slack:CNEWER:1770003600.000600",
317+
rootConversationId: "slack:CNEWER:1770003600.000600",
317318
createdAt: "2026-08-07T08:30:00.000Z",
318319
id: "item-newer",
319320
};
320321
await asks.addAndRefocus(newer);
321322
await expect(
322-
page.locator(`li[data-inbox-row="todo:${newer.addedByConversationId}"]`),
323+
page.locator(`li[data-inbox-row="todo:${newer.id}"]`),
323324
).toBeVisible();
324325
await page.evaluate(
325326
() =>

‎packages/junior-dashboard/e2e/inbox/inbox-navigation.spec.ts‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,16 @@ test.describe("new UI", { tag: "@new" }, () => {
283283
// The linked item is past the first page, so its row loads on its own.
284284
await mockReviewItems(page, { open: [audit, rollout], pageSize: 1 });
285285
await page.goto(`${dashboard.baseURL}/?view=inbox&item=${rollout.id}`);
286-
const asks = page.getByRole("region", { name: `${checkout}: asks` });
287-
await expect(asks).toContainText(rollout.title);
286+
const linkedRow = page.locator(`li[data-inbox-row="todo:${rollout.id}"]`);
287+
await expect(linkedRow).toHaveAttribute("data-expanded", "true");
288288

289289
const primary = page.getByRole("navigation", { name: "Primary" });
290290
await primary.getByRole("link", { name: /^Automations/ }).click();
291291
await expect(page).toHaveURL(/\/automations/);
292292
await primary.getByRole("link", { name: /^Inbox/ }).click();
293293
// `/` and `/?view=inbox` are one list with one place.
294294
await expect(page).toHaveURL(/\/(\?view=inbox)?$/);
295-
await expect(asks).toContainText(rollout.title);
295+
await expect(linkedRow).toHaveAttribute("data-expanded", "true");
296296
});
297297

298298
test("an item link past the shown rows opens its row in view", async ({
@@ -654,11 +654,12 @@ test.describe("new UI", { tag: "@new" }, () => {
654654
dashboard,
655655
page,
656656
}) => {
657-
// One ask, so the Conversation shows its normal row, not a stack.
657+
// A Conversations row names its Conversation; an Inbox row names its
658+
// item.
658659
await mockReviewItems(page, { open: [rollout] });
659-
await page.goto(`${dashboard.baseURL}/`);
660-
const todo = page.getByRole("region", { name: "To do" });
661-
const head = rowHead(todo, checkout);
660+
await page.goto(`${dashboard.baseURL}/?view=conversations`);
661+
const list = page.getByRole("region", { name: "Conversations" });
662+
const head = rowHead(list, checkout);
662663
const row = head.locator("xpath=ancestor::*[@data-inbox-row][1]");
663664
const asks = page.getByRole("region", { name: `${checkout}: asks` });
664665

@@ -690,12 +691,12 @@ test.describe("new UI", { tag: "@new" }, () => {
690691
]);
691692
await expect(middle).toHaveURL(/\/conversations\//);
692693
await middle.close();
693-
await expect(page).toHaveURL(`${dashboard.baseURL}/`);
694+
await expect(page).toHaveURL(`${dashboard.baseURL}/?view=conversations`);
694695

695696
// An ask pill expands the row in place.
696697
await expandRow(head);
697698
await expect(asks).toBeVisible();
698-
await expect(page).toHaveURL(`${dashboard.baseURL}/`);
699+
await expect(page).toHaveURL(`${dashboard.baseURL}/?view=conversations`);
699700
await asks.getByRole("link", { name: "Open conversation" }).click();
700701
await expect(page).toHaveURL(/\/conversations\//);
701702
await page.goBack();

0 commit comments

Comments
 (0)