Skip to content

ADFA-6692 | Add Build Animation plugin - #145

Open
jimturner-adfa wants to merge 2 commits into
mainfrom
ADFA-6692-build-animation
Open

jimturner-adfa wants to merge 2 commits into
mainfrom
ADFA-6692-build-animation

Conversation

@jimturner-adfa

@jimturner-adfa jimturner-adfa commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

ADFA-6692

Adds Build Animation, a plugin that puts an animated icon at the end of the editor toolbar while Gradle works: a wrench rocks during a build or sync, then a tick or a cross shows the result for 5 s. Idle, it is a greyed-out wrench. Our own vector art; no permissions.

How

  • Uses the host's dynamic toolbar icon (ToolbarAction.iconProvider + IdeUIService.refreshToolbarActions()); the host starts animated drawables itself (ProjectActionsToolbar.kt:57 in CoGo). No custom view, overlay or inset handling.
  • BuildAnimationState is a plain state machine behind a Scheduler seam, unit-tested on the JVM.
  • Supports CoGo 26.29-26.99: 26.29 is the first release with iconProvider, refreshToolbarActions() and the host's auto-start of animated icons.

Design changes found on device

  • Greyed out when idle, not hidden. The first version hid the icon when idle. On device, every built-in button shifted one slot when it appeared and jumped back when it hid: the toolbar is end-aligned, so Stop moved out from under the finger that had just tapped Run.
  • 5 s result window, not 3 s. CoGo's own "Build successful" flashbar covers the toolbar for about 2 s (DURATION_SHORT) and hid most of a 3 s tick.

Verification

  • assemblePlugin from a clean tree: no warnings; provenance revision_source=git, not dirty. testDebugUnitTest: 6/6. The new-build-during-result test fails without the cancel-on-start fix (expected:<BUILDING> but was:<IDLE>).
  • addons check: 0 problems. Run from tools/addons/src on the system Python with jsonschema 4.10, not via uv.
  • plugin-review: the first pass found 6.6 (missing required HTML sections), 6.1 (no max IDE version) and 6.2 (empty dispose()). All three are fixed in the second commit.
  • On device (Galaxy Tab SM-X238U, debug CoGo C-d-0929-1057): install, idle greyed wrench, wrench animating during sync, tick on success, cross on cancel, and no button shift.

Not verified:

  • Long-press tooltip: the tablet's documentation.db is empty (no such table: Tooltips), so no plugin can register tooltips there.
  • Font scale 2.0: set mid-sync and the icon kept animating, but text didn't visibly grow, so it isn't a real 2.0 check. The icon has no text.
  • Not run: a genuine compile failure (cancel exercises the same onBuildFailed path) and animations turned off.

Known limits

  • A project sync reports to plugins as a build start, so it animates too.
  • Quick Build does not notify plugins, so it doesn't animate (core follow-up).
  • The plugin API carries no progress, so the animation is indeterminate.

Seen in passing, not changed here

  • Speech-to-Text's toolbar tooltip probably renders n/a. The host looks up toolbar tooltips as <pluginId>.<actionId> (PluginToolbarActionItem.kt:81-82), but STT registers the bare stt_voice_to_code.
  • Updating an installed plugin needs an uninstall. The update was refused with "installed from a different build variant" between two release builds of this plugin, so it had to be uninstalled first.

🤖 Generated with Claude Code

jimturner-adfa and others added 2 commits October 20, 2026 12:38
A toolbar icon that animates while Gradle works: a wrench rocks during a
build or sync, then a tick or a cross shows the result for 5 s. Built on
the host's dynamic toolbar icon (ToolbarAction.iconProvider plus
IdeUIService.refreshToolbarActions), which starts animated drawables
itself, so the plugin draws no view of its own.

The icon is greyed out when idle rather than hidden. The editor toolbar
is end-aligned, so showing or hiding an icon shifts every built-in
button, and Stop would move out from under the finger that tapped Run.
The 5 s result window outlasts the host's own "Build successful"
flashbar, which covers the toolbar for about 2 s.

BuildAnimationState is a plain state machine behind a Scheduler seam,
unit-tested on the JVM. Requires CoGo 26.29, the first release with
dynamic toolbar icons. No permissions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- 6.6: restructure build-animation.html into the required Executive
  Overview, Core Functionality, Technical Architecture, Usage and Key
  Benefits sections (Limits kept as an extra).
- 6.1 / manifest: declare plugin.max_ide_version 26.99 so the
  manifest states a range, matching Icons-Repository.
- 6.2: dispose() now runs the same idempotent teardown as deactivate(),
  so the build listener and pending timer cannot outlive the plugin if
  the host disposes without deactivating.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant