Skip to content

ADFA-7164: Keep string-resource error messages until dismissed - #2309

Open
Daniel-ADFA wants to merge 1 commit into
stagefrom
fix/ADFA-7164-persist-resource-errors
Open

Daniel-ADFA wants to merge 1 commit into
stagefrom
fix/ADFA-7164-persist-resource-errors

Conversation

@Daniel-ADFA

@Daniel-ADFA Daniel-ADFA commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

ADFA-7164

Errors shown from a string resource, such as Export's "Nothing built yet", disappeared after 1 s with no Dismiss button. Activity.flashError(@StringRes) now delegates to flashError(String), so they stay until dismissed, like errors shown from a String. Also removes two comments that described the old behavior.

Part 1 of the ticket; rethinking Export's messages follows separately. Checked on device at font scale 1.0 and 2.0.


Code Reviewer: Code Reviewer couldn't review this pull request
The pull request author does not have access to AI for the associated Atlassian organization.

@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 Nov 24, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

  • Error messages from string resources now stay visible until the user dismisses them. This matches String error messages.
  • Activity.flashError(@StringRes) now calls flashError(getString(msg)). This change applies to every caller of the @StringRes overload, not only Export.
  • Export's "Nothing built yet" message is covered by this change. Rethinking the Export messages is out of scope.
  • Adds FlashErrorStringResTest, a Robolectric test. It checks that the message stays after 5 seconds and that dismissal removes it.

Risks:

  • Test results: no test or CI run is available. The test is not verified as passing.
  • Scope: the behavior change affects all flashError(Int) callers across the app.
  • Comments removed: three code comments that explained the choice of the String overload were removed. Future maintainers lose that rationale.
  • Device check: the author reports checks at font scales 1.0 and 2.0. The evidence for this check is not available.

The integer-resource flashError overload now resolves the message with getString and delegates to the string overload. A Robolectric test checks message visibility, the dismiss control, and dismissal. Two explanatory comments were removed.

Changes: Flash error handling

Layer / File(s) Summary
Resource message delegation and verification
common/src/main/java/com/itsaky/androidide/utils/FlashbarActivityUtils.kt, common/src/test/java/com/itsaky/androidide/utils/FlashErrorStringResTest.kt, app/src/main/java/com/itsaky/androidide/activities/editor/EditorHandlerActivity.kt, app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt
The integer-resource overload resolves the message string and delegates to the string overload. The test checks that the message and dismiss control remain visible after five seconds, then checks that the message is absent after dismissal and another five seconds. Two comments about the overload behavior were removed; executable code did not change in those files.

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

Suggested reviewers: davidschachteradfa, itsaky-adfa

Merge Risk: Minimal · up to 6b326

String-resource errors such as Export's "Nothing built yet" will stay visible until dismissed, matching string errors. The change is small and easy to revert, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the ticket and the main change: error messages shown from string resources now stay visible until dismissed. The raw summary confirms that Activity.flashError(@StringRes) now delegates…
Description check Passed The description states the problem (string-resource errors such as Export's "Nothing built yet" disappeared after 1 s with no Dismiss button) and the fix (flashError(@StringRes) delegates to flashErro…
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.
Full details: Title check

Explanation

The title names the ticket and the main change: error messages shown from string resources now stay visible until dismissed. The raw summary confirms that Activity.flashError(@StringRes) now delegates to the String overload, which matches the title's claim.

Full details: Description check

Explanation

The description states the problem (string-resource errors such as Export's "Nothing built yet" disappeared after 1 s with no Dismiss button) and the fix (flashError(@StringRes) delegates to flashError(String)). It also mentions removing two comments, which the raw summary confirms, and notes device testing at two font scales.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the message glow
Five seconds pass; it stays in view
A little button waits nearby
One tap sends the flash away
The test confirms the message is gone
The rabbit hops through fields of code

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: Essentials
  • Run ID: fd4195a8-3945-4725-b296-f8950538952d
Commits

Reviewing files that changed from the base of the PR and between b5931b2 and 6b3267a.

Files selected for processing: 4

  • app/src/main/java/com/itsaky/androidide/activities/editor/EditorHandlerActivity.kt
  • app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt
  • common/src/main/java/com/itsaky/androidide/utils/FlashbarActivityUtils.kt
  • common/src/test/java/com/itsaky/androidide/utils/FlashErrorStringResTest.kt
Files with no reviewable changes: 2

  • app/src/main/java/com/itsaky/androidide/activities/editor/EditorHandlerActivity.kt
  • app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

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