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 prompt off composer @ and picker menus (#8746)

gbirmanfe3d89bb919a
diff --git a/.agents/rules/web/mobile.md b/.agents/rules/web/mobile.md
index 59025214f1..af3b99c738 100644
--- a/.agents/rules/web/mobile.md
+++ b/.agents/rules/web/mobile.md
@@ -71,7 +71,9 @@ read their code, and follow that pattern rather than inventing a new one.
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, a call's control bar, desktop only) or the view around it (email
- thread and composer).
+ thread and composer). A composer's typeahead and picker menus (`@`, `:`,
+ `/`, skills, snippets, tags, GIFs) open above it and hold prompts while
+ open, on every device; give a new one the same attribute on its root.
A prompt in the transient region would cover a sheet's controls.
## Keyboard and focus
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx
index 123cea4289..2b240801c2 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx
@@ -324,6 +324,7 @@ export function ActionMenu(props: {
<Show when={isOpen()}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="w-60 cursor-default select-none z-modal-content menu-open-animation"
use:floatWithElement={floatWithElementProps()}
use:floatWithSelection={floatWithSelectionProps()}
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx
index cf444f49b1..9ec5599a87 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx
@@ -261,6 +261,7 @@ export function EmojiMenu(props: EmojiMenuProps) {
<Show when={props.menu.isOpen()}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="cursor-default select-none w-48 z-modal-content menu-open-animation"
use:floatWithSelection={{
selection: untrack(mountSelection),
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx
index 55e163baec..86a470a2ec 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx
@@ -162,6 +162,7 @@ export function FloatingGifMenu(
<Show when={menuOpen()}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="w-80 cursor-default select-none z-modal-content menu-open-animation"
use:floatWithSelection={{
selection: untrack(() => window.getSelection()),
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx
index a689c2f8e5..c699eef1f5 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx
@@ -110,6 +110,7 @@ export function InlineFollowupMenu(props: {
<Show when={props.open}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="w-64 max-w-[calc(100cqw-1rem-2px)] cursor-default select-none z-modal-content menu-open-animation"
ref={(el) => {
floatWithSelection(el, () => ({
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx
index 60533aac8b..d9193daf74 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx
@@ -735,6 +735,7 @@ function MentionsMenuInner(props: MentionsMenuProps) {
<Show when={menuOpen()}>
<ScopedPortal scope={props.portalScope} mount={props.portalMount}>
<div
+ data-holds-prompts
class="w-96 max-w-[calc(100cqw-1rem-2px)] cursor-default select-none z-modal-content"
classList={{ 'menu-open-animation': props.animate !== false }}
on:touchstart={(e) => e.stopPropagation()}
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx
index c3d9260b65..eff04d3690 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx
@@ -340,6 +340,7 @@ function SkillsMenuInner(props: SkillsMenuProps) {
<Show when={menuOpen()}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="w-96 max-w-[calc(100cqw-1rem-2px)] cursor-default select-none z-modal-content menu-open-animation"
use:floatWithSelection={{
selection: untrack(mountSelection),
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx
index f872b90987..5f182e8bf8 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx
@@ -190,6 +190,7 @@ function SnippetsMenuInner(props: SnippetsMenuProps) {
<Show when={menuOpen()}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="w-96 max-w-[calc(100cqw-1rem-2px)] cursor-default select-none z-modal-content menu-open-animation"
use:floatWithSelection={{
selection: untrack(mountSelection),
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx
index 0d22aac7e0..3561c21bcf 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx
@@ -396,6 +396,7 @@ export function TagsMenu(props: {
<Show when={props.menu.isOpen()}>
<ScopedPortal scope={props.portalScope}>
<div
+ data-holds-prompts
class="w-64 max-w-[calc(100cqw-1rem-2px)] cursor-default select-none z-modal-content menu-open-animation"
ref={(el) => {
floatWithSelection(el, () => ({
diff --git a/apps/web/src/lib/core/component/Toast/ToastRegion.tsx b/apps/web/src/lib/core/component/Toast/ToastRegion.tsx
index e62bbaf0ce..3d0ebfcead 100644
--- a/apps/web/src/lib/core/component/Toast/ToastRegion.tsx
+++ b/apps/web/src/lib/core/component/Toast/ToastRegion.tsx
@@ -12,9 +12,9 @@ export function ToastRegion() {
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
- (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.
+ (here: composers docked at the bottom of a pane, email threads, the
+ email composer, and a composer's typeahead and picker menus); 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 f1aa162c23..940dcff456 100644
--- a/docs/agent-guide/settings.md
+++ b/docs/agent-guide/settings.md
@@ -89,8 +89,10 @@ 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, and while a call is on screen (its controls, Open chat and
-the chat composer sit in that corner). It comes back once none of them is on
-screen, for example after you leave the call view or end the call.
+the chat composer sit in that corner). On every device it also waits while a
+composer's `@`, `:` or `/` menu (or its skills, snippets, tags or GIF picker) is
+open, since those open upward over the prompt. It comes back once none of them
+is on screen, for example after you leave the call view or end the call.
### Notification snoozes