Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(notifications-inbox): keep Mark done in one place on every card (#9925)
teofa58692740e2
diff --git a/apps/web/src/features/notifications-inbox/components/notification-row.tsx b/apps/web/src/features/notifications-inbox/components/notification-row.tsxindex 3f03faa9dd..c832c37381 100644--- a/apps/web/src/features/notifications-inbox/components/notification-row.tsx+++ b/apps/web/src/features/notifications-inbox/components/notification-row.tsx@@ -42,8 +42,9 @@ export type NotificationRowProps = {* did it, what it is about, and what was said. Choosing it opens it. Several* notifications show as a stack with paper edges, and its own button spreads them* into small cards below it, leaving this card as it was.- * With a pointer, Mark done takes the time's- * place on hover and nothing else moves; touch marks done by swiping the row. A+ * With a pointer, Mark done shows on hover in its own slot just before the+ * unread dot, held empty otherwise, so it sits in the same spot on every card+ * and nothing moves. Touch marks done by swiping the row. A* phone shows larger text, and a read card gives up its fill and fades, so unread* ones stand out at a glance.*/@@ -108,41 +109,23 @@ export function NotificationRow(props: NotificationRowProps) {theme={unifiedListMarkdownTheme}/></span>- {/* On hover Mark done takes the time's place, so nothing moves. */}- <span class="relative shrink-0">- <span- data-card-time=""- class={cn(- 'block text-xs not-touch:group-hover/notification:invisible mobile:text-[13px] mobile:leading-[18px]',- props.unseen- ? 'text-ink-extra-muted mobile:text-ink-muted'- : 'text-ink-extra-muted/80'- )}- >- {props.time}- </span>- {/* Touch marks done by swiping the row instead. */}- <span class="absolute top-1/2 -right-1.5 hidden -translate-y-1/2 not-touch:group-hover/notification:block">- <Button- size="icon-sm"- variant="ghost"- aria-label={t('notificationsInbox.markDone')}- tooltip={t('notificationsInbox.markDone')}- onClick={(event) => {- event.stopPropagation();- props.onDone();- }}- >- <CheckIcon class="size-4" />- </Button>- </span>+ <span+ data-card-time=""+ class={cn(+ 'shrink-0 text-xs mobile:text-[13px] mobile:leading-[18px]',+ props.unseen+ ? 'text-ink-extra-muted mobile:text-ink-muted'+ : 'text-ink-extra-muted/80'+ )}+ >+ {props.time}</span><Show when={isStack()}><Buttonsize="icon-xs"variant="ghost"// Its frame is taller than the line; it shouldn't grow the card.- class="-my-1 -mr-1 shrink-0 touch:-my-3"+ class="-my-1 shrink-0 touch:-my-3 touch:-mr-1"data-stack-toggle=""aria-expanded={props.unfolded}aria-label={t('notificationsInbox.stackToggle', {@@ -166,7 +149,34 @@ export function NotificationRow(props: NotificationRowProps) {/></Button></Show>- <Show when={props.unseen}>+ {/* Mark done's slot, held on every card with a pointer so the button+ shows in the same place on all of them; touch swipes instead. */}+ <span class="relative hidden size-4 shrink-0 not-touch:block">+ <span class="absolute top-1/2 left-1/2 hidden -translate-x-1/2 -translate-y-1/2 not-touch:group-hover/notification:block">+ <Button+ size="icon-sm"+ variant="ghost"+ aria-label={t('notificationsInbox.markDone')}+ tooltip={t('notificationsInbox.markDone')}+ onClick={(event) => {+ event.stopPropagation();+ props.onDone();+ }}+ >+ <CheckIcon class="size-4" />+ </Button>+ </span>+ </span>+ {/* A read card keeps the dot's room, so Mark done doesn't move. */}+ <Show+ when={props.unseen}+ fallback={+ <span+ aria-hidden="true"+ class="hidden size-1.5 shrink-0 not-touch:block"+ />+ }+ ><spanaria-label={t('notificationsInbox.unread')}data-unread-dot=""diff --git a/docs/agent-guide/notifications.md b/docs/agent-guide/notifications.mdindex 65cf83a440..b77e9712aa 100644--- a/docs/agent-guide/notifications.md+++ b/docs/agent-guide/notifications.md@@ -37,7 +37,7 @@ evenly where its paper edges sat, and every other card dims until you close it.card brings it back. Each small card opens that notification:its message or reply, its comment, or an agent's turn. A channel invite and anemail have no message of their own, so they open the channel or the thread.-A stack stays open as new notifications land. The time always shows; on hover Mark done takes its place, and nothing else moves. The author is+A stack stays open as new notifications land. The time always shows. With a pointer, the first line ends time, stack caret, Mark done, unread dot: Mark done shows on hover in a slot that stays empty otherwise, and a read card keeps the dot's room, so Mark done sits at the same spot on every card, stacked or not, read or not, and nothing moves. Touch has no Mark done button and no empty slots. The author isthe row's actor: a Macro user by first name, an agent by its bot name, or**Macro**; a row from outside Macro names its email sender, and GitHub rowskeep the GitHub login. A row type, author kind, or button this build doesn't