Skip to content

Port the background-layer core seams from the dev core (Android) - #287

Merged
shanerbaner82 merged 1 commit into
mainfrom
feat/port-background-layer-seams
Aug 4, 2026
Merged

Port the background-layer core seams from the dev core (Android)#287
shanerbaner82 merged 1 commit into
mainfrom
feat/port-background-layer-seams

Conversation

@shanerbaner82

Copy link
Copy Markdown
Contributor

What

Ports the Android background-layer core seams from the dev core (super-native-web, commit 210c941 "neutral core seams") into mobile-air. Two files, port-only — no new behavior beyond what already ships in the dev core.

The composition local

NativeCompositionLocals.kt gains:

val LocalBackgroundLayerPresent = compositionLocalOf { false }

It signals that a root host renders a persistent background layer beneath the content (e.g. mobile-ui's background_layer map), so chrome that normally paints an opaque canvas should go transparent.

The tabs transparency consumption

NativeRootTabsRenderer.kt's Scaffold now derives its containerColor from the local: Color.Transparent when a background layer is present, otherwise the existing MaterialTheme.colorScheme.background (which is also the Material3 default, so behavior is unchanged when no provider sets the local).

These are the only two LocalBackgroundLayerPresent sites committed on the dev core's main.

Why

The mobile-ui background-layer feature (NativePHP/mobile-ui#37) references this composition local, but it only existed in the dev core — every app on mobile-air failed to compile on Android until NativePHP/mobile-ui#40 removed the reference as a stopgap. With this seam in the distribution core, the plugin can restore its provider and the transparency signal.

Notes

  • Android port only. iOS transparency coordination deliberately remains a gap — no Swift changes here.
  • PHP untouched; vendor/bin/pest tests/Unit passes (437 passed, 2 skipped, 2 risky).

🤖 Generated with Claude Code

Adds the LocalBackgroundLayerPresent composition local and its tabs
Scaffold consumption, ported from super-native-web commit 210c941
("neutral core seams"). When a root host provides the local as true
(e.g. mobile-ui's background_layer map), the tabs Scaffold's container
goes transparent so the persistent layer shows through; otherwise the
themed surface is unchanged.

mobile-ui#37 depends on this seam and mobile-ui#40 removed the
reference as a stopgap; the plugin restores its provider once this
ships. Android only — iOS transparency coordination remains a gap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shanerbaner82
shanerbaner82 merged commit bb5fa0f into main Aug 4, 2026
3 checks passed
@shanerbaner82
shanerbaner82 deleted the feat/port-background-layer-seams branch August 4, 2026 19:32
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