Skip to content

ADFA-4446: Invalidate Glide's cache when a plugin icon file changes - #1633

Merged
Daniel-ADFA merged 4 commits into
stagefrom
ADFA-4446
Aug 7, 2026
Merged

ADFA-4446: Invalidate Glide's cache when a plugin icon file changes#1633
Daniel-ADFA merged 4 commits into
stagefrom
ADFA-4446

Conversation

@Daniel-ADFA

Copy link
Copy Markdown
Contributor

No description provided.

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

@Daniel-ADFA
Daniel-ADFA requested a review from a team August 5, 2026 22:05
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ae151fa-8452-4d97-b4cf-05f4deb58075

📥 Commits

Reviewing files that changed from the base of the PR and between 2bbe831 and 56bb055.

📒 Files selected for processing (1)
  • resources/src/main/res/values/strings.xml
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/src/main/res/values/strings.xml

📝 Walkthrough
  • Invalidate Glide’s plugin icon cache when the icon file’s last-modified timestamp changes.
  • Add localized labels for plugin authors, plugin details, and plugin status.
  • Use resource-backed labels for plugin popup actions.
  • Preserve missing-icon fallback behavior.
  • Risk: Changes that do not update the icon file timestamp can leave stale icons.
  • Best-practice note: The large formatting-only diff increases review effort and may obscure functional changes.

Walkthrough

The plugin list adapter now uses localized author and status labels, indexed resource-backed popup actions, and icon file timestamps for Glide cache signatures. Existing metadata, interaction, fallback, and diff behavior remains intact.

Changes

Plugin list adapter

Layer / File(s) Summary
Plugin metadata and icon cache
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt, resources/src/main/res/values/strings.xml
Plugin author and status text use string resources. Glide uses the icon file modification timestamp as its cache signature.
Resource-backed popup actions
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt
The Action enum stores resource labels. Popup actions use indexed entries while preserving state-based availability and dispatch.
Adapter structure and comparison behavior
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt
View-holder methods and diff callbacks are reformatted without changing item identity or content comparisons.

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

Possibly related PRs

Suggested reviewers: jatezzz

Poem

A rabbit labels plugins with care,
Fresh icon timestamps track what is there.
Indexed actions follow each state,
While fallback icons patiently wait,
And localized statuses decorate.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided, so it does not explain the changes beyond the title. Add a brief description of the Glide cache invalidation and related plugin UI string changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: invalidating Glide's cache when a plugin icon file changes.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-4446

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt`:
- Around line 77-85: Move the icon metadata work out of onBindViewHolder in
PluginListAdapter: precompute or cache the resolved icon file path, existence,
and lastModified timestamp on a background thread, then pass the resulting data
into row binding. Update the Glide load/signature logic to use the precomputed
metadata without calling File.exists() or File.lastModified() during binding.
- Around line 167-170: Update PluginListAdapter.areContentsTheSame to account
for icon file changes in addition to PluginInfo equality, or otherwise force a
rebind when the icon’s lastModified value changes. Ensure bind executes for
file-only icon updates so Glide refreshes the displayed icon.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 473850f8-1578-4a2f-9590-6daf3eac09c3

📥 Commits

Reviewing files that changed from the base of the PR and between dcda33c and f6f031b.

📒 Files selected for processing (1)
  • app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt

Comment thread app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt Outdated
Comment thread app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt Outdated

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt (1)

26-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the public Action contract.

Action is a public enum, and labelRes is now part of its public API. Add KDoc for the enum and explain that labelRes identifies the localized popup label.

Proposed KDoc
+	/**
+	 * Actions available from a plugin row.
+	 *
+	 * `@property` labelRes resource ID for the localized popup label.
+	 */
	enum class Action(

As per coding guidelines, public classes and functions must have KDoc or Javadoc for their contracts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt` around
lines 26 - 32, Add KDoc to the public Action enum describing its purpose, and
document the labelRes property as the resource identifier for its localized
popup label. Keep the existing enum values and API unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt`:
- Around line 26-32: Add KDoc to the public Action enum describing its purpose,
and document the labelRes property as the resource identifier for its localized
popup label. Keep the existing enum values and API unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f6f5546c-f940-4e23-a415-9dca9bb0882a

📥 Commits

Reviewing files that changed from the base of the PR and between f6f031b and ce30d2f.

📒 Files selected for processing (2)
  • app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt
  • resources/src/main/res/values/strings.xml

@Daniel-ADFA
Daniel-ADFA merged commit 98ea6f6 into stage Aug 7, 2026
4 checks passed
@Daniel-ADFA
Daniel-ADFA deleted the ADFA-4446 branch August 7, 2026 06:54
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