Skip to content

feat(workflow): forward designated base-content lifecycle - #19

Draft
robmaceachern wants to merge 1 commit into
codex/mrkt-142-swiftformat-0587from
codex/mrkt-142-base-content-lifecycle
Draft

robmaceachern wants to merge 1 commit into
codex/mrkt-142-swiftformat-0587from
codex/mrkt-142-base-content-lifecycle

Conversation

@robmaceachern

Copy link
Copy Markdown
Member

Summary

Forward content-level integrations to the designated base controller of Workflow modal/toast wrappers. A navigation container can prepare that base's hosting content without changing application screen conformances or treating an overlay as the underlying screen.

This is the swift-modals portion of MRKT-142, used by Market #12772. It is stacked on the independently landable SwiftFormat prerequisite #18. Keep this PR draft until Rob manually examines it and explicitly approves conversion; no automatic readiness conversion or merge.

How it works

  • The shared AnyModalToastContainerViewController adopts Workflow's ScreenContentProviding capability and owns one stable ScreenContentLifecycle initialized with its base controller.
  • Reusing the base controller preserves its integration. Replacing it calls screenContent.replace(with:) through prepareReplacement, before the update helper adds containment or loads the replacement's view. Existing integrations retire before the new base is prepared.
  • Modal and toast overlays are not forwarded. Wrapper identity, presentation aggregation, keyboard handling, and existing screen composition remain unchanged. The lifecycle is independent of appearance, so pushing another screen does not retire retained base content.
  • The package and sample lockfile pin Workflow #399 at 4ab11c35339c842b20413478c5bcd8d1c8996f75. Other resolved package versions remain unchanged. Before release, land the approved Workflow API and replace this development pin with an appropriate released dependency version.

Validation

  • mise exec -- tuist install --path Samples and mise exec -- tuist generate --path Samples --no-open pass using the published Workflow revision, with no local package override.
  • Xcode 26.5, iOS 26.5: the complete UnitTests scheme (Modals-Tests and WorkflowModals-Tests) passes 66 tests, zero failures. The new parameterized regression verifies unchanged-base reuse and replacement preparation for both loaded and unloaded retained wrappers.
  • mise exec -- swiftformat --lint . --exclude Derived --cache ignore: 0/141 files require formatting, 7 skipped. Derived is generated Tuist output and is not part of the source diff. git diff --check and normal commit hooks pass.
  • CI on the new head remains the remote build/test gate. No manual UI or VoiceOver pass is claimed.

Risk

The additive capability opts presentation wrappers into a public upstream lifecycle contract. Correctness depends on preparing only the designated base and announcing replacement before view loading. Hosted regression tests cover this timing without changing overlay presentation behavior.

Checklist

  • Unit Tests
  • Documentation
  • Pull request title follows conventional commits

This response was drafted with AI assistance.

Opt the shared modal and toast wrapper into Workflow screen-content preparation and retirement. Preserve wrapper identity while preparing replacement base controllers before containment or view loading; overlays remain separate. Pin the MRKT-142 Workflow draft revision and cover retained-wrapper replacement in hosted tests.

Validation: full Modals and WorkflowModals hosted test suites passed on iOS 26.5; SwiftFormat source lint passed with generated Derived sources excluded.

---
*This response was drafted with AI assistance.*

This branch has not been deployed

No deployments
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