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(notifications): keep the desktop prompt off bottom-docked composers (#8735)

gbirman4e220235dcfb
diff --git a/.agents/rules/web/mobile.md b/.agents/rules/web/mobile.md
index 328d43ea1c..bc2fd2e1a1 100644
--- a/.agents/rules/web/mobile.md
+++ b/.agents/rules/web/mobile.md
@@ -64,8 +64,10 @@ read their code, and follow that pattern rather than inventing a new one.
dialog, or drawer is open, or while a presented pane carries
`data-holds-prompts`. Mark a full-frame touch view with it when its last
controls sit right above the dock, as the email composer, email thread and
- search results do; a prompt in the transient region would cover a sheet's
- controls.
+ search results do; on desktop, where the prompt sits in the bottom-right
+ corner, mark a composer docked at the bottom of its pane (channel and agent
+ composers, desktop only) or the view around it (email thread and composer).
+ A prompt in the transient region would cover a sheet's controls.
## Keyboard and focus
diff --git a/apps/web/src/features/agents-view/components/AgentSessionPane.tsx b/apps/web/src/features/agents-view/components/AgentSessionPane.tsx
index 9b64a12b9e..b5751da715 100644
--- a/apps/web/src/features/agents-view/components/AgentSessionPane.tsx
+++ b/apps/web/src/features/agents-view/components/AgentSessionPane.tsx
@@ -38,6 +38,7 @@ import { Permissions } from '@core/component/SharePermissions';
import { ShareTrigger } from '@core/component/TopBar/ShareButton';
import { useShareModal } from '@core/component/TopBar/shareModal';
import { useUserId } from '@core/context/user';
+import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { openExternalUrl } from '@core/util/url';
import type { AgentSessionEntity } from '@entity';
import ShareIcon from '@icon/share.svg';
@@ -271,7 +272,11 @@ function SessionContent(props: {
<div class="transcript-host">
<Transcript searchTarget={searchTarget()} />
</div>
- <div class="dock">
+ {/* The pane's last row on desktop, where the corner prompt sits. */}
+ <div
+ class="dock"
+ data-holds-prompts={isTouchDevice() ? undefined : ''}
+ >
<div class="composer-anchor flex flex-col gap-2">
<Show
when={!session()?.isArchived}
diff --git a/apps/web/src/features/block-agent/component/Block.tsx b/apps/web/src/features/block-agent/component/Block.tsx
index eeeeaaea0d..a5cff21971 100644
--- a/apps/web/src/features/block-agent/component/Block.tsx
+++ b/apps/web/src/features/block-agent/component/Block.tsx
@@ -13,6 +13,7 @@ import { useNavigatedFromJK } from '@components/app/useNavigatedFromJK';
import { useBlockId } from '@core/block';
import { LoadErrorPanel } from '@core/component/EntityLoadGate';
import { StaticMarkdownContext } from '@core/component/LexicalMarkdown/component/core/StaticMarkdown';
+import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { nativeNetworkStatus } from '@core/mobile/native-network-status';
import { createMethodRegistration } from '@core/orchestrator';
import { blockHandleSignal } from '@core/signal/load';
@@ -168,8 +169,12 @@ function AgentBlockContent(props: {
{/* Home/chat: re-enable pointer events on the accessory
contribution — the float host is pointer-transparent. */}
{/* pb matches ChannelInputContainer so the composer sits at
- the same height as the channel input. */}
- <div class="flex w-full justify-center shrink-0 px-4 pb-2.5 pointer-events-auto touch:px-(--mobile-chrome-gutter) touch:pb-0">
+ the same height as the channel input, and like it holds
+ the corner prompt while inline on desktop. */}
+ <div
+ class="flex w-full justify-center shrink-0 px-4 pb-2.5 pointer-events-auto touch:px-(--mobile-chrome-gutter) touch:pb-0"
+ data-holds-prompts={isTouchDevice() ? undefined : ''}
+ >
<div class="macro-message-width mx-auto flex flex-col gap-2">
<Show
when={!session()?.isArchived}
diff --git a/apps/web/src/features/block-chat/component/Chat.tsx b/apps/web/src/features/block-chat/component/Chat.tsx
index 36e8af0202..67b1810607 100644
--- a/apps/web/src/features/block-chat/component/Chat.tsx
+++ b/apps/web/src/features/block-chat/component/Chat.tsx
@@ -46,6 +46,7 @@ import { CustomScrollbar } from '@core/component/CustomScrollbar';
import { usePaywallState } from '@core/constant/PaywallState';
import { TOKENS } from '@core/hotkey/tokens';
import { registerScopeSignalHotkey } from '@core/hotkey/utils';
+import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { createMethodRegistration } from '@core/orchestrator';
import {
blockElementSignal,
@@ -375,8 +376,12 @@ function ChatInner(props: {
<FloatRegionOrInline region="accessory">
{/* Same wrapper as the home composer, so the box is the same width
and sits at the same offset whether a chat is being started or
- continued. */}
- <div class="mx-auto w-full max-w-3xl shrink-0 px-4 pb-3 pointer-events-auto touch:px-(--mobile-chrome-gutter) touch:pb-0">
+ continued. Inline on desktop it is the pane's last row, so the
+ corner prompt waits. */}
+ <div
+ class="mx-auto w-full max-w-3xl shrink-0 px-4 pb-3 pointer-events-auto touch:px-(--mobile-chrome-gutter) touch:pb-0"
+ data-holds-prompts={isTouchDevice() ? undefined : ''}
+ >
<ChatInput
editor={editor}
initialValue={props.loadedInputText}
diff --git a/apps/web/src/features/channel/Input/ChannelInputContainer.tsx b/apps/web/src/features/channel/Input/ChannelInputContainer.tsx
index 374c4ad6bb..7ed863279d 100644
--- a/apps/web/src/features/channel/Input/ChannelInputContainer.tsx
+++ b/apps/web/src/features/channel/Input/ChannelInputContainer.tsx
@@ -1,5 +1,11 @@
+import { isTouchDevice } from '@core/mobile/isTouchDevice';
import type { JSX } from 'solid-js';
+/**
+ * On desktop the composer is the pane's last row, where the corner prompt
+ * region sits, so persistent prompts wait while it is shown. Touch devices
+ * float it above the dock, which the phone prompt already clears.
+ */
export function ChannelInputContainer(props: {
ref?: (el: HTMLDivElement) => void;
children: JSX.Element;
@@ -7,6 +13,7 @@ export function ChannelInputContainer(props: {
return (
<div
class="pb-2.5 touch:pb-0 w-full flex justify-center **:data-input-editor-shell:max-h-[calc(60*var(--dvh,1dvh))] mobile:**:data-input-editor-shell:max-h-[calc(32*var(--dvh,1dvh))] touch:px-(--mobile-chrome-gutter) touch:pointer-events-auto"
+ data-holds-prompts={isTouchDevice() ? undefined : ''}
ref={props.ref}
>
{props.children}
diff --git a/apps/web/src/features/email-compose/views/email-compose.tsx b/apps/web/src/features/email-compose/views/email-compose.tsx
index 2a6715440f..fe3439cf5a 100644
--- a/apps/web/src/features/email-compose/views/email-compose.tsx
+++ b/apps/web/src/features/email-compose/views/email-compose.tsx
@@ -263,9 +263,7 @@ function LoadedEmailComposeView(
</Show>
<div
class="relative flex flex-col size-full min-h-0 overflow-hidden text-sm"
- data-holds-prompts={
- composeContext.presentation.isTouch() ? '' : undefined
- }
+ data-holds-prompts
>
<Show when={state.operationSource}>
{(source) => (
diff --git a/apps/web/src/features/email-thread/views/email-thread.tsx b/apps/web/src/features/email-thread/views/email-thread.tsx
index 9b9952584f..f1b2e955f0 100644
--- a/apps/web/src/features/email-thread/views/email-thread.tsx
+++ b/apps/web/src/features/email-thread/views/email-thread.tsx
@@ -115,12 +115,12 @@ export function EmailThreadView(props: EmailThreadViewProps) {
}}
>
{/* Edge-to-edge on mobile/tablet: the message list carries its own
- insets in-scroll and under-scrolls the floating chrome, so
- persistent prompts wait rather than cover its last
- attachments and actions. */}
+ insets in-scroll and under-scrolls the floating chrome. On
+ every device persistent prompts wait rather than cover its
+ last attachments, reply bar and reply composer. */}
<div
class="size-full select-none overscroll-none overflow-hidden flex flex-col"
- data-holds-prompts={isTouchDevice() ? '' : undefined}
+ data-holds-prompts
>
{props.header}
{props.actions}
diff --git a/apps/web/src/lib/core/component/Toast/ToastRegion.tsx b/apps/web/src/lib/core/component/Toast/ToastRegion.tsx
index aed574c1fb..e62bbaf0ce 100644
--- a/apps/web/src/lib/core/component/Toast/ToastRegion.tsx
+++ b/apps/web/src/lib/core/component/Toast/ToastRegion.tsx
@@ -11,8 +11,10 @@ export function ToastRegion() {
Desktop stack, bottom-right. Persistent prompts get their own region
capped at one visible card. Upload progress sits nearest the corner.
Prompts step aside while a popover, dialog, drawer, or a surface
- marked data-holds-prompts is open, so they never cover its controls;
- a holder in an inert (background) pane does not count.
+ marked data-holds-prompts is open, so they never cover its controls
+ (here: composers docked at the bottom of a pane, email threads and
+ the email composer); a holder in an inert (background) pane does not
+ count.
*/}
<div class="fixed bottom-2 right-2 m-0 p-2 sm:p-4 list-none outline-none pointer-events-none z-toast-region flex flex-col items-end gap-2">
<Toast.Region
diff --git a/docs/agent-guide/settings.md b/docs/agent-guide/settings.md
index 1a2cac9cc0..3af0887081 100644
--- a/docs/agent-guide/settings.md
+++ b/docs/agent-guide/settings.md
@@ -84,10 +84,11 @@ notification provider; macOS uses its system permission dialog. The web prompt
continues to say **Enable Browser Notifications** and uses browser permissions.
Select **Hide** to dismiss the prompt. It waits in the same region as other
prompts, one card at a time. It steps aside while a popover, dialog, drawer, or
-sheet is open (the calendar event details, for example). On touch devices it
-also waits while an email thread, the full-screen email composer, or search
-results are open, since their last controls sit where the prompt would. It comes
-back when they close.
+sheet is open (the calendar event details, for example). It also waits while an
+email thread or the email composer is open, and on touch devices while search
+results are open, since their last controls sit where the prompt would. On
+desktop it waits while a channel, DM or agent conversation shows its composer at
+the bottom of a pane. It comes back when they close.
### Notification snoozes