Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(mobile): bring back unified inbox (#6540)

Peter Chinman2ed79328d080
diff --git a/apps/web/src/components/app/app-sidebar/sidebar.tsx b/apps/web/src/components/app/app-sidebar/sidebar.tsx
index 3f8d15276f..672d9471fe 100644
--- a/apps/web/src/components/app/app-sidebar/sidebar.tsx
+++ b/apps/web/src/components/app/app-sidebar/sidebar.tsx
@@ -71,9 +71,11 @@ import { clearPressedKeys } from '@core/hotkey/state';
import { type HotkeyToken, TOKENS } from '@core/hotkey/tokens';
import type { ValidHotkey } from '@core/hotkey/types';
import { activateClosestDOMScope } from '@core/hotkey/utils';
+import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { getDisplayName, tryMacroId } from '@core/user';
import LogoIcon from '@icon/macro-logo.svg';
import { ContextMenu } from '@kobalte/core/context-menu';
+import BellIcon from '@phosphor/bell.svg';
import CaretRightIcon from '@phosphor/caret-right.svg';
import CaretUpIcon from '@phosphor/caret-up.svg';
import CompassIcon from '@phosphor/compass.svg';
@@ -179,9 +181,13 @@ const markdownDocumentsQuery = buildDocumentTypeQuery(['doc-markdown']);
const SIDEBAR_LINKS = [
{
id: 'inbox',
- label: 'Home',
+ get label() {
+ return isTouchDevice() ? 'Notifications' : 'Home';
+ },
href: LIST_VIEW_PATHS.inbox,
- icon: HomeIcon,
+ get icon() {
+ return isTouchDevice() ? BellIcon : HomeIcon;
+ },
hotkey: ['h', 'i'],
hotkeyToken: TOKENS.sidebar.goTo.inbox,
},
diff --git a/apps/web/src/components/app/mobile/mobile-dock-views.ts b/apps/web/src/components/app/mobile/mobile-dock-views.ts
index f95c3a372e..fccb2a5518 100644
--- a/apps/web/src/components/app/mobile/mobile-dock-views.ts
+++ b/apps/web/src/components/app/mobile/mobile-dock-views.ts
@@ -2,12 +2,12 @@ import { useCalendarUiFlag } from '@app/features/calendar/hooks/use-calendar-ui-
import { useFeatureFlag } from '@app/lib/analytics/posthog';
import { getIconConfig } from '@core/component/EntityIcon';
import { enableCrm } from '@core/constant/featureFlags';
-import HouseIcon from '@phosphor/house.svg';
+import BellIcon from '@phosphor/bell.svg';
+import BellFillIcon from '@phosphor-fill/bell-fill.svg';
import CalendarFillIcon from '@phosphor-fill/calendar-fill.svg';
import EmailFillIcon from '@phosphor-fill/envelope-fill.svg';
import FilesFillIcon from '@phosphor-fill/files-fill.svg';
import ChannelFillIcon from '@phosphor-fill/hash-straight-fill.svg';
-import HouseFillIcon from '@phosphor-fill/house-fill.svg';
import { createMemo } from 'solid-js';
import type { MobileDockIcon } from './MobileDockButton';
import type { MobileNavViewId } from './mobile-nav-views';
@@ -30,10 +30,10 @@ export type MobileDockView = {
const MOBILE_DOCK_VIEWS: readonly MobileDockView[] = [
{
id: 'inbox',
- label: 'Home',
- icon: HouseIcon,
- iconActive: HouseFillIcon,
- pillIcon: HouseIcon,
+ label: 'Notifications',
+ icon: BellIcon,
+ iconActive: BellFillIcon,
+ pillIcon: BellIcon,
},
{
id: 'calendar',
diff --git a/apps/web/src/components/app/split-layout/componentRegistry.tsx b/apps/web/src/components/app/split-layout/componentRegistry.tsx
index 59f2e245ba..6757ebd4b9 100644
--- a/apps/web/src/components/app/split-layout/componentRegistry.tsx
+++ b/apps/web/src/components/app/split-layout/componentRegistry.tsx
@@ -243,7 +243,7 @@ function LegacyInboxView() {
const preset = getViewPreset('inbox');
return (
<SoupView
- viewName="Home"
+ viewName={isTouchDevice() ? 'Notifications' : 'Home'}
initialFilters={preset?.filters}
initialClientFilters={preset?.clientFilters}
initialGroupBy={preset?.groupBy}
@@ -254,11 +254,15 @@ function LegacyInboxView() {
function RegisteredInboxView() {
usePageViewTracking('inbox');
- const newAppViews = useNewAppViews();
+ const newAppViews = useNewAppViews({
+ enabledLayout: () => (isTouchDevice() ? 'legacy' : 'composable'),
+ });
return (
- <Show when={newAppViews.ready()} fallback={<LoadingBlock />}>
- <Show when={newAppViews.enabled()} fallback={<LegacyInboxView />}>
- <InboxView />
+ <Show when={!isTouchDevice()} fallback={<LegacyInboxView />}>
+ <Show when={newAppViews.ready()} fallback={<LoadingBlock />}>
+ <Show when={newAppViews.enabled()} fallback={<LegacyInboxView />}>
+ <InboxView />
+ </Show>
</Show>
</Show>
);
diff --git a/docs/AGENT_GUIDE/navigation.md b/docs/AGENT_GUIDE/navigation.md
index e81e9a7252..df51163e04 100644
--- a/docs/AGENT_GUIDE/navigation.md
+++ b/docs/AGENT_GUIDE/navigation.md
@@ -8,7 +8,7 @@
| `/app/welcome` | Login page (when unauthenticated) |
| `/app/invite?token=<token>` | GTM invite welcome page ("Welcome, <first name>", Continue → signup). Links come from the staff portal, last 48h, and grant the first month of Premium free once the account is created |
| `/app/internal/invite-links` | Macro staff only (`@macro.com`): create GTM invite links and track opens, signups, and subscriptions |
-| `/app/component/inbox` | Home (notifications + recent activity) |
+| `/app/component/inbox` | Desktop: Home (notifications + recent activity); mobile: Notifications soup |
| `/app/component/mail` | Email client |
| `/app/component/channels` | Channels list |
| `/app/component/documents` | Files (documents list) |
@@ -150,7 +150,7 @@ changes roll back rather than becoming committed local favorites.
## Create menu
-On mobile, the bottom dock fits fixed-width buttons in this order: Home,
+On mobile, the bottom dock fits fixed-width buttons in this order: Notifications,
Calendar, Email, Channels, Files, Agents, Tasks, Calls, and CRM (when enabled). Calendar appears in the
dock and search scope pills only when the calendar UI flag is enabled.
Resizing the screen moves views between the dock
@@ -189,7 +189,7 @@ company-creation sheet.
The labeled glass button one row above Search opens the current page's creation
flow directly: **+ Task** on Tasks, **+ Email** on Email, **+ Message** on Channels,
-**+ Document** on Files, and **+ Event** on Calendar. On Home/Notifications,
+**+ Document** on Files, and **+ Event** on Calendar. On Notifications,
**+ New** opens a blurred backdrop and a stack of glass actions: Email, Message,
Document, Event, Task, More. Event follows the calendar UI flag; unavailable
launcher actions are omitted. The plus rotates into an X; tap it or the backdrop,
diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.md
index 31cbdb1813..fd734b38c7 100644
--- a/docs/AGENT_GUIDE/surfaces.md
+++ b/docs/AGENT_GUIDE/surfaces.md
@@ -59,9 +59,13 @@ that entity's last operation in the batch. Emitted `SoupUpdated` items are non-n
If viewer-scoped hydration finds no item, the backend logs and omits that update;
it does not imply deletion. Only explicit `GraphqlCacheDeletion` events remove records.
-## Home — `/app/component/inbox`
+## Home (desktop) / Notifications (mobile) — `/app/component/inbox`
-With the new app views enabled, Home defaults to a Signal feed merging
+Touch devices render the legacy Notifications view without waiting for the new app
+views feature flag. Desktop waits for flag readiness before choosing the new Home
+view or its legacy fallback.
+
+On desktop with the new app views enabled, Home defaults to a Signal feed merging
notifications with Activity's `touched_by_me` recents, including sent emails and
AI chats. Each entity appears once, ordered by its latest notification or own
action. On desktop, the funnel button to the right of **Home** opens **Filter Home**.
@@ -73,8 +77,7 @@ and sent mail. **Channels** controls
both channels and reply threads; **Chats** and **Agents** have separate toggles.
Unchecking every type shows an empty feed. **Reset filters** shows every type and
both read states again. A badge counts hidden types plus an active status filter.
-Read status and type selections persist. The mobile drawer offers the same
-Status choices and type checkboxes.
+Read status and type selections persist.
There are no desktop Signal/Noise tabs. A **Home** heading
labels the top left of the block, matching the **Email**, **Tasks**, **Chat**, and
**Agents** sidebar headings. The full-width **New chat** plus pill below the heading clears the preview and returns to the Home
@@ -87,7 +90,7 @@ split history restores that entry's filter selection. An explicit facet selectio
overrides saved filters. Returning through split history resets navigation to Signal.
Channel thread replies remain separate Home entries from their parent channel,
-using single-line rows and a reply arrow icon on desktop and touch devices, labeled
+using single-line rows and a reply arrow icon on desktop, labeled
with the sender and channel (for example, **Peter in #battlefield**). Channel names
prefer the current channel cache, then a matching thread notification's name,
then **Unknown channel** if neither source has a name. Selecting a
@@ -159,8 +162,13 @@ source shows a retry notice while the other source stays usable. Document typing
alone is not yet attributed by Activity; Home reflects the actions the existing
Activity system records.
-On mobile, Signal/Noise tabs and filters float above the full-height scrolling list. On iOS, rows
-fade underneath the filters and status bar using the shared top edge gradient.
+On mobile, this route always renders the original Notifications soup view,
+regardless of the new-app-views flag. The dock and search scope use the bell icon
+and **Notifications** label; Home is desktop-only. Notifications uses the existing
+Inbox presets, Signal/Noise tabs, notification cards, read/type filters, swipe
+actions, and pull-to-refresh, without Home's merged own-activity feed or chat
+starting pane. Opening a row navigates to its entity. On iOS, rows fade underneath
+the filters and status bar using the shared top edge gradient.
Notifications have three lifecycle states: `unseen`, `seen`, and `done`. Active means
unseen or seen. Viewing must not reopen a done notification; undoing done (`Ctrl+Z`