Skip to content

[MS-1377] Remove graph init state persistence that was never called#1606

Open
BurningAXE wants to merge 1 commit intomainfrom
MS-1377-Dead-code-and-potentially-confusing-setup-in-OrchestratorActivity
Open

[MS-1377] Remove graph init state persistence that was never called#1606
BurningAXE wants to merge 1 commit intomainfrom
MS-1377-Dead-code-and-potentially-confusing-setup-in-OrchestratorActivity

Conversation

@BurningAXE
Copy link
Contributor

@BurningAXE BurningAXE commented Mar 4, 2026

JIRA ticket
Will be released in: 2026.2.0

Root cause analysis (for bugfixes only)

First known affected version: an old one

Notable changes

  • Activity used the two parameter onSaveInstanceState() which is only called when persistableMode="persistAcrossReboots" flag is set
  • It is not set for this activity and as a result this method was not never called
  • This resulted in the isGraphInitialized flag not persisting between activity recreations
  • In a surprising plot twist it turned out that this is actually the desired behaviour which explains why rotation was working as expected and it broke once I switched from the two parameter to the single parameter onSaveInstanceState() :D
  • To avoid confusion and someone re-finding this issue and "fixing it", I'm deleting the dead code and changing the comment to state desired behaviour
  • @alexandr-simprints since you wrote this initially, I'll wait for your review specifically before merging, in case I missed something

Testing guidance

  • Trigger any workflow
  • Rotate the device
  • Continue workflow

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

@cla-bot cla-bot bot added the ... label Mar 4, 2026
@BurningAXE BurningAXE requested review from a team, TristramN, alex-vt, alexandr-simprints, Copilot, luhmirin-s, meladRaouf and ybourgery and removed request for a team March 4, 2026 17:14
@BurningAXE BurningAXE marked this pull request as ready for review March 4, 2026 17:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes unused state persistence around the orchestrator navigation graph init flag, clarifying that graph initialization is intentionally not preserved across activity recreation (e.g., rotation / process recreation scenarios).

Changes:

  • Removes PersistableBundle-based onSaveInstanceState() override and the unused persisted key for isGraphInitialized.
  • Stops restoring isGraphInitialized from savedInstanceState, ensuring recreation re-initializes the graph.
  • Updates the inline documentation comment to reflect the intended lifecycle behavior.

You can also share your feedback on Copilot code review. Take the survey.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 2026

Copy link
Contributor

@luhmirin-s luhmirin-s left a comment

Choose a reason for hiding this comment

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

Don't forget to test it :D

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants