Skip to content

Replace thinking orbs with SVG activity marks (desktop, iOS, Android) - #386

Merged
sambitcreate merged 9 commits into
mainfrom
feature/aiden-thinking-animations-263534
Oct 8, 2026
Merged

sambitcreate merged 9 commits into
mainfrom
feature/aiden-thinking-animations-263534

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Replaces the thinking-orbs canvas animations with small vector activity marks on all three clients. Geometry, timing and the phase mapping are specified once in docs/activity-marks.md. The set was picked from the gallery in docs/aiden-thinking-animations.html.

Why: the orbs redrew a projected 3D dot cloud every frame. On desktop that was a requestAnimationFrame canvas loop, plus a full-canvas CSS colour filter on the Live mark. On iOS it was a 30 fps TimelineView Canvas. On Android it was a recomposition every frame, with O(n²) work and per-frame allocation.

Activity Mark
Thinking tri-step
Responding compose
Tool work quad-shuffle
Searching / visualizing scan-grid
Waiting for approval or an answer glance
Preparing, model loading, stopping, queued subagents bounce
Live (desktop) Helix family: calm (frozen) when ready, twist when connecting, swell when listening (sized by mic level), duplex when talking, flat when unavailable; glance for approvals

Per platform

  • Desktop: AidenActivityMark (inline SVG, CSS keyframes on transform/opacity only, per-shape phase as plain inline animation-delay). AgentActivity.mark replaces orbState. SubagentMark and AidenLiveMark replace SubagentOrb and AidenLiveOrb. The thinking-orbs dependency and its notice are removed.
  • iOS: Features/Shared/ActivityMarks/. CAShapeLayers are driven by CAKeyframeAnimation, so the render server animates them with no per-frame main-thread work. Marks respect system Reduce Motion, the in-app preference and Low Power Mode. Vendored ThinkingOrbsKit and its license are removed.
  • Android: features/shared/activitymarks/. A Compose Canvas reads its frame clock only in the draw phase, so there is no recomposition or allocation per frame. Marks use aidenReduceMotion(), which also honours the system animator scale. The vendored thinkingorbs package is removed.
  • Inactive, Reduced Motion and off-screen marks freeze on a visible t = 0 pose. Finished tools and subagents freeze rather than keep animating.
  • No protocol or wire change. Every client derives its mark locally, as it did its orb.

Cross-platform parity

Native ports were reviewed against the desktop implementation and fixed to match. Duplex strand b fades per circle; Helix · Flat composites its 45% once; Swell's second wave adds to the braid rather than scaling with depth; search tools match whole name segments; the swell level uses the same five steps.

Test plan

  • npm test (all lanes; renderer-other 1972/1972). New renderer/components/aiden-activity-mark.test.tsx is registered in scripts/ci-test-registry.json and the test:serial/test:coverage scripts.
  • tsc --noEmit, eslint on touched files
  • iOS: xcodebuild test … -only-testing:AidenOnTheGoTests → 653 passed, 6 skipped, 0 failed (new AidenActivityMarkTests 11/11)
  • node --test scripts/check-ios-shipping-target.test.mjs → 14/14
  • Android: ./gradlew :app:testDebugUnitTest :app:lintDebug :app:compileDebugAndroidTestKotlin → BUILD SUCCESSFUL (new AidenActivityMarkSpecTest 11/11)
  • Desktop marks rendered from the real component and CSS in a browser: all 11 animate, and frozen poses are visible
  • Not done: visual check of the native marks on a device or emulator. Parity is verified through shared spec values in unit tests.

Flaky tests observed (unrelated to this PR)

  • Spec: main/services/external-editors.test.ts › "Linux Zed aliases preserve PATH precedence, executable guards and literal workspace argv"

  • Symptom: SyntaxError: Unexpected end of JSON input in assertLaunch (line 351) while parsing the fake launcher's output, during a local node scripts/run-ci-tests.mjs --lane core-git run on merge commit f74f0ec (2798 passed, 1 failed). The file passed 3/3 when run alone, and neither this PR nor the merge touches it (last changed in feat(linux): bring desktop support up to date #71).

  • Run link: local run, no hosted link. Not retried in CI and not papered over.

  • Spec: tests/e2e/custom-model-options.spec.ts:232 › "custom GLM effort selector persists and sends every supported thinking mode" (Electron E2E 1/3)

  • Symptom: locator.click: Timeout 30000ms exceeded at line 309. The hover-expanded thinking-level radio collapsed (max-h-0 opacity-0, "element is not stable"/"not visible") while the click was retried, and the parent radiogroup intercepted pointer events. It passed on Playwright's retry, so --fail-on-flaky-tests failed the job. This PR doesn't touch the composer thinking control (added in Add per-model effort settings for custom connections #384).

  • Run link: https://github.com/sambitcreate/aiden-agent/actions/runs/37727986902/job/113154621878 (failed jobs rerun once, per AGENTS.md; that failed-only rerun ran no tests: it could not download desktop-build-37727986902-2 because the build job was not rerun, so the whole workflow was rerun instead)

  • Spec: tests/e2e/browser-lifecycle.spec.ts:107 › "disabling agent access during file acquisition prevents a late browser tab" (Linux build x64 › deterministic Electron E2E gate)

  • Symptom: electronApplication.evaluate: Resulting promise was garbage collected inside the expect.poll(() => app.evaluate(...)) at line 157. It passed on Playwright's retry (165 passed, 1 flaky, 4 skipped), so --fail-on-flaky-tests failed the job. "Linux x64" and "Linux arm64" failed only because they require this build. This PR doesn't touch the browser lifecycle.

  • Run link: https://github.com/sambitcreate/aiden-agent/actions/runs/37805110991/job/113407694206 (its single rerun is the fresh CI run on 9f856e0, pushed to fix the iOS test below)

  • Spec: ios/AidenOnTheGoTests/AidenChatTests.swift › testCancelledOlderProgressObserverCannotClearNewerHandle (iOS build and simulator tests)

  • Symptom: Timed out waiting for progress SSE request (expected). from waitForProgressRequestCount, which polls for only 1 s (100 × 10 ms). 653/654 otherwise passed, and it passes locally. A sibling branch (feature/bot-ui-durable-sessions-2f4474, run 37805265233) failed a different AidenChatTests timing helper the same way, so this looks like CI-load timing in the chat progress tests rather than this PR. The timeout was not raised.

  • Run link: https://github.com/sambitcreate/aiden-agent/actions/runs/37814967667/job/113441516575 (failed jobs rerun once)

iOS test isolation fix

AidenNativeIntegrationTests.testBinaryContractRejectionsEmitExactlyOneDiagnosticEach failed on CI's parallel simulator clones with XCTAssertEqual failed: ("3") is not equal to ("2"). AidenDiagnostics.testSink is process-wide, and a contract rejection from another suite's leftover async work was counted. Adding AidenActivityMarkTests likely changed how CI packs test classes onto clones. The test now counts only diagnostics emitted inside its own task (TaskLocal scope), with the same exactly-two assertion. Full iOS suite locally: 654 passed, 6 skipped, 0 failed.

🤖 Generated with Claude Code

sambitcreate and others added 2 commits October 7, 2026 21:27
…roid

The thinking-orbs canvas animations redrew a projected 3D dot cloud every
frame (rAF + full-canvas CSS filter on desktop Live, a 30 fps TimelineView
Canvas on iOS, per-frame recomposition with O(n²) work on Android). They are
replaced by small vector "activity marks" specified once in
docs/activity-marks.md and drawn natively on each client:

- Desktop: inline SVG + CSS keyframes on transform/opacity only
  (AidenActivityMark, AidenLiveMark, SubagentMark). thinking-orbs removed.
- iOS: CAShapeLayers driven by CAKeyframeAnimation (render server, no
  main-thread frames). Vendored ThinkingOrbsKit and its notice removed.
- Android: Compose Canvas whose frame clock is read only in the draw phase.
  Vendored thinkingorbs package removed.

Marks: tri-step (thinking), quad-shuffle (tool work), compose (responding),
scan-grid (searching/visualizing), glance (waiting on the user), bounce
(preparing/loading/stopping/queued); Live uses the Helix family. Inactive,
Reduced Motion and off-screen marks freeze on a visible t = 0 pose. No
protocol change: every client derives its mark locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g-animations-263534

# Conflicts:
#	package.json
@very-hermes-bot

very-hermes-bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Hermes Review Bot

Confidence: 5

Engine: agy/gemini-3.8-flash-high
Review mode: full
Head: 9f856e0963044ee16b2e178279603d93c0f3583d
Generated: 2026-10-08T17:19:52+00:00
Reviews: 1

Summary

Replaces the thinking-orbs 3D canvas animations and vendored mobile implementations with lightweight vector activity marks (tri-step, quad-shuffle, compose, scan-grid, glance, bounce, and the helix family) across desktop, iOS, and Android. Desktop renders inline SVGs driven by CSS keyframes on transform and opacity with IntersectionObserver-based off-screen pausing; iOS drives CAShapeLayers with render-server CAKeyframeAnimations; and Android utilizes a Compose Canvas reading frame time strictly during the draw phase to avoid recomposition. Geometry, timing tables, and activity phase mappings are unified in docs/activity-marks.md, and inactive or reduced-motion marks consistently freeze on their $t = 0$ still pose. Maintainers should double-check visual rendering on physical Android devices to confirm the Compose draw-phase frame clock renders smoothly without hitching across screen refreshes.

Confidence Score: 5/5

Fully traced geometry, timing formulas, and frozen poses across desktop (SVG/CSS), iOS (CoreAnimation), and Android (Compose Canvas), verified test registrations and script updates, and confirmed clean removal of former thinking-orbs dependencies and third-party notices.

📁 Important Files Changed
  • docs/activity-marks.md: Single source of truth defining coordinates, timing, keyframes, easings, and phase mappings across all clients.
  • renderer/components/aiden-activity-mark.tsx: Desktop React component rendering inline SVG marks with negative inline delays to start mid-cycle and observer-based off-screen pausing.
  • renderer/styles.css: CSS keyframes animating transform and opacity only; handles paused, off-screen, and reduced-motion states without per-frame scripting.
  • renderer/components/assistant/aiden-live-mark.tsx: Desktop Live assistant wrapper mapping live states to the Helix mark family and sizing Swell via discrete audio levels.
  • ios/AidenOnTheGo/Features/Shared/ActivityMarks/*: iOS implementation utilizing CAShapeLayer and CAKeyframeAnimation for off-main-thread rendering, plus the timing evaluator.
  • ios/AidenOnTheGoTests/AidenNativeIntegrationTests.swift: Isolates process-wide diagnostics collection to the current test task using a @TaskLocal scope to prevent parallel simulator clone flakiness.
  • android/app/src/main/java/.../activitymarks/*: Android Compose implementation reading the frame clock solely inside the draw pass to eliminate recomposition and allocations.
  • package.json & THIRD_PARTY_NOTICES.md: Deprecates and removes thinking-orbs dependency and licenses while registering new unit tests in CI test lanes.

Findings

No findings.

📊 Sequence Diagram

Unchanged or not applicable for this change.

Machine-Readable Findings

[]

Last reviewed commit: 9f856e096304
Reviews (1) · Comment /hermes review to trigger a new review · /hermes review full for full re-review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The desktop still poses regress when the in-app Reduce Motion preference is enabled. Please address that interaction before merging; a smaller Helix phase-parity issue is also noted inline.

Reviewed changes across desktop, iOS, and Android, including the author's merge of main into the PR branch.

  • Vector Renderers: Replaces canvas orbs with SVG/CSS desktop marks, Core Animation iOS layers, and draw-phase Android marks, removing the dependency and vendored engines.
  • Activity Mapping: Updates chat, remote-run, subagent, and Live indicators, including approval waits, terminal freezing, and microphone-driven Swell sizing.
  • Shared Specification: Adds geometry/timing documentation and a preview gallery, updates onboarding copy and notices, and registers focused tests.
  • Verification: Passed 94 focused desktop tests, 24 shipping-inventory/CI-registry tests, desktop type-checking, and the focused Android activity-mark suite. Chromium probes reproduced the inline findings using the real component and production CSS; iOS XCTest and native device visuals were not run on this Linux runner.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread renderer/styles.css Resolved
…ases

- Exclude .aiden-mark from the app-wide reduce-motion rule that collapses
  animations to 0.001ms/one iteration; marks already freeze via
  animation-play-state, and the collapse ended Compose, Scan and Helix on
  their last frame instead of the specified t = 0 pose.
- Wrap every inline phase offset into (-period, 0] so tracks start mid-cycle
  like the native (t - d) mod D evaluators. Positive Helix depth delays and
  Bounce delays were startup waits that gave a different first cycle and
  frozen pose than iOS and Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The phase wrapping and initial Reduce Motion poses are fixed, but the previously reported live-toggle behavior remains incomplete: enabling Reduce Motion while a mark runs freezes its current phase rather than restoring the specified t = 0 pose. No new issues were found in the incremental delta; this is not an approval because that existing concern remains.

Reviewed changes since the prior Pullfrog review at 5fb9f4973, focused on the desktop fixes in 4ad4418e1.

  • Wrapped phase offsets. Normalized each inline delay against its own period, correcting Helix depth and Bounce startup phases to match the native modulo timing model.
  • Preserved initial still poses. Excluded activity marks from the app-wide shortened-duration/single-iteration rule so initially paused Compose, Scan, and Calm retain their intended geometry.
  • Extended phase coverage. Updated rendered-output tests to check non-positive phase offsets and documented the timing/cascade changes in project memory.

Verification passed: 95 focused desktop tests and npx tsc --noEmit. Chromium probes using the real component and complete production stylesheet confirmed the corrected initial poses, but toggling Reduce Motion during Glance's blink left its eyes frozen at scaleY ≈ 0.119 rather than 1; the evidence is recorded in the existing review thread, without duplicating the finding inline. Native source is unchanged in this delta, so native suites were not rerun.

Both prior threads were already marked resolved by the author. Reopening the partially addressed Reduce Motion thread failed with Resource not accessible by integration; its resolved GitHub state therefore does not reflect full resolution of the reported behavior.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Pausing a running CSS animation holds whatever frame it was on, so turning
Reduce Motion on (or a mark going inactive) mid-blink froze Glance at
scaleY ≈ 0.1. Marks now rewind their tracks to time 0 whenever they freeze,
re-checking on the app's appearance event and the system reduced-motion
query, so they always land on the specified still pose, like iOS/Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since the prior Pullfrog review at 4ad4418e1, focused on the freeze-transition fix in ae982e19e.

  • Rewound frozen marks. Reset desktop animation tracks to their specified t = 0 pose when a mark becomes inactive or Reduce Motion is enabled.
  • Connected preference updates. Added appearance-event and system media-query listeners, with cleanup, while leaving normally running marks unchanged.
  • Extended behavioral coverage. Added a unit test for inactive, reduced-motion, and running animation times.

Verification passed: 96 focused desktop tests and npx tsc --noEmit. Chromium checks using the mounted component and complete production stylesheet confirmed app/system Reduce Motion rewinding, Compose's active-to-inactive reset, and resumed playback after disabling Reduce Motion. The previously reported live-toggle concern is now resolved. Native code is unchanged in this delta, so native suites were not rerun; native device visuals remain an outstanding acceptance check. Hosted CI was still pending when inspected.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

sambitcreate and others added 5 commits October 7, 2026 23:36
…g-animations-263534

# Conflicts:
#	android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenChatDetailScreen.kt
…g-animations-263534

# Conflicts:
#	package.json
#	renderer/components/subagent-chips.tsx
#	renderer/components/subagent-roster.tsx
…g-animations-263534

# Conflicts:
#	renderer/components/environment-panel.tsx
…g-animations-263534

# Conflicts:
#	package.json
AidenDiagnostics.testSink is process-wide, and other suites trigger the same
contract rejections from async work that can complete while this test runs.
On CI's parallel simulator clones that stray rejection was counted (3 != 2).
Count only diagnostics emitted inside this test's task via a TaskLocal
scope; the "exactly one diagnostic per rejection" assertion is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since the last acknowledged head c885a77c7, focused on the iOS test-isolation fix in 9f856e096.

  • Scoped diagnostic capture. Added a task-local identifier so the binary-contract test excludes diagnostics from unrelated asynchronous work.
  • Preserved rejection coverage. Kept both invalid-response fixtures, expected errors, the exactly-two diagnostic assertion, and deferred cleanup unchanged.

Verified that both production rejection paths invoke the diagnostic sink synchronously in the scoped caller's task after their awaited requests. Swift syntax parsing passed, and the iOS shipping checks passed 14/14. Native XCTest could not run on this Linux runner because xcodebuild is unavailable; desktop and Android implementation are unchanged in this delta. Exact-head hosted CI was still running when inspected, so merge readiness remains contingent on its results.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@sambitcreate
sambitcreate merged commit 0bfc029 into main Oct 8, 2026
49 of 51 checks passed
@sambitcreate
sambitcreate deleted the feature/aiden-thinking-animations-263534 branch October 8, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants