Skip to content

Beta hardening: expose isDebug + write real Render deprecation#211

Merged
isaac-udy merged 2 commits into
mainfrom
beta-hardening-cleanup
May 25, 2026
Merged

Beta hardening: expose isDebug + write real Render deprecation#211
isaac-udy merged 2 commits into
mainfrom
beta-hardening-cleanup

Conversation

@isaac-udy

@isaac-udy isaac-udy commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Two small beta-readiness items from the Tier-2 hardening list.

  • isDebug is now a parameter on installNavigationController (and rememberNavigationController). The hardcoded internal val isDebug = false was a feature flag with no way to turn it on β€” the metadata-serializer validation it gates never ran in any real app. The processor now generates installNavigationController with an isDebug: Boolean = false parameter that's plumbed through internalCreateEnroController to set the flag on the controller before any module is added.

    MyComponent.installNavigationController(this, isDebug = BuildConfig.DEBUG)

    isDebug stays internal var on EnroController itself β€” it's not toggleable post-install β€” so the public API surface is just the install-time parameter.

  • NavigationContainerState.Render deprecation now has a real message. The placeholder @Deprecated("TODO BETTER DEPRECATION MESSAGE") is replaced with proper text + ReplaceWith(NavigationDisplay(this)) β€” which is what Render was already delegating to internally.

Why

Both items would be embarrassing in a beta:

  • isDebug was a feature flag with no way to turn it on. The serializer validation it controls is meant to surface missing serializers loudly in debug builds, but as shipped it was permanently off.
  • The placeholder deprecation message would be visible in users' IDEs as a literal TODO string.

What's NOT in this PR

  • SyntheticDestinationScope completeness β€” the bigger Tier-2 item that needs to collect operations during the block and integrate with the result-channel system. Wants design discussion and a focused PR.
  • enro-compat removal plan β€” product decision, not code.
  • Test-fixture TODO() calls in NavigationPathBindingTests β€” turned out to be a false alarm; they're intentional placeholders for deserialize/serialize lambdas that aren't exercised in tests that only check matches().

Test plan

  • ./gradlew :enro-runtime:desktopTest β€” green, no regressions.
  • ./gradlew :tests:application:compileKotlinDesktop β€” test app compiles against the new generated install signature.
  • Inspect tests/application/build/generated/ksp/desktop/.../TestApplicationComponentNavigation.kt β€” confirm installNavigationController and rememberNavigationController both take and forward isDebug.
  • Spot-check: IDE shows the real deprecation message on NavigationContainerState.Render() usage.

πŸ€– Generated with Claude Code

isaac-udy and others added 2 commits May 24, 2026 01:40
Replaces the hardcoded `internal val isDebug = false` (with its
`// TODO NEED TO CONFIGURE THIS` placeholder) with a real config knob.
isDebug is now a parameter on the generated installNavigationController
and rememberNavigationController extensions, plumbed through
internalCreateEnroController to set the flag on the EnroController
before any module is added. Default is false to preserve existing
behaviour.

Apps wire it to BuildConfig.DEBUG (or the platform equivalent):

    MyComponent.installNavigationController(this, isDebug = BuildConfig.DEBUG)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the placeholder "TODO BETTER DEPRECATION MESSAGE" with a
proper message + ReplaceWith pointing at NavigationDisplay(this) β€”
which is what Render delegates to internally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@isaac-udy isaac-udy force-pushed the beta-hardening-cleanup branch from 73f3bef to 992a38b Compare May 23, 2026 13:40
@isaac-udy isaac-udy closed this May 25, 2026
@isaac-udy isaac-udy reopened this May 25, 2026
@isaac-udy isaac-udy merged commit 7bccb27 into main May 25, 2026
2 of 4 checks passed
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