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(web): stop the magic chip PR row leaving stale hover patches (#7056)
Wolf Mermelstein299792525ed6
diff --git a/apps/web/src/features/block-agent/debug/Gallery.tsx b/apps/web/src/features/block-agent/debug/Gallery.tsxindex 4e17c9eee0..427aead5ac 100644--- a/apps/web/src/features/block-agent/debug/Gallery.tsx+++ b/apps/web/src/features/block-agent/debug/Gallery.tsx@@ -915,12 +915,18 @@ const GALLERY_CHIP_HEADER = {};/** The chip through a turn: booting, writing, and done. */-function MagicChipStateDemo(props: { presentation: MagicChipPresentation }) {+function MagicChipStateDemo(props: {+ presentation: MagicChipPresentation;+ pullRequestUrl?: string;+}) {return (<MagicChipViewagentSessionId="gallery"presentation={props.presentation}- header={GALLERY_CHIP_HEADER}+ header={{+ ...GALLERY_CHIP_HEADER,+ pullRequestUrl: props.pullRequestUrl,+ }}onOpen={() => console.log('[gallery] open session')}/>);@@ -1021,6 +1027,13 @@ export default function AgentUiGallery() {'**Fixed.** The incremental machine now handles the replay; `cargo test -p agent_fold` passes.',}}/>+ <MagicChipStateDemo+ presentation={{+ kind: 'settled',+ markdown: 'Opened a pull request.',+ }}+ pullRequestUrl="https://github.com/macro-inc/macro/pull/7045"+ /></Item><Item label="MagicChip asking (form, url, tool draft)">diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/MagicChip/MagicChipPullRequest.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/MagicChip/MagicChipPullRequest.tsxindex a275e39949..dd45a2c207 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/MagicChip/MagicChipPullRequest.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/MagicChip/MagicChipPullRequest.tsx@@ -76,6 +76,9 @@ export const MagicChipPullRequest: Component<{ url: string }> = (props) => {</Show></>);+ // Hover swaps the row's translucent fill. The button's gradient overlay+ // stacked on that fill repaints only behind the text boxes, leaving stale+ // patches.return (<Showwhen={entity()}@@ -90,7 +93,8 @@ export const MagicChipPullRequest: Component<{ url: string }> = (props) => {size: 'sm',fullWidth: true,noTouchResize: true,- class: 'h-8 min-w-0 justify-start rounded-lg bg-hover p-2',+ class:+ 'h-8 min-w-0 justify-start rounded-lg bg-hover p-2 transition-none not-touch:not-disabled:hover:bg-active not-touch:not-disabled:hover:bg-none not-disabled:active:bg-none',})}data-magic-chip-pull-request={props.url}on:click={(event) => event.stopPropagation()}@@ -105,7 +109,7 @@ export const MagicChipPullRequest: Component<{ url: string }> = (props) => {size="sm"fullWidthnoTouchResize- class="h-8 min-w-0 justify-start rounded-lg bg-hover p-2"+ class="h-8 min-w-0 justify-start rounded-lg bg-hover p-2 transition-none not-touch:not-disabled:hover:bg-active not-touch:not-disabled:hover:bg-none not-disabled:active:bg-none"aria-label={label()}data-magic-chip-pull-request={props.url}on:click={(event) => {