diff --git a/.changeset/34589-inbox-right-panel.md b/.changeset/34589-inbox-right-panel.md
new file mode 100644
index 00000000000..42f95fb86ff
--- /dev/null
+++ b/.changeset/34589-inbox-right-panel.md
@@ -0,0 +1,18 @@
+---
+'@object-ui/app-shell': patch
+'@object-ui/i18n': patch
+---
+
+feat(app-shell): the notification bell opens a full-height panel on the right, with pending approvals on top and decidable in place
+
+Clause-②: yes (widening) — two new locale keys in the `notifications` namespace of every `@object-ui/i18n` pack (`needsYou`, `viewApprovalDetails`); nothing that worked before is refused
+Metadata-protocol: none
+
+The bell in the console header (and the `global:notifications` page block) used to open a 384 px popover whose lists stopped at 320 px, about three rows. It now opens a panel the full height of the window on the right, 440 px wide, and the lists take all the height the header and tabs leave.
+
+- **The page stays usable.** The panel has no overlay, and a click in the page does not close it. Opening a notification takes the page to its record while the panel stays open on the next one. The panel closes from its close button, Escape or the bell, and it gives way when the record drawer opens, so the two never stack on the right.
+- **Approvals come first.** The Notifications tab opens with "Needs your action": the pending approval requests the bell counts, each with its approve and reject buttons and "View details". The buttons are the request's own declared actions (`approval_approve`, `approval_reject` at `list_item`), run through the same declared-actions bar the request's record page uses. So a viewer sees a button only when its `visible` rule passes, a request that needs decision fields collects them in the action's dialog, and the request sent is the declared one. A decided request leaves the list and the badge at once, and the approvals are read again. The Approvals tab lists the same requests.
+- **"Mark read" is an icon** that shows when a row is hovered or focused, instead of a column on every row. "Mark all read" and "View all notifications" stay.
+- **On a phone the panel fills the screen**, and following a link closes it.
+
+The notification data, its grouping and the three tabs are unchanged.
diff --git a/ui/packages/app-shell/src/hooks/__tests__/sharedInboxFeed.twoSurfaces.test.tsx b/ui/packages/app-shell/src/hooks/__tests__/sharedInboxFeed.twoSurfaces.test.tsx
index b197ca7f872..986044b1172 100644
--- a/ui/packages/app-shell/src/hooks/__tests__/sharedInboxFeed.twoSurfaces.test.tsx
+++ b/ui/packages/app-shell/src/hooks/__tests__/sharedInboxFeed.twoSurfaces.test.tsx
@@ -114,9 +114,10 @@ vi.mock('@object-ui/components', async (importOriginal) => {
Avatar: Pass,
AvatarImage: () => null,
AvatarFallback: Pass,
- Popover: Pass,
- PopoverTrigger: Pass,
- PopoverContent: Pass,
+ Sheet: Pass,
+ SheetTrigger: Pass,
+ SheetContent: Pass,
+ SheetTitle: Pass,
Tabs: Pass,
TabsList: Pass,
TabsTrigger: ({ children }: any) => ,
diff --git a/ui/packages/app-shell/src/hooks/__tests__/useHomeInbox.myWork-12602.test.tsx b/ui/packages/app-shell/src/hooks/__tests__/useHomeInbox.myWork-12602.test.tsx
index a6120a772d2..26141fb0d5e 100644
--- a/ui/packages/app-shell/src/hooks/__tests__/useHomeInbox.myWork-12602.test.tsx
+++ b/ui/packages/app-shell/src/hooks/__tests__/useHomeInbox.myWork-12602.test.tsx
@@ -96,9 +96,11 @@ describe('the approval requests behind the count (objectui#12602)', () => {
// The count is the answer's `total`, the route's own count — not a fold
// of the page (objectui#13027). This fixture's route totals its 3 rows.
expect(result.current.pendingApprovalsCount).toBe(3);
+ // `row` is the served row itself — the inbox panel's dispatch record for
+ // the request's declared actions (objectstack#34589).
expect(result.current.pendingApprovals).toEqual([
- { id: 'a1', processName: 'discount', processLabel: 'Discount approval', recordTitle: 'QUO-0007', createdAt: '2026-10-16T01:00:00Z' },
- { id: 'a2', processName: 'contract', processLabel: undefined, recordTitle: undefined, createdAt: undefined },
+ { id: 'a1', processName: 'discount', processLabel: 'Discount approval', recordTitle: 'QUO-0007', createdAt: '2026-10-16T01:00:00Z', row: rows[0] },
+ { id: 'a2', processName: 'contract', processLabel: undefined, recordTitle: undefined, createdAt: undefined, row: rows[2] },
]);
});
diff --git a/ui/packages/app-shell/src/hooks/sharedUserFeeds.ts b/ui/packages/app-shell/src/hooks/sharedUserFeeds.ts
index f8036dc7af3..45aeb3d4314 100644
--- a/ui/packages/app-shell/src/hooks/sharedUserFeeds.ts
+++ b/ui/packages/app-shell/src/hooks/sharedUserFeeds.ts
@@ -831,6 +831,15 @@ export interface PendingApprovalRequest {
/** The flow's machine name, as served. */
processName?: string;
createdAt?: string;
+ /**
+ * The request row as the approvals list served it, carrying the
+ * server-computed `viewer` block (`can_act`, `can_override`). It is the
+ * dispatch record the inbox panel hands `DeclaredActionsBar`, so an inline
+ * Approve / Reject runs the request's own declared action, gated by its own
+ * `visible` predicate, and resolves `{id}` from this row (objectstack#34589).
+ * Optional so a surface that only lists titles builds the shape without it.
+ */
+ row?: Record;
}
/**
@@ -1019,6 +1028,7 @@ export function useSharedPendingApprovalRequests(): SharedFeedSnapshot<{
recordTitle: str(row.record_title),
processName: str(row.process_name),
createdAt: str(row.created_at),
+ row,
});
}
return { requests, total };
@@ -1615,6 +1625,16 @@ export function notifyUserFeedPushed(feed: 'inbox' | 'approvals'): void {
(feed === 'inbox' ? inboxFeed : approvalsFeed).pushedChange();
}
+/**
+ * Read the pending approvals once, now: a decision taken in this tab changed
+ * them, so the bell badge and every list cut from the feed must not wait for
+ * the next poll to drop the decided request (objectstack#34589). Same refresh
+ * {@link notifyUserFeedPushed} runs for a pushed change. Package-internal.
+ */
+export function refreshSharedPendingApprovals(): void {
+ approvalsFeed.pushedChange();
+}
+
/**
* Test seam: drop every shared feed's cached value, key and in-flight state so
* cases do not inherit each other's reads. Not part of the public surface.
diff --git a/ui/packages/app-shell/src/hooks/useInboxBell.ts b/ui/packages/app-shell/src/hooks/useInboxBell.ts
index 0872d022e0e..fb2cda55a61 100644
--- a/ui/packages/app-shell/src/hooks/useInboxBell.ts
+++ b/ui/packages/app-shell/src/hooks/useInboxBell.ts
@@ -23,7 +23,7 @@
* One hook, two consumers — the two surfaces have no representable state in
* which they disagree, because there is no second read and no second overlay.
*
- * NOTHING is fetched here: `useSharedInboxFeed` / `useSharedPendingApprovalsCount`
+ * NOTHING is fetched here: `useSharedInboxFeed` / `useSharedPendingApprovalRequests`
* own the polling, its cadence, its hidden-tab throttle and its failure backoff.
* This hook adds only the optimistic read overlay and the mark-read writes.
*
@@ -31,7 +31,13 @@
*/
import { useCallback, useMemo, useState } from 'react';
import { bearerAuthHeaders } from '../utils/authToken.js';
-import { useSharedInboxFeed, useSharedPendingApprovalsCount, type SharedFeedStatus } from './sharedUserFeeds.js';
+import {
+ refreshSharedPendingApprovals,
+ useSharedInboxFeed,
+ useSharedPendingApprovalRequests,
+ type PendingApprovalRequest,
+ type SharedFeedStatus,
+} from './sharedUserFeeds.js';
import { useInboxArrivalNotifier } from './useInboxArrivalNotifier.js';
import type { InboxNotification } from '../layout/inboxGrouping.js';
@@ -54,6 +60,13 @@ export interface InboxBell {
unreadCount: number;
/** The badge's second addend — pending approvals waiting on this user. */
pendingApprovalsCount: number;
+ /**
+ * The first page of those requests, from the same one read as the count —
+ * the rows the inbox panel pins under "Needs your action" (objectstack#34589).
+ */
+ pendingApprovals: PendingApprovalRequest[];
+ /** Re-read the approvals now — after a decision taken from the panel. */
+ refreshPendingApprovals: () => void;
markAllRead: () => Promise;
markRead: (id: string) => Promise;
markManyRead: (ids: string[]) => Promise;
@@ -95,7 +108,9 @@ export function useInboxBell(): InboxBell {
* Shared with Home's To-do card (#4197): one polled request serves both, so
* the badge and the card can no longer disagree.
*/
- const pendingApprovalsCount = useSharedPendingApprovalsCount();
+ const { value: approvalPage } = useSharedPendingApprovalRequests();
+ const pendingApprovalsCount = approvalPage.total;
+ const pendingApprovals = approvalPage.requests;
const unreadCount = notifications.reduce((n, x) => n + (x.is_read ? 0 : 1), 0);
@@ -182,6 +197,8 @@ export function useInboxBell(): InboxBell {
status,
unreadCount,
pendingApprovalsCount,
+ pendingApprovals,
+ refreshPendingApprovals: refreshSharedPendingApprovals,
markAllRead,
markRead,
markManyRead,
diff --git a/ui/packages/app-shell/src/layout/AppHeader.tsx b/ui/packages/app-shell/src/layout/AppHeader.tsx
index 58464aba442..f0ce66e5e09 100644
--- a/ui/packages/app-shell/src/layout/AppHeader.tsx
+++ b/ui/packages/app-shell/src/layout/AppHeader.tsx
@@ -576,6 +576,8 @@ export function AppHeader({
notifications,
unreadCount,
pendingApprovalsCount,
+ pendingApprovals,
+ refreshPendingApprovals,
markAllRead,
markRead: markNotificationRead,
markManyRead,
@@ -1138,6 +1140,8 @@ export function AppHeader({
onMarkAllRead={markAllRead}
onMarkRead={markNotificationRead}
onMarkManyRead={markManyRead}
+ pendingApprovals={pendingApprovals}
+ onApprovalDecided={refreshPendingApprovals}
/>
diff --git a/ui/packages/app-shell/src/layout/InboxApprovalItem.tsx b/ui/packages/app-shell/src/layout/InboxApprovalItem.tsx
new file mode 100644
index 00000000000..d988439ce68
--- /dev/null
+++ b/ui/packages/app-shell/src/layout/InboxApprovalItem.tsx
@@ -0,0 +1,90 @@
+/**
+ * ObjectUI
+ * Copyright (c) 2024-present ObjectStack Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+/**
+ * One pending approval request in the inbox panel, decidable in place
+ * (objectstack#34589).
+ *
+ * The decision levers are NOT drawn here: they are the request's own declared
+ * actions at `list_item` (`approval_approve`, `approval_reject` on
+ * `sys_approval_request`), run through `DeclaredActionsBar` — the governed
+ * path the record page and the decision panel already run them through. So
+ * whether a viewer sees a lever is the action's own `visible` predicate over
+ * the row's server-computed `viewer` block, a request that asks for decision
+ * outputs collects them in the action's param dialog, and the request a click
+ * sends is the declared one. No third approvals client is written here.
+ *
+ * "View details" opens the request in the Approvals inbox, the target Home's
+ * "My work" approvals row opens.
+ *
+ * @module
+ */
+
+import { useObjectTranslation, useDisplayLocale } from '@object-ui/i18n';
+import type { PendingApprovalRequest } from '../hooks/sharedUserFeeds.js';
+import { DeclaredActionsBar } from '../views/DeclaredActionsBar.js';
+import { timeAgo } from '../utils/relativeTime.js';
+
+/** The object whose declared actions decide a request. */
+const APPROVAL_REQUEST_OBJECT = 'sys_approval_request';
+
+/** The declared location of the inline levers (approve / reject). */
+const INLINE_DECISION_LOCATION = 'list_item';
+
+/** The phone tap floor, as the rest of the panel spells it. */
+const PHONE_TAP = 'max-md:min-h-11';
+
+/** The flow's label and the record's title, as Home's approvals row names it. */
+export function approvalRequestTitle(r: PendingApprovalRequest): string {
+ return [r.processLabel || r.processName, r.recordTitle].filter(Boolean).join(' · ') || r.id;
+}
+
+export interface InboxApprovalItemProps {
+ request: PendingApprovalRequest;
+ /** Open the request in the Approvals inbox. */
+ onOpen: (request: PendingApprovalRequest) => void;
+ /** A declared action on this request succeeded. */
+ onDecided: (request: PendingApprovalRequest) => void;
+}
+
+export function InboxApprovalItem({ request, onOpen, onDecided }: InboxApprovalItemProps) {
+ const { t } = useObjectTranslation();
+ const displayLocale = useDisplayLocale();
+ return (
+
+ );
+}
diff --git a/ui/packages/app-shell/src/layout/InboxPopover.tsx b/ui/packages/app-shell/src/layout/InboxPopover.tsx
index dc6f78fa498..f9b18dfe6dd 100644
--- a/ui/packages/app-shell/src/layout/InboxPopover.tsx
+++ b/ui/packages/app-shell/src/layout/InboxPopover.tsx
@@ -8,7 +8,14 @@
* - Activity (the recent activity the caller may read; no tab at all for a
* caller without read on `sys_activity`, objectui#12081)
*
- * Rendered as a single bell button + popover with a tabbed body. The badge
+ * Rendered as a single bell button + a full-height panel on the right with a
+ * tabbed body (objectstack#34589): the page beside it stays visible and usable,
+ * so opening a notification lands its record in the page while the panel
+ * stays open on the next one. Pending approvals are pinned on top of the
+ * Notifications tab under "Needs your action", each decidable in place
+ * through the request's own declared actions. The panel yields when the record
+ * drawer opens (the two never stack on the right), and fills a phone. The
+ * badge
* shows the combined unread pressure — distinct unread *topics* + pending
* approvals — so a recurring notification (e.g. a scheduled digest that fires
* once a minute) can't inflate the badge to "9+" on its own (#2765).
@@ -22,20 +29,22 @@
*/
import { useState, useEffect, useRef, useMemo } from 'react';
-import { useNavigate, useParams } from 'react-router-dom';
+import { useLocation, useNavigate, useParams } from 'react-router-dom';
import {
Button,
- Popover,
- PopoverContent,
- PopoverTrigger,
+ Sheet,
+ SheetContent,
+ SheetTitle,
+ SheetTrigger,
Tabs,
TabsList,
TabsTrigger,
TabsContent,
+ useIsMobile,
} from '@object-ui/components';
-import { Bell, CheckSquare, Activity as ActivityIcon, ChevronRight, CircleAlert, Lock } from 'lucide-react';
+import { Bell, Check, CheckSquare, Activity as ActivityIcon, ChevronRight, CircleAlert, Lock } from 'lucide-react';
import { useObjectTranslation, useDisplayLocale } from '@object-ui/i18n';
-import type { ActivityFeedReading } from '../hooks/sharedUserFeeds.js';
+import type { ActivityFeedReading, PendingApprovalRequest } from '../hooks/sharedUserFeeds.js';
import { useNavigationContext } from '../context/NavigationContext.js';
import { useMetadata } from '../providers/MetadataProvider.js';
import { resolveHostAppSegment } from '../utils/appRoute.js';
@@ -45,6 +54,8 @@ import type { InboxNotification, NotificationGroup } from './inboxGrouping.js';
import { openInboxNotification } from './openInboxNotification.js';
import { ActivityObjectLabel } from './ActivityObjectLabel.js';
import { confirmUnsavedLeave } from '../chrome/unsavedEdits.js';
+import { RECORD_DRAWER_PARAM } from '../urlParams.js';
+import { InboxApprovalItem } from './InboxApprovalItem.js';
// Re-exported so importers of the notification/group shapes keep resolving
// through this module (the pure logic itself lives in inboxGrouping.ts).
@@ -113,10 +124,28 @@ const PHONE_TAP = 'max-md:min-h-11';
/**
* Below `md` the three tabs share the strip by content width with their icons
- * dropped, so the third tab is not pushed past a 359 px popover.
+ * dropped, so the third tab is never pushed off a phone's width.
*/
const TAB_TRIGGER_CLASS = `text-xs gap-1.5 data-[state=active]:bg-transparent ${PHONE_TAP} max-md:flex-auto max-md:px-1.5`;
+/**
+ * The panel (objectstack#34589): the full height of the viewport on the right,
+ * 440 px wide from `md` up and the whole screen below it, a flex column whose
+ * open tab takes the height the header and tab strip leave.
+ */
+const PANEL_CLASS = 'flex w-full max-w-none flex-col gap-0 p-0 sm:max-w-none md:w-[440px]';
+
+/** An open tab: fills the panel's remaining height, the rows scroll inside it. */
+const TAB_PANEL_CLASS = 'm-0 flex min-h-0 flex-1 flex-col';
+
+/**
+ * The per-row "mark read" lever: an icon that shows on hover or keyboard focus
+ * instead of a column every row pays for; a phone has no hover, so it stays
+ * shown below `md`.
+ */
+const MARK_READ_ICON_CLASS =
+ 'shrink-0 self-center mr-2 inline-flex h-7 w-7 items-center justify-center rounded-md border text-muted-foreground hover:text-foreground hover:bg-accent transition-opacity opacity-0 group-hover:opacity-100 focus-visible:opacity-100 max-md:opacity-100 max-md:h-11 max-md:w-11';
+
export interface InboxPopoverProps {
notifications: InboxNotification[];
unreadCount: number;
@@ -150,16 +179,27 @@ export interface InboxPopoverProps {
* the component still works for callers that only wire the single-mark path.
*/
onMarkManyRead?: (ids: string[]) => void;
+ /**
+ * The first page of the requests `pendingApprovalsCount` counts, from the
+ * same read (objectstack#34589), pinned on top of the Notifications tab and
+ * listed in the Approvals tab. Absent ⇒ the panel lists none and keeps the
+ * count and the drill into the Approvals inbox.
+ */
+ pendingApprovals?: PendingApprovalRequest[];
+ /** A declared decision on one of them succeeded: re-read the approvals. */
+ onApprovalDecided?: () => void;
}
export function InboxPopover({
notifications,
unreadCount,
- pendingApprovalsCount,
+ pendingApprovalsCount: servedApprovalsCount,
activity,
onMarkAllRead,
onMarkRead,
onMarkManyRead,
+ pendingApprovals,
+ onApprovalDecided,
}: InboxPopoverProps) {
const { t } = useObjectTranslation();
// Every relative time below reads the DISPLAY locale, never the UI language
@@ -169,7 +209,22 @@ export function InboxPopover({
const params = useParams();
const { currentAppName } = useNavigationContext();
const { apps } = useMetadata();
+ const location = useLocation();
+ const isMobile = useIsMobile();
const [open, setOpen] = useState(false);
+ // Requests decided from this panel, hidden until the feed's re-read drops
+ // them, so a decided row leaves at once (objectstack#34589).
+ const [decidedIds, setDecidedIds] = useState>(() => new Set());
+ const shownApprovals = useMemo(
+ () => (pendingApprovals ?? []).filter((r) => !decidedIds.has(r.id)),
+ [pendingApprovals, decidedIds],
+ );
+ // The count the panel shows, less the decided requests the feed still lists:
+ // the same optimistic overlay, so the badge drops with the row.
+ const pendingApprovalsCount = Math.max(
+ 0,
+ servedApprovalsCount - ((pendingApprovals?.length ?? 0) - shownApprovals.length),
+ );
// Chosen on every open by `handleOpenChange` below, never while open, so a
// count that changes under an open popover does not move the tab.
const [tab, setTab] = useState('notifications');
@@ -195,6 +250,13 @@ export function InboxPopover({
const unreadTopics = allGroups.reduce((sum, g) => sum + (g.unreadCount > 0 ? 1 : 0), 0);
const totalBadge = unreadTopics + pendingApprovalsCount;
+
+ // The record drawer opens on the right too: the panel yields to it rather
+ // than stacking beside it (objectstack#34589).
+ const drawerRecordId = new URLSearchParams(location.search).get(RECORD_DRAWER_PARAM);
+ useEffect(() => {
+ if (drawerRecordId) setOpen(false);
+ }, [drawerRecordId]);
// The bell's accessible name carries what its badge says: the badge is
// content inside a named button, so a screen reader never reads it. Each
// non-zero addend is spelled out with the plural forms the popover's own
@@ -289,6 +351,18 @@ export function InboxPopover({
leaveTo(`/apps/${hostAppSegment}/system/approvals`);
};
+ // One request in the Approvals inbox — the target Home's "My work" approvals
+ // row opens. The panel stays open beside the page, as for a notification.
+ const openApproval = (r: PendingApprovalRequest) => {
+ if (isMobile) setOpen(false);
+ leaveTo(`/apps/${hostAppSegment}/system/approvals?request=${encodeURIComponent(r.id)}`);
+ };
+
+ const handleApprovalDecided = (r: PendingApprovalRequest) => {
+ setDecidedIds((prev) => new Set(prev).add(r.id));
+ onApprovalDecided?.();
+ };
+
const goToAllNotifications = () => {
setOpen(false);
// `?view=mine` selects the user-scoped "Notifications" view, matching the
@@ -334,12 +408,18 @@ export function InboxPopover({
// the same question. `goToAllNotifications` closes the popover and lands on
// the same `?view=mine` page the row came from, which is where a linkless
// notification can still be read in full.
+ //
+ // A followed link leaves the panel OPEN (objectstack#34589): the record
+ // lands in the page beside it and the next notification is one click away.
+ // On a phone the panel covers the page, so it closes there.
const handleNotificationClick = (n: InboxNotification) =>
openInboxNotification({ id: n.id, actionUrl: n.action_url }, hostAppSegment, {
markRead: onMarkRead,
goTo: leaveTo,
openInbox: goToAllNotifications,
- beforeFollow: () => setOpen(false),
+ beforeFollow: () => {
+ if (isMobile) setOpen(false);
+ },
});
const toggleGroup = (key: string) => {
@@ -363,10 +443,11 @@ export function InboxPopover({
// component) so it closes over `displayLocale`/`handleNotificationClick` without
// remounting the subtree on every parent render.
const renderRow = (n: InboxNotification, nested: boolean) => (
+
+ {!n.is_read && (
+
+ )}
+
+ );
+
+ // "Needs your action" (objectstack#34589): the pending requests, each
+ // decidable in place. Rendered inside one open tab at a time, so each
+ // request mounts one set of declared levers.
+ const renderApprovals = () => (
+
+ {shownApprovals.map((r) => (
+
+
+
+ ))}
+
);
return (
-
-
+
+
-
- {/* Never wider than the viewport less a 0.5 rem gutter on each side, and
- kept that far from its edges: a 375 px phone is narrower than w-96. */}
-
+ {/* Non-modal, no overlay, and a click in the page does not close it: the
+ page beside the panel stays usable (objectstack#34589). It closes on
+ its own close button, Escape, the bell, or when the record drawer
+ opens. */}
+ e.preventDefault()}
+ data-testid="inbox-panel"
+ className={PANEL_CLASS}
>
-
-
+ {/* pr-12 keeps "Mark all read" clear of the panel's close button. */}
+