Tab migration by bjorkert · Pull Request #556 · loopandlearn/LoopFollow · GitHub
Skip to content

Tab migration#556

Merged
marionbarker merged 1 commit into
devfrom
tab-migration
Mar 20, 2026
Merged

Tab migration#556
marionbarker merged 1 commit into
devfrom
tab-migration

Conversation

@bjorkert

@bjorkert bjorkert commented Mar 19, 2026

Copy link
Copy Markdown
Member

Fix snoozer tab disappearing when upgrading from main to dev.

The snoozerPosition key never existed in UserDefaults on main (snoozer was hardcoded at position 3). On dev, the StorageValue default for snoozerPosition is .menu, so an unstored value silently becomes .menu and snoozer drops out of the tab bar.

Additionally, nightscoutPosition may not have been stored on main (step 2 set it to the same value as the default), causing it to pick up dev's different default (.position3) and collide with where snoozer needs to go.

Changes:

  • Rewrite step 5 to use snoozerPosition.exists to detect users coming from main, and restore snoozer to position 3 after evicting any unstored occupant
  • Add the same collision guard to step 3 for users arriving with migrationStep < 3
  • Add migratePositionExists(for:) helper scoped to migration code

@bjorkert bjorkert requested a review from marionbarker March 19, 2026 20:38
@marionbarker

Copy link
Copy Markdown
Collaborator

@marionbarker

Copy link
Copy Markdown
Collaborator

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approve from code review and test

@marionbarker marionbarker merged commit c03e57d into dev Mar 20, 2026
@marionbarker marionbarker deleted the tab-migration branch March 20, 2026 14:48
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.

2 participants