Skip to content

fix: app icon picker and banner hide on reload - #2867

Merged
RohitKushvaha01 merged 6 commits into
mainfrom
fix/app-icon-picker
Sep 10, 2026
Merged

fix: app icon picker and banner hide on reload#2867
RohitKushvaha01 merged 6 commits into
mainfrom
fix/app-icon-picker

Conversation

@deadlyjack

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable new defect remains in the changes since the previous review.

Summary

  • Adds selectable adaptive and legacy Android launcher icons.
  • Integrates icon selection with settings, purchase eligibility, rewarded ads, and persistence.
  • Updates dialog and loader lifecycle behavior used by the picker.
  • Adds unit coverage for icon metadata, selection flow, UI behavior, and Android resource preparation.
  • Fixes banner visibility restoration across reloads.

Diagram

sequenceDiagram
    participant User
    participant Picker as App Icon Picker
    participant Selection as Icon Selection Flow
    participant Android as System Plugin
    participant PM as PackageManager
    User->>Picker: Select icon
    Picker->>Selection: selectAppIcon(iconId)
    Selection->>User: Confirm app exit
    opt Reward or Pro required
        Selection->>Selection: Validate entitlement / show reward
    end
    Selection->>Android: setAppIcon(iconId)
    Android->>PM: Enable target alias
    Android->>PM: Disable other aliases
    Android-->>Selection: Success
    Selection->>Selection: Persist selected icon
Loading

Reviews (4) · Last reviewed commit: "fix: bug"

Comment thread src/dialogs/style.scss
@RohitKushvaha01 RohitKushvaha01 added the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Sep 8, 2026
@github-actions github-actions Bot removed the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Sep 8, 2026
@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Preview Release for this, has been built.

Click here to view that github actions build

@RohitKushvaha01
RohitKushvaha01 marked this pull request as draft September 9, 2026 00:34
@deadlyjack

Copy link
Copy Markdown
Member Author

@greptile review

@RohitKushvaha01
RohitKushvaha01 marked this pull request as ready for review September 10, 2026 08:48
@RohitKushvaha01

Copy link
Copy Markdown
Member

@greptile

@RohitKushvaha01

Copy link
Copy Markdown
Member

@greptile elaborate on the p1 finding

@RohitKushvaha01 RohitKushvaha01 moved this from Backlog to Done in The Code Board - Acode Sep 10, 2026
@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The P1 is about the ordering of the Android launcher-alias changes, not the picker UI itself.

src/lib/appIconSelection.js calls system.setAppIcon(iconId) after the confirmation/ad flow. The native implementation then changes the enabled state of the launcher aliases declared in config.xml (MainActivityIconPrism, MainActivityIconPorcelain, etc.). Each alias targets MainActivity, so the enabled alias is also the launcher entry point for the app.

The risk is that the alias loop can disable the currently active alias before enabling the replacement. That creates a transient state in which Android has no enabled MAIN/LAUNCHER component for Acode. Depending on Android/OEM launcher behavior, this can:

  • make the app disappear from the launcher;
  • cause the current task/activity to be recreated or exited while the picker is open; or
  • leave the app without a usable launcher entry if the operation is interrupted or fails part-way through.

It will not necessarily reproduce on every device, and disabling an alias does not guarantee that Android kills the process. The concern is the unsupported intermediate component state and the device-dependent lifecycle/launcher reaction. The fact that appSettings.update() runs only after setAppIcon completes does not prevent this native transition; it only keeps the JS setting consistent after a successful operation.

The required invariant should be: there must always be at least one enabled launcher alias. The safest fix is to enable the replacement alias first, then disable the previous aliases (or retain a stable forwarding launcher activity that is never disabled). The regression test should switch icons repeatedly from an already-running app and verify that the app remains open/recoverable and that exactly one launcher alias is enabled afterward.

@RohitKushvaha01

Copy link
Copy Markdown
Member

@greptile

@RohitKushvaha01
RohitKushvaha01 added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit fe78374 Sep 10, 2026
11 checks passed
@deadlyjack
deadlyjack deleted the fix/app-icon-picker branch September 10, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants