Skip to content

ADFA-6312: Quick Build toolbar shows a visible stop icon while a build runs - #2106

Merged
fryanpan merged 4 commits into
stagefrom
fix/ADFA-6312-qb-building-icon
Oct 23, 2026
Merged

fryanpan merged 4 commits into
stagefrom
fix/ADFA-6312-qb-building-icon

Conversation

@fryanpan

@fryanpan fryanpan commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

ADFA-6312

Quick Build's toolbar button now shows a visible stop icon the whole time a build runs, in light and dark themes. On the Samsung A56 the button drew blank for the whole build — functional but invisible — so nothing signalled a build was running or how to stop it.

The BUILDING state now draws ic_stop_daemons (the Run button's static stop icon) instead of the animated ic_quick_build_building, so a stop icon is visible in both light and dark.

What to review

  • QuickBuildAction.kt — the BUILDING tone drops the animated spinner and reuses the Run button's static stop icon.
  • ToolbarIcon.kt — small helper that calls mutate() before tinting, so a layer-list icon keeps its colour.
  • EditorHandlerActivity.kt — routes toolbar icon tinting through that helper.
  • Three deleted drawables — the old animated building icons; no other users.

Screenshots

Before (origin/stage) the BUILDING-state button was blank; after the fix it draws the stop icon in light and dark, and it holds at 2x font scale. Before/after device screenshots (A56: light and dark, font scale 1.0 and 2.0, first-full-build and live-reload) were captured during the device pass and can be added to this PR on request.

Tested at 4fa62a2405

  • Unit suites — ToolbarIconTest (new, 3 cases) and QuickBuildActionPresentationTest (10 cases), both green.
  • Regression test — ToolbarIconTest pins the mutate-then-tint order; watched failing (icon drew raw white) with the order reverted, green with the fix.
  • Coverage — ToolbarIcon.kt: ToolbarIconTest covers 100% line (4/4), 100% instruction, and 83.3% branch (5/6) — null icon, enabled, disabled, and the mutate-then-tint path on a layered icon. The one uncovered branch is the null-return path of icon.mutate()?, unreachable because Drawable.mutate() contractually returns this and the ?. is Kotlin's safe-call on a platform return type.
  • Device — A56 (RZGYC24640P): the stop icon renders for the whole build in light and dark, at font scale 1.0 and 2.0; verified across a first full build and a live-reload build.

🤖 Generated with Claude Code

https://claude.ai/code/session_018DEPcb7gdHpRHRHXVqNnbf

fryanpan and others added 2 commits October 2, 2026 10:58
The BUILDING tone drew ic_quick_build_building, a layer-list of an
animated-rotate ring and a stop square. On the Samsung A56 the toolbar
slot rendered blank for the whole build: the button was there, enabled
and announced "Cancel build", but drew no pixels.

Bryan's call: drop the spinner and reuse the static ring-and-square the
Run button already shows (ic_stop_daemons), so both buttons present a
running build the same way. The three building drawables have no other
users and are deleted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1o4KqT54Vp2zpakJ54sbU
…eir colour

The editor toolbar set the colour filter on the action's icon and only then
called mutate(). LayerDrawable.mutate() rebuilds its layers from their constant
state, which drops a filter set beforehand, so a layer-list icon drew its raw
paint (white on the light toolbar). Tinting before mutate() also wrote onto
drawable state shared with other users of the same resource.

Mutate first, then tint and dim once, in a small toolbarIcon() helper so the
order is pinned by a Robolectric test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1o4KqT54Vp2zpakJ54sbU

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bf3a621f-f9cc-4b3f-a603-79735e54d053
📥 Commits

Reviewing files that changed from the base of the PR and between 81016c7 and fbfab25.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 12266fdb-1328-4cc1-949d-1011f92b52b2
📥 Commits

Reviewing files that changed from the base of the PR and between 4fa62a2 and 81016c7.

📒 Files selected for processing: 2
  • app/src/main/java/com/itsaky/androidide/actions/build/QuickBuildAction.kt
  • app/src/main/java/com/itsaky/androidide/activities/editor/EditorHandlerActivity.kt

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Summary
  • The Quick Build toolbar now shows the static ic_stop_daemons icon while a build runs. This matches the Run button’s stop icon.
  • Toolbar icons now use toolbarIcon, which mutates each drawable before applying its color filter and sets alpha based on the action’s enabled state.
  • Added tests for layered-icon tinting, enabled and disabled alpha, and missing icons. Updated the Quick Build presentation test and manual QA documentation.
  • Removed the three obsolete Quick Build building drawables.
  • The author reports that the tests passed and that device checks showed the stop icon in light and dark themes, including at font scale 2.0.
  • Risk review: The supplied information does not establish a specific risk or best-practice violation.

The Quick Build BUILDING tone now uses the stop-daemons icon, and the former animated icon resources are removed. Editor toolbar action icons now use a helper that applies color filters and enabled-state alpha.

Changes: Quick Build building icon

Layer / File(s) Summary
Use the stop-daemons icon
app/src/main/java/com/itsaky/androidide/actions/build/QuickBuildAction.kt, resources/src/main/res/drawable/ic_quick_build_building*.xml, app/src/test/java/com/itsaky/androidide/actions/build/QuickBuildActionPresentationTest.kt, quickbuild/docs/manual-qa.md
The BUILDING tone now selects ic_stop_daemons. The former animated icon resources are removed. The presentation test and manual QA description reflect the stop icon.

Editor toolbar icon handling

Layer / File(s) Summary
Apply toolbar icon styling
app/src/main/java/com/itsaky/androidide/activities/editor/ToolbarIcon.kt, app/src/main/java/com/itsaky/androidide/activities/editor/EditorHandlerActivity.kt, app/src/test/java/com/itsaky/androidide/activities/editor/ToolbarIconTest.kt
toolbarIcon applies the supplied color filter and sets alpha to 255 when enabled or 76 when disabled. prepareOptionsMenu uses the helper. Tests cover layered icons, alpha values, and null icons.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 81016

The icon and toolbar styling changes are ready to merge with no identified actionable risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the Quick Build toolbar change and the visible stop icon during builds.
Description check Passed The description directly explains the visible stop icon fix, the toolbar tinting changes, deleted drawables, and validation performed.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the build icon’s face,
A stop sign now sits in its place.
Toolbar layers take their tint,
Dim when disabled, bright when lit.
Tests hop through each state with care,
Then nibble carrots in the square.

Comment @coderabbitai help to get the list of available commands.

@itsaky-adfa itsaky-adfa 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.

Review of 81016c7665. Already approved by @jatezzz at this head; this is a second pass on request.

Checked against ADFA-6312's acceptance criteria: BUILDING maps to ic_stop_daemons (AC1), QuickBuildActionPresentationTest pins it (AC3), and the three deleted drawables have no remaining references. ToolbarIconTest's layer test does fail with tint-before-mutate, since LayerDrawable.mutate() rebuilds its children from their ConstantState and drops a per-instance filter. Verified by reading the code at head; tests were not re-run locally.

REVIEW.md has no written approve/request-changes rule, so the default applied.

@fryanpan
fryanpan merged commit 0c31548 into stage Oct 23, 2026
5 checks passed
@fryanpan
fryanpan deleted the fix/ADFA-6312-qb-building-icon branch October 23, 2026 18:24
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.

3 participants