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(icons): stop the agent sparkle from turning (#9025)
gbirman7bee9b6f4097
diff --git a/apps/web/src/components/icon/system/README.md b/apps/web/src/components/icon/system/README.mdindex 98777574d9..6d5bd760f3 100644--- a/apps/web/src/components/icon/system/README.md+++ b/apps/web/src/components/icon/system/README.md@@ -100,8 +100,9 @@ All existing and newly authored `data-macro-icon` SVGs inherit this behavior.- Keep feedback brief and finite: 320 ms on press, 280 ms on hover. Use a smallpress-and-settle, a restrained turn for settings, tilt for folders/mail,or lift for sharing. Do not bounce continuously or delay the action.-- Hover is limited to search, settings, add, and agent glyphs after 160 ms of+- Hover is limited to search, settings, and add glyphs after 160 ms ofpointer intent. Touch does not trigger hover. Most icons respond only to press.+ The agent sparkle never turns; it only presses and settles.- Animate the drawing, never its label, hit target, selection background, orlayout. Individual transform properties preserve existing layout transforms.- Put `data-icon-motion-target` on a fixed-size wrapper when an action swaps SVGsdiff --git a/apps/web/src/components/icon/system/icon-motion.test.ts b/apps/web/src/components/icon/system/icon-motion.test.tsindex 514bc75db1..e922817f87 100644--- a/apps/web/src/components/icon/system/icon-motion.test.ts+++ b/apps/web/src/components/icon/system/icon-motion.test.ts@@ -165,6 +165,15 @@ it('limits hover to suitable icons and ignores touch hover', () => {expect(animate).not.toHaveBeenCalled();});+it('keeps the agent sparkle from turning on hover or press', () => {+ const button = control('sparkle');+ pointer(button, 'pointerover');+ vi.advanceTimersByTime(200);+ expect(animate).not.toHaveBeenCalled();+ pointer(button);+ expect(animate.mock.calls[0][0][1].rotate).toBe('0deg');+});+it('respects reduced motion immediately and cancels active animations on change', () => {const button = control();pointer(button);diff --git a/apps/web/src/components/icon/system/icon-motion.ts b/apps/web/src/components/icon/system/icon-motion.tsindex 5ecf678281..19fac47a49 100644--- a/apps/web/src/components/icon/system/icon-motion.ts+++ b/apps/web/src/components/icon/system/icon-motion.ts@@ -5,7 +5,7 @@ const EXCLUDED ='[data-icon-motion="none"], [disabled], [aria-disabled="true"], [aria-busy="true"], [inert], .animate-spin, .animate-pulse';const STATE_ICON =/^(caret|caret-double|arrow|arrows|spinner|circle|dot|check|minus|warning|x)(-|$)/;-const HOVER_ICON = /^(magnifying-glass|gear|gear-six|plus|sparkle)$/;+const HOVER_ICON = /^(magnifying-glass|gear|gear-six|plus)$/;function controlAt(target: EventTarget | null) {return target instanceof Element@@ -35,7 +35,7 @@ function frames(name: string, hover: boolean): Keyframe[] {if (/^gear/.test(name)) rotate = hover ? '12deg' : '24deg';else if (/^(bell|phone)/.test(name)) rotate = '-10deg';else if (/^(envelope|folder|paperclip)/.test(name)) rotate = '-6deg';- else if (/^(sparkle|plus)/.test(name)) rotate = hover ? '8deg' : '15deg';+ else if (/^plus/.test(name)) rotate = hover ? '8deg' : '15deg';else if (/^(share|upload|paper-plane)/.test(name)) translate = '0 -2px';else if (/^magnifying-glass/.test(name)) translate = '1px -1px';return [