Skip to content

Fix sampler list recovery after app process recreation - #738

Merged
ShiftHackZ merged 2 commits into
developfrom
fix/sampler-list-recovery
Nov 14, 2026
Merged

ShiftHackZ merged 2 commits into
developfrom
fix/sampler-list-recovery

Conversation

@ShiftHackZ

@ShiftHackZ ShiftHackZ commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Description

Addresses #622.

Restore AUTOMATIC1111 sampler loading after app process recreation. Both generation screens now show loading and localized failure feedback, offer Retry, and retry missing samplers when the app resumes.

Scope cached samplers to the server URL and credentials, serialize cache replacement and reads, and cancel obsolete screen requests. A populated cache remains available during transient server failures; an empty cache no longer hides a failed fetch.

Checklist

  • Existing provider behavior preserved by the shared sampler control and source guards.
  • Automated regression tests added: 32 new cases across sampler recovery, cache ownership, cancellation, and both generation view models. All 50 focused sampler tests pass with none skipped.
  • Changed contracts documented and all six canonical translations synchronized.

Tested On

  • Android: Emulator
  • Android: Real device — Pixel 3a XL, Android 12, using a controllable mock AUTOMATIC1111 metadata server through normal app flows.
  • iOS: Simulator
  • iOS: Real iPhone device

Verified process recreation, HTTP 503 and empty responses, failed and successful retries, foreground recovery, delayed loading, and valid cache fallback. Android full debug assembly, iOS Simulator Kotlin compilation, focused domain/data/presentation unit tests, and whitespace checks passed. Three independent adversarial review passes completed without outstanding findings after repairs. Live AUTOMATIC1111 and iOS runtime behavior were not tested.

Automated regression coverage

  • Domain: refresh ordering, failure propagation without cache, populated-cache fallback, recovery after failed or empty fetches, and cancellation.
  • Data: repository recreation, server/account cache ownership, stale responses, concurrent reads and writes, failed writes, and interrupted partial writes.
  • Both generation view models: fresh loading after recreation, eager initialization, HTTP failure and empty-list recovery, delayed retries and loading state, duplicate-request suppression, provider cancellation, and stale server responses.

Executed :domain:testDebugUnitTest --tests '*GetStableDiffusionSamplersUseCaseImplTest', :data:testDebugUnitTest --tests '*StableDiffusionSamplers*Test', and :presentation:testDebugUnitTest --tests '*GenerationSamplersViewModelTest'. These exercise production use cases, repository, and view models with controlled dependencies; OS process recreation and foreground lifecycle wiring were checked separately through the Android app as described above.

@ShiftHackZ
ShiftHackZ merged commit b805a1b into develop Nov 14, 2026
1 check passed
@ShiftHackZ
ShiftHackZ deleted the fix/sampler-list-recovery branch November 14, 2026 19:19
@ShiftHackZ ShiftHackZ linked an issue Nov 14, 2026 that may be closed by this pull request
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.

Empty "Sampling method" list after app unload

1 participant