Skip to content

CATROID-1657 Fix SpriteActivity Undo-Handling after App Crash - #5228

Open
herbsee02 wants to merge 1 commit into
Catrobat:developfrom
herbsee02:CATROID-1657
Open

CATROID-1657 Fix SpriteActivity Undo-Handling after App Crash#5228
herbsee02 wants to merge 1 commit into
Catrobat:developfrom
herbsee02:CATROID-1657

Conversation

@herbsee02

@herbsee02 herbsee02 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR refactors the Undo-Handling of SpriteActivity after an app crash, resolving several UI synchronization bugs and lifecycle inconsistencies.

https://catrobat.atlassian.net/browse/CATROID-1657

  • Crash Recovery: Implemented a new system to restore the Undo button and its navigation context (Scene/Sprite) after an app crash or OS process kill. Therefore, the existing system (introduced in IDE-309) where the SpriteActivity was kept alive with an inconsistent state in BaseActivity was removed, as it led to the initial Null-Pointer-Exception in createActionBarTitle.
  • Centralized Reset: Moved the Undo state reset logic to the central loadFragment method, ensuring a clean UI when switching between Scripts, Looks, and Sounds.
  • Architecture Cleanup: Standardized menu updates using invalidateOptionsMenu() and removed redundant cleanup code from individual fragments.
  • Bug Fixes:
    • Resolved a ClassCastException when editing non-string variables.
    • Fixed a bug where the Undo button persisted after canceled drawing sessions.
    • Changed Espresso UI tests.

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

@sonarqubecloud

Copy link
Copy Markdown

@harshsomankar123-tech harshsomankar123-tech added the Active Member Tickets that are assigned to members that are still currently active label Jul 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

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

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Active Member Tickets that are assigned to members that are still currently active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants