Skip to content

Operator integration hardening#544

Open
GavriloviciEduard wants to merge 1 commit into
rileytestut:mainfrom
epilogue-co:operator-integration-hardening
Open

Operator integration hardening#544
GavriloviciEduard wants to merge 1 commit into
rileytestut:mainfrom
epilogue-co:operator-integration-hardening

Conversation

@GavriloviciEduard

Copy link
Copy Markdown
Contributor

Mark the type contribution you are making:

  • Experimental feature (new functionality that can be selectively enabled/disabled)
  • Bug fix (non-breaking change which fixes an issue)

Description

This is a hardening pass on the existing Epilogue Operator experimental feature. It fixes data-loss and UI edge cases surfaced during on-device testing, plus improves cartridge detection.

What this PR changes:

  • Save reliability / data integrity: hardens cartridge save handling against data loss (writeback guards), and restores game dismissal when its cartridge is re-inserted.
  • Launch gating on a verified save: a game launched from a cartridge now waits for its save to be verified, recovers a failed read, and prompts the user before ever starting without save data.
  • Cartridge detection: more reliable detection of cartridge removal and SNES carts, so a removed cartridge no longer reads as still inserted.
  • Import UX: clearer progress feedback and toasts during cartridge import, and fixes to library/overlay glitches while importing.

Why is this change necessary?
On-device testing of the shipped Operator feature exposed several ways a cartridge session could lose save data or leave the library UI in a wrong/flashing state (e.g. an interrupted save write, a removed cartridge still reading as inserted, launching before the save was read).

Why did you decide on this solution?

  • Kept all changes behind the existing operatorDevice flag and inside the isolated +Operator Swift extensions / DeltaOperator + OperatorKit layer, so upstream Delta code paths are barely touched.
  • Chose to gate launch on a verified save (with recovery + user prompt) rather than launch optimistically, since silently starting without save data risks overwriting the cartridge.
  • Reworked cartridge-presence detection so a removed cartridge is recognized promptly instead of lingering as "inserted".

Testing

Tested on the following, all running the latest iOS release:

  • iPhone 16
  • iPhone 16 Pro Max
  • iPhone 17 Pro

Checklist

General (All PRs)

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I've tested my changes with different device + OS version configurations

Experimental Feature-specific

  • Added property to ExperimentalFeatures struct annotated with @Feature
  • Uses @Option's to persist all feature-related data
  • Locked all behavior changes behind ExperimentalFeatures.shared.[feature].isEnabled runtime check
  • Isolates changes to separate files as much as possible (e.g. via Swift extensions)

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