Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: isolate button compositor layers to prevent active animation ghosting
Adam Eivy8943f8903706
diff --git a/client/src/components/apps/AppDetailView.jsx b/client/src/components/apps/AppDetailView.jsxindex 47f11645f1..ece646b691 100644--- a/client/src/components/apps/AppDetailView.jsx+++ b/client/src/components/apps/AppDetailView.jsx@@ -412,6 +412,7 @@ function AppDetail() {<buttononClick={handleStop}disabled={actionLoading}+ aria-busy={actionLoading === 'stop'}className="px-2 py-1 bg-port-error/20 text-port-error enabled:hover:bg-port-error/30 transition-colors disabled:opacity-50 flex items-center gap-1"><Square size={14} />@@ -420,6 +421,7 @@ function AppDetail() {<buttononClick={handleRestart}disabled={actionLoading}+ aria-busy={actionLoading === 'restart'}className="px-2 py-1 bg-port-warning/20 text-port-warning enabled:hover:bg-port-warning/30 transition-colors disabled:opacity-50 border-l border-port-border flex items-center gap-1"><RotateCcw size={14} className={actionLoading === 'restart' ? 'animate-spin' : ''} />@@ -442,6 +444,7 @@ function AppDetail() {<buttononClick={handleStart}disabled={actionLoading}+ aria-busy={actionLoading === 'start'}className="px-2 py-1 bg-port-success/20 text-port-success enabled:hover:bg-port-success/30 transition-colors disabled:opacity-50 flex items-center gap-1"><Play size={14} />diff --git a/client/src/components/apps/AppDetailView.test.jsx b/client/src/components/apps/AppDetailView.test.jsxindex 8679d68ad0..99818cfa0d 100644--- a/client/src/components/apps/AppDetailView.test.jsx+++ b/client/src/components/apps/AppDetailView.test.jsx@@ -17,6 +17,10 @@ vi.mock('../../services/api', () => ({getApp: vi.fn(),getProcessesList: vi.fn(),launchNativeApp: vi.fn(),+ buildApp: vi.fn(),+ stopApp: vi.fn(),+ restartApp: vi.fn(),+ startApp: vi.fn(),}));vi.mock('../../services/socket', () => ({@@ -346,3 +350,29 @@ describe('native launch realtime status', () => {expect(socketHandlers.has('connect')).toBe(false);});});++describe('action button active states and aria-busy', () => {+ it('sets aria-busy and shows spinning state during build', async () => {+ let resolveBuild;+ const buildPromise = new Promise((resolve) => { resolveBuild = resolve; });+ api.buildApp.mockReturnValue(buildPromise);+ api.getApp.mockResolvedValue({ ...APP, buildCommand: 'npm run build' });++ renderDetail();+ const buildBtn = await screen.findByRole('button', { name: /Build production UI/ });+ expect(buildBtn).toHaveAttribute('aria-busy', 'false');+ expect(buildBtn).not.toBeDisabled();++ fireEvent.click(buildBtn);+ expect(buildBtn).toHaveAttribute('aria-busy', 'true');+ expect(buildBtn).toBeDisabled();+ expect(buildBtn.querySelector('.animate-spin')).toBeInTheDocument();++ await act(async () => {+ resolveBuild({ success: true });+ });+ expect(buildBtn).toHaveAttribute('aria-busy', 'false');+ expect(buildBtn).not.toBeDisabled();+ });+});+diff --git a/client/src/index.css b/client/src/index.cssindex a6d7e0128b..1b707f80e5 100644--- a/client/src/index.css+++ b/client/src/index.css@@ -517,8 +517,7 @@ html[data-port-theme] [role="button"] {background-color var(--port-motion-fast) ease,border-color var(--port-motion-fast) ease,box-shadow var(--port-motion-fast) ease,- color var(--port-motion-fast) ease,- opacity var(--port-motion-fast) ease;+ color var(--port-motion-fast) ease;}/* === Shared foreground color contract ===@@ -1831,6 +1830,21 @@ input[type="color"],) {text-align: left;}++ /* Prevent WebKit/Safari composite-layer ghosting where an active/animating button+ (e.g. animate-spin, dynamic label expansion) promotes to a hardware-accelerated layer+ on the fly, leaving behind a stale rasterized frame of the static button in the+ ancestor's shared backing store. Giving buttons their own isolated stacking context+ and GPU compositing layer up front ensures the ancestor backing store never retains+ stale button pixels.+ Uses :where() to keep specificity at (0,0,0) so author transform utilities+ (e.g., hover:scale-105, active:scale-95) continue to win cleanly. */+ :where(button, [role="button"]) {+ isolation: isolate;+ -webkit-backface-visibility: hidden;+ backface-visibility: hidden;+ transform: translateZ(0);+ }}/* Accessibility: Ensure disabled elements are perceivable but not interactive */@@ -1880,6 +1894,15 @@ input[type="color"],}/* Custom animations */+/* WebKit/Safari hardware acceleration & subpixel stabilization for spinning icons.+ Prevents anti-aliasing flickering, jitter, and stale rasterized frames during CSS rotation. */+.animate-spin {+ -webkit-backface-visibility: hidden;+ backface-visibility: hidden;+ transform: translateZ(0);+ will-change: transform;+}+@keyframes pulse-soft {0%, 100% {opacity: 1;diff --git a/client/src/themes/portosThemes.test.js b/client/src/themes/portosThemes.test.jsindex cdd0640374..45708f6ddb 100644--- a/client/src/themes/portosThemes.test.js+++ b/client/src/themes/portosThemes.test.js@@ -382,4 +382,27 @@ describe('DEFAULT_AVATAR_COLOR', () => {expect(DEFAULT_AVATAR_COLOR).toBe(`#${hex}`);});});++describe('button compositor layer isolation and animation stabilization', () => {+ const css = readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'index.css'), 'utf8');++ it('isolates buttons to their own GPU compositing layer to prevent WebKit backing-sharing ghosting', () => {+ expect(css).toMatch(/:where\(button,\s*\[role="button"\]\)\s*\{[^}]*isolation:\s*isolate/);+ expect(css).toMatch(/:where\(button,\s*\[role="button"\]\)\s*\{[^}]*backface-visibility:\s*hidden/);+ expect(css).toMatch(/:where\(button,\s*\[role="button"\]\)\s*\{[^}]*transform:\s*translateZ\(0\)/);+ });++ it('stabilizes .animate-spin on its own compositor layer with will-change and backface-visibility', () => {+ expect(css).toMatch(/\.animate-spin\s*\{[^}]*backface-visibility:\s*hidden/);+ expect(css).toMatch(/\.animate-spin\s*\{[^}]*transform:\s*translateZ\(0\)/);+ expect(css).toMatch(/\.animate-spin\s*\{[^}]*will-change:\s*transform/);+ });++ it('does not transition opacity on themed buttons to avoid intermediate compositor fading artifacts', () => {+ // html[data-port-theme] button transition must not include opacity+ const match = css.match(/html\[data-port-theme\]\s+button,[^{]*\{[^}]*transition:[^;]+;/);+ expect(match).toBeTruthy();+ expect(match[0]).not.toContain('opacity');+ });+});// @vitest-environment node