Skip to content

Wave C: navigation, Shell, CollectionView, toolbar and menu handlers - #13

Merged
Redth merged 33 commits into
mainfrom
redth-tizen-handler-wave-c
Aug 29, 2026
Merged

Redth merged 33 commits into
mainfrom
redth-tizen-handler-wave-c

Conversation

@Redth

@Redth Redth commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Stacked on redth-tizen-handler-wave-b. Ports the Tizen navigation, Shell, CollectionView, toolbar and menu handlers off Microsoft.Maui.Controls internals and onto the public MAUI API surface.

Full write-up: docs/waves/wave-c.md. Per-key coverage: docs/wave-c-mapper-parity.md.

What landed

20 handlers, all Tizen-prefixed in Microsoft.Maui.Platforms.Tizen.*, each declaring its own complete property and command mapper — 54 supported mappings and 30 documented no-ops.

Area Handlers
Navigation TizenNavigationViewHandler, TizenFlyoutViewHandler, TizenTabbedPageHandler
Toolbar TizenToolbarHandler
Menus 6 handlers, all explicitly Unsupported
Items TizenItemsViewHandler<T> + structured/selectable/groupable/reorderable, TizenCollectionViewHandler, TizenCarouselViewHandler
Shell TizenShellHandler, TizenShellItemHandler, TizenShellSectionHandler + ~19 platform views/adaptors

Because the handlers no longer mutate neutral static mappers through the internal RemapForControls hook, each is registered directly. That also removes an ordering hazard: RemapForControls had to run before the first handler was constructed.

Internal API coupling

The in-tree backend used 9 internal members. Each was verified against the shipped assembly by compiling a probe, not by reading source. Eight now have behaviour-preserving public-API replacements in Adapters/; one does not:

  • Toolbar.DrawerToggleVisible has no public equivalent. IToolbar publishes BackButtonVisible and IsVisible but not the third member of the same concept. Isolated behind a Tizen-owned ConditionalWeakTable adapter, not reflection.

Adapters/UpstreamApiRequests.cs carries all nine as machine-readable, concrete upstream API requests. A test fails if an adapter exists without a matching entry, so the list cannot rot.

Known gap: Shell.GetBindableObjectWithFlyoutItemTemplate is only partially reproducible. Its MenuShellItem branch cannot be expressed at all off-tree — MenuShellItem and its MenuItem property are both internal — so a bare MenuItem in a flyout falls back to the shell-level template.

Blocked: modal navigation is not ported. ModalNavigationManager is an internal partial class whose platform half must live in-tree; there is no public seam. Secondary toolbar items route through a new IToolbarSecondaryActionPresenter seam so the alerts/dialogs area owns that presentation instead of Wave C duplicating it.

There is no reflection anywhere in Wave C, and a test enforces that.

Verification — and its limits

The shipping TFM net11.0-tizen11.0 cannot be restored by anyone: Samsung has not published samsung.net.sdk.tizen.manifest-11.0.100. Rather than let ~7,000 lines go uncompiled, this PR adds an opt-in lane that compiles the exact same files (both projects import Sources.props) against net9.0-tizen7.0 — the repo's own declared behaviorBaseline — with real TizenFX and real MAUI references:

./eng/validation/run-validation-lane.sh

This is not a neutral fallback; net9.0-tizen7.0 produces genuine Tizen assemblies. It provisions an isolated SDK under artifacts/ rather than mutating the machine-wide dotnet install. Its project file is generated into artifacts/ rather than committed, so the repo's .NET 11 floor invariant stays absolute.

It compiles green, including the catalog pages. It does not prove runtime behaviour — there is no emulator or device here, so virtualization, navigation animation and Shell lazy content are unverified at runtime.

Tests

17 new tests in the existing Maui.Tizen.SourceTests project (32 pass; the 5 EmittedTypeTests failures are pre-existing and reproduce identically on unmodified Wave B, since they need a built Tizen assembly).

While generating the manifest I fixed a latent bug in Wave B's shared parser: it only recognised mapper fields named exactly Mapper/CommandMapper, so handlers shadowing a generic base mapper reported zero coverage and produced dozens of fictitious parity gaps. docs/wave-b-mapper-parity.json is regenerated as a correction, not drift.

Follow-ups

  • Fold Maui.Tizen.Controls.Navigation into Maui.Tizen.Controls once the earlier waves finish reworking the raw imports that project still globs; today it would not compile.
  • Align Wave C handlers onto Wave B's TizenViewHandler<,> core contract.
  • Raw superseded sources under src/Maui.Tizen.Controls/Core/ are intentionally left in place so a rebase is a content merge, not a delete/add conflict.

Copilot AI added 7 commits August 26, 2026 15:38
Checkpoint of the Wave C migration ahead of merging Wave B.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ports the Tizen items handlers, template adaptors, grouping/selection
sources and the TabbedPage handler off Microsoft.Maui.Controls internals
and onto public API, and adopts the Wave B source-test conventions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Generates the Wave C mapper parity manifest from source and adds the Wave C
source-integrity and parity tests to the existing SourceTests project. Moves
the compile-verification lane out of the project graph so the repository's
.NET 11 floor invariant stays absolute.

Also fixes a latent bug in the shared handler parser: it only recognised
mapper fields named exactly Mapper/CommandMapper, so handlers shadowing a
generic base mapper reported zero coverage and produced fictitious parity
gaps. wave-b-mapper-parity.json is regenerated as a result.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds BadgeText/BadgeColor/BadgeTextColor (dotnet/maui#37755) to
TizenTabbedPageHandler as documented no-ops, matching upstream's own
support matrix for Tizen, and regenerates the parity artifacts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Redth
Redth marked this pull request as draft August 26, 2026 23:06
@Redth

Redth commented Aug 26, 2026

Copy link
Copy Markdown
Owner Author

⏸️ On hold — do not merge

Converted to draft at the migration coordinator's request. Wave C must not be finalized on the current handler contract.

Blocked on, in order:

  1. Core / Wave A handler-interface and Controls mapper redesign
  2. Wave B follow-up landing on top of that

Why this matters for Wave C specifically. Every one of the 20 handlers here derives from Microsoft.Maui.Handlers.ViewHandler<,> / ElementHandler<,> and declares its own complete property + command mapper, because the internal RemapForControls hook is unreachable out-of-tree. Both halves of that are exactly what the redesign is expected to change:

  • Wave B has since introduced a shared TizenViewHandler<TVirtualView, TPlatformView> core contract; Wave C predates it and has not been aligned onto it.
  • If the Controls mapper redesign changes how per-platform mappers are composed, the mapper declarations — and therefore docs/wave-c-mapper-parity.json, which is generated from source — will need regenerating rather than hand-patching.

Rebasing now would just have to be redone, and would churn the parity artifact for no review benefit.

What is deliberately not happening while this sits:

  • No rebase onto redth-tizen-handler-wave-b, the foundation, or the moving MAUI package floor (11.0.0-preview.7.26426.4 @ bedd1b18).
  • No bump of Directory.Packages.props / eng/baselines.json — those stay foundation-owned.

What will happen here: review fixes only, kept as isolated commits on top of the existing history so they stay reviewable independently of the contract migration.

Current state is green and self-consistent: the net9.0-tizen7.0 compile-verification lane builds clean (catalog pages included), and the source tests pass 32/32 for Wave C. The 5 EmittedTypeTests failures are pre-existing and reproduce identically on unmodified Wave B — they need a built Tizen assembly.

Ping me when the redesign and the Wave B follow-up have landed and I'll rebase, re-align the handlers onto the new contract, regenerate the parity artifacts, and mark this ready for review.

Copilot AI and others added 19 commits August 26, 2026 19:36
The previous revision treated a net9.0-tizen7.0 compile as acceptance. That
was wrong: MAUI 9.0.120 still ships a Tizen build, so it resolved MauiToolbar,
StackNavigationManager and IPlatformViewHandler from the MAUI package itself
and went green. None of those exist on the net11 surface.

Every Wave C source and catalog page is now listed for the existing API15
RefPackCompile lane, which type-checks against the real net11 public MAUI
packages and Samsung.Tizen.Ref.API15. Wiring it up surfaced 60 diagnostics the
behaviour-baseline compile could not see; all are fixed:

  - net11 I*Handler contracts declare PlatformView as `object` (CS9333, CS8766)
  - IPlatformViewHandler is in-tree-only; core owns ITizenPlatformViewHandler
  - NUI Dispose participation (CS0108, CS0114)
  - redundant `new` on per-handler mapper fields (CS0109)

Two Core primitives remain unavailable - MauiToolbar and
StackNavigationManager - with a 25-of-50-file blast radius, so the wave is
gated on MauiTizenWaveCAcceptance rather than half-verified. Wave C does not
declare its own copies; that stays Core's job.

Also adds expiry tests for the provisional adapters, a superseded-source
manifest so no raw import can reach a compiled list, and a check that every
no-op justification is feature-specific rather than boilerplate.

Modal remains unported and uncompiled; the secondary-action seam stays a seam.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…l one

The ShellTemplateResolver expiry test watched for
Shell.GetBindableObjectWithFlyoutItemTemplate becoming public. Upstream is not
planning to publish that name: dotnet/maui#37862 proposes a different shape -
IsFlyoutItemTemplateSet, GetFlyoutItemTemplateSource and
GetFlyoutItemTemplateProperty, used with the already-public
IShellController.GetFlyoutItemDataTemplate.

As written the test could never have fired, so the adapter would have quietly
become permanent - exactly the rot these tests exist to prevent. It now watches
the three proposed members and names the follow-up work when they land.

#37862 is OPEN, so nothing adopts it here. ShellTemplateResolver's
implementation is untouched and stays provisional until the API merges and
ships in a referenced package. Only the detector, the request ledger and the
wave doc change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…name

The proposed API has changed shape twice while this adapter sat here: the
internal GetBindableObjectWithFlyoutItemTemplate, then a three-method contract,
and now a single resolve-style call. Each time the expiry test named members
explicitly it silently stopped detecting anything - worse than having no test,
because a green build then implies the adapter is still needed.

The detector now matches the concept: any new public Shell member about a
flyout item template. It is covered by table-driven tests proving it fires for
the resolve-style shape, the three-method shape and plausible alternatives,
while ignoring pre-existing members - so it is verified to trigger rather than
merely assumed to.

dotnet/maui#37862 remains OPEN and under design. No shape is adopted;
ShellTemplateResolver's implementation is untouched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Core owns TizenToolbarView, TizenStackNavigationManager, TizenFlyoutView /
TizenTVFlyoutView, the native DrawerView update extensions and the
FlyoutBehavior mapping. Wave C owns the Flyout/Shell/navigation handlers plus
its own cleanup: re-pointing at existing Core/Wave B names, and inlining the
handler-specific toolbar attach.

Documentation only. The cleanup is deliberately not started: the names it would
re-point at are the ones still under review, so doing it now would mean doing it
twice.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tion bug

Introduces ShellFlyoutTemplateResolution.ResolveFlyoutItemTemplate, whose
signature is deliberately identical to the redesigned upstream API in
dotnet/maui#37862 so adoption becomes a one-line body swap. Nothing is bound to
the open PR.

Building the seam surfaced a real bug. The call sites passed a PRE-RESOLVED
template owner to IShellController.GetFlyoutItemDataTemplate, but that method
re-derives the owner itself and picks the BindableProperty from its argument's
own type. Handing it the owner therefore selected ItemTemplateProperty where
MenuItemTemplateProperty was authored, silently dropping MenuItemTemplate for
flyout menu items - and also skipped the internal MenuShellItem branch that only
that method can reach. The raw item is now passed, which is both correct and
what upstream does.

The seam also returns DataTemplate? rather than a template-or-default, because
GetFlyoutItemDataTemplate never returns null; calling it unguarded would have
replaced Tizen's own flyout item view with MAUI's generic cell for every app
that never authored a template.

Records Core's published shapes (163677d) including the TizenNaviPage rename and
the ITizenToolbarContainer push contract, and notes that TizenShellView's
pull-based toolbar wiring must be reworked on rebase since SetToolbar disposes
the toolbar it replaces.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Trial-merged Core PR #5 head 4e256f1 locally, compiled Wave C against it with
the API15 acceptance gate on, then discarded the merge. Core is COMPLETE for
Wave C - every type and extension Wave C needs is present, including the
FlyoutBehavior mapping, which Core named ToTizenDrawerBehavior rather than
ToPlatform. After the four renames all remaining diagnostics were Wave C's own
section C/D cleanup.

The trial also surfaced a Core <-> Wave B duplicate-surface collision that is
not Wave C's: TizenPlatformExtensions and TizenWaveBViewExtensions both declare
ToPlatformVisibility, UpdateFlowDirection and UpdateVisibility in the same
namespace, so every consumer gets CS0121. That will break the Core -> Wave A ->
Wave B rebase independently of Wave C; reported to the coordinator.

Independent review rejected the decomposed three-member #37862 proposal, so the
expiry detector explicitly stays broad enough to catch both that shape and the
expected single nullable resolver. No name is treated as final.

Nothing rebased, nothing adopted; PR #13 remains draft.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ad 6cc7f668f0

Reviewed the redesigned PR body rather than the summary, and found a semantic
mismatch in my own seam: upstream's ResolveFlyoutItemTemplate does NOT resolve
DataTemplateSelectors - it documents that as the caller's job - while my seam
resolved them internally. Adopting it would therefore have been a silent
behaviour change, not the one-line body swap the seam exists to enable.

The seam now matches exactly: throws on a null item, resolves the owning Shell
when null, honours an explicitly-null template as a per-item opt-out from the
Shell-level template, and returns the raw template. Selector resolution moved to
the two call sites, matching upstream's documented usage example.

The expiry detector now pins ResolveFlyoutItemTemplate by name AND keeps the
broad concept match. The broad match is deliberately retained rather than
replaced: the PR is still open and re-reviewing, and narrowing to a single name
is what blinded this test twice already.

Nothing adopted - #37862 is still open and the referenced package does not
contain the API. Asserted by test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
MAUI's PropertyMapper<TVirtualView, TViewHandler> casts the handler when it
dispatches, so an interface-declared mapper instantiated over a concrete
built-in handler makes any chained Tizen mapping throw at runtime. Wave C is
structurally exposed: all 86 of its mapper delegates take a concrete
Tizen*Handler.

Adds two source-level invariants, both passing: every mapping delegate accepts
exactly the handler type its mapper is declared over, and no mapper is declared
over a MAUI handler interface. The first is checked PER CLASS - a file-wide
lookup produced 13 false mismatches, because several handlers share a file and
reuse method names such as MapText.

These are necessary but not sufficient. The runtime half needs a real Controls
host that enumerates and dispatches every key, which cannot be written until the
predecessor stack lands and which host tests cannot do for NUI views. A
placeholder test fails the moment the acceptance gate opens, so the gap closes
deliberately rather than being forgotten; verified by temporarily opening the
gate and observing it fail.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Two Wave C pieces are pure Microsoft.Maui.Controls code with no NUI dependency,
so they are now compiled into the source-test project and actually run rather
than only being parsed.

Flyout template resolution gains executable regression tests pinning the exact
bug fixed earlier: MenuItemTemplate authored on the item and on the parent both
resolve when the RAW item reaches IShellController, a Shell-level ItemTemplate
does not capture a MenuItem, no authored template returns null so Tizen keeps
its own flyout item view, an explicit null is a per-item opt-out, and selectors
come back unresolved. Validated by reintroducing the regression and confirming
the parent-level test fails.

Toolbar handling moves from a cached field to ToolbarOwnership<T>. Core's
SetToolbar disposes the toolbar it replaces, so the cached-field shape could
unsubscribe from an already-disposed instance during teardown. The tracker
unsubscribes the outgoing toolbar before transfer, subscribes exactly once,
and releases idempotently; it is generic and NUI-free so all of that is
host-executable, including the disposed-instance case.

ToolbarOwnership lives under Platform/ rather than Adapters/: it implements
Core's contract safely and is not a stand-in for missing upstream API, so it
should not be in the list of adapters awaiting an upstream request. The adapter
guard caught that placement.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n against

The "Core is complete for Wave C" result was produced against Core head
4e256f1. Live Core is 2f19d87 - 19 commits and ~596 lines of
src/Maui.Tizen.Core churn further on - so that result is stale and is not Core
approval. It is relabelled rather than deleted, since the finding is still
useful history.

A spot check confirms all six types Wave C needs still exist at the live head,
but existence is not signature compatibility, and only re-running the throwaway
integration against stable reviewed Core -> Wave A -> Wave B heads can answer
that. Deliberately not re-run yet: against a moving target the findings expire
before they can be acted on.

Adds a test pinning the head the verification ran against, so a completeness
claim is always attributable to a specific commit. Reporting one against an
already-superseded head is easy to do and hard to notice.

The three-extension CS0121 collision is recorded as confirmed and assigned:
Core owns the members, Wave B deletes its duplicates during the final rebase.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Upstream settled dotnet/maui#37863 as an additive interface -
IToolbarDrawerToggleVisible with a get-only DrawerToggleVisible; IToolbar is
unchanged - and removed the Tizen write/latch. Wave C's ConditionalWeakTable
faithfully reproduced that latch, so it is now wrong in two ways.

No write, no latch. The value is computed on read, which also removes a real
staleness hazard: a stored flag is only as fresh as the last code path that
remembered to update it.

Back-precedence, not mutual exclusivity. The latch stored
drawerToggle && !backButton, conflating "a drawer toggle is available" with
"a drawer toggle is what we draw". The capability now stays true while a back
button shows; only the renderer applies precedence.

Off-tree wrinkle found while doing this: ShellToolbar is NOT an Element, so
there is no public path from a toolbar to its shell to compute the value from.
Rather than reintroduce a latch, the caller that knows the owner passes it in
and a caller that does not gets false. On adoption every call site collapses to
the pattern match and the owner parameter goes away with the adapter.

Adds the DrawerToggleVisible mapper key (literal, so the parity generator can
extract it; the string is identical to the upstream member name) and nine
executable tests, including one that fails under the old latch. The expiry
detector now watches for the capability interface - watching IToolbar alone
would never have fired, since IToolbar is deliberately unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CI failed where local passed on the same commit and packages. Root cause: MAUI's
neutral mappers are MUTATED at runtime - FlyoutPage.RemapForControls() adds
FlyoutLayoutBehavior to the static FlyoutViewHandler.Mapper when a Controls host
is built. Reading a neutral mapper before that gives a smaller key set than
after, so the generated parity manifest depended on TEST ORDER.

NeutralMaui now forces the remaps in its static initializer, and
ControlsRemapsAreDeterministic asserts they actually ran - the first attempt
silently swallowed a reflection failure and left the key set half-populated,
which is exactly the failure mode this is meant to remove.

With generation deterministic, three genuinely missing behaviours surfaced. None
was a no-op, and none is regenerated away:

  * FlyoutLayoutBehavior - a Controls-level property projected into
    IFlyoutView.FlyoutBehavior. Now re-dispatches FlyoutBehavior, matching
    upstream's FlyoutPage.MapFlyoutLayoutBehavior. Without it, switching
    Popover<->Split at runtime left the drawer in its previous mode.
  * ItemsView.IsVisible on CollectionView and CarouselView - Controls routes this
    through the items handler because the platform view is the scrolling
    container. The port had dropped it, so hiding a CollectionView did nothing.

WaveCNeutralKeyCoverageTests proves FlyoutLayoutBehavior really does change the
projected FlyoutBehavior, so the mapping is necessary rather than merely
present, and asserts the uncovered set is EMPTY so a future neutral key fails
the build instead of being appended on the next regeneration.

Wave B's manifest is regenerated by the same fix and now records StrokeDashArray
and IconColor gaps that were previously invisible; those are Wave B's to close.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The previous fix was incomplete, and a green full suite could not reveal it. It
forced the Controls remaps from a static constructor, but C# runs static FIELD
INITIALIZERS before the static constructor body, so NeutralMaui.ViewMapperKeys
still snapshotted the un-remapped mapper. The suite passed only because an
earlier test had already initialized Controls; run alone in a fresh process the
parity tests failed with false BackgroundColor gaps.

Every mapper-derived value is now lazy and routed through an idempotent
EnsureRemapsBeforeReadingMappers() called from each mapper-reading entry point,
rather than from type initialization.

Three tests pin it, and all three were validated by removing the guard and
confirming each fails. That mattered: the first draft of
CapturedMapperSnapshotsMatchTheLiveSharedMapper PASSED with the bug present,
because it read the live side through a helper that itself forced the remaps, so
both sides went stale together. It now captures the snapshot first, then forces
the remaps, then reads the mapper by raw reflection.

Adds eng/run-parity-isolation-checks.sh, which runs each parity-sensitive test
alone in a fresh process, and wires it into the workload-free CI lane - a green
full suite is not sufficient evidence of determinism.

StrokeDashArray and IconColor remain recorded as genuine Wave B gaps; all eight
survive this change untouched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reviewing the exact-head-approved dotnet/maui#37863 (53b9073) surfaced a race in
Wave C's port that the summary alone would not have shown. Back button, drawer
toggle and title icon all render into ONE navigation slot, and title icons load
asynchronously - but the load callback wrote the icon unconditionally. A callback
landing after the navigation state moved on silently overwrote whichever icon
was then correct, and two racing loads could land out of order.

Upstream added a generation guard for exactly this. TizenToolbarNavigationSlot
now gives every slot update a generation and rejects any callback superseded
either by a newer update or by the title icon having been replaced at the same
generation - both checks are needed, and each has a test.

Precedence also moves into one place as TizenNavigationIconKind, so
back-over-drawer is decided once rather than in parallel if-chains that can
disagree. The capability itself stays independent of the back button.

Eleven executable tests; four of them fail with the guard removed, verified.

The public shape is unchanged at the approved head, so nothing is adopted:
IToolbarDrawerToggleVisible is still absent from the referenced package, the CWT
adapter stays, and the expiry test still asserts the interface does not exist.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Review of 302656c found two defects in the single navigation icon slot.

A late title-icon load could repaint a slot it no longer owned. The
generation guard and image-source comparison are necessary but not
sufficient: setting TitleIcon while a back button is already showing
starts a load at the newest generation for the current source, so both
existing checks pass and the icon overwrites the back button on arrival.
IsCurrentTitleIconUpdate now also takes the drawer-toggle capability and
rejects the result unless the title icon still owns the slot, matching
the NavigationIconKind == TitleIcon requirement upstream added in
dotnet/maui#37863 (approved head 53b9073).

The flyout owner was derived from TizenToolbarHandler.VirtualView, which
IS the toolbar, so the `as IFlyoutView` cast never matched and the
drawer-toggle capability was permanently false. On a Shell, pushing then
popping a page restored an empty navigation slot instead of the
hamburger, with FlyoutBehavior unchanged throughout.
ToolbarDrawerToggle.FindFlyoutOwner now resolves the owner from
Toolbar.Parent and walks that page's public IElement.Parent chain to the
nearest Shell or FlyoutPage. Controls' own FindParentOfType is internal
and deliberately not used. The walk returns the nearest flyout ancestor
of either type, so a FlyoutPage inside a Shell resolves to the
FlyoutPage that actually owns its drawer.

Both fixes have negative controls: reverting the owner check fails two
navigation-slot tests, and restoring the null-owner short-circuit fails
two drawer-toggle tests including
PoppingBackToTheRootRestoresTheDrawerToggle.

Also records a methodological finding. With the acceptance gate open the
API15 lane validates syntax and declarations only and never binds method
bodies, because csc abandons the compilation after the declaration phase
reports the 50 expected CS0246s. This was established by watching an
injected call to a non-existent method produce no diagnostic while an
injected syntax error in the same file reported immediately. The
net9.0-tizen7.0 comparison lane fails in its own declaration phase and
does not close the hole either. Method bodies are executed only in
tests/Maui.Tizen.SourceTests, where the pure-Controls adapters are
compiled directly.

Gate behaviour is unchanged (40 MauiToolbar + 10 StackNavigationManager),
parity manifests are unchanged, and the suite is 122 green with parity
isolation passing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d33bb102-df70-4547-b840-c3f86c614b0e
ItemSelectionState is the adapter that replaced the internal
View.IsItemSelected, on the documented claim that entering the Selected
visual state was that property's only observable effect. That claim is
the whole justification for dropping the internal dependency and nothing
verified it.

The adapter is pure Microsoft.Maui.Controls with no NUI dependency, so it
is now compiled into the net11 source-test assembly and executed. This
matters more than it looks: while the Core gate is open the acceptance
lane abandons compilation after the declaration phase and never binds
method bodies, so compiling this file proved nothing whatsoever about its
behaviour.

Tests cover select, deselect, idempotent re-selection (recycled rows must
be re-driven rather than toggled), focus setting both the Focused state
and IsFocused, unfocus clearing both, a null view, and an item whose
template declares no visual states. Negative control: stubbing the state
transition out fails 4 of the 7.

Source tests 129 green, parity isolation and the full workload-free build
pass, and the acceptance gate is unchanged at 40 MauiToolbar +
10 StackNavigationManager.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d33bb102-df70-4547-b840-c3f86c614b0e
Three defects found by exact review of f8f0f69.

The shell view toggled the drawer on every IconPressed while
FlyoutBehavior was Flyout. The toolbar handler subscribes to the same
event, so a back press toggled the drawer open AND popped the stack: the
drawer stays available in flyout mode while a pushed page shows a back
button, so availability is not ownership. The FlyoutPage handler had the
mirror-image bug - its guard honoured back precedence but not the drawer
capability, so a Split (Locked) flyout with no toggle at all still opened
its drawer. Both call sites now route through one predicate,
ToolbarDrawerToggle.ShouldToggleDrawer, which asks the same question the
rendering does.

MapFlyoutLayoutBehavior re-dispatched FlyoutBehavior but only updated the
drawer. FlyoutLayoutBehavior projects into IFlyoutView.FlyoutBehavior
(Popover -> Flyout, Split -> Locked) and so changes whether a drawer
toggle exists, which means the toolbar's leading slot has to be redrawn
too; otherwise the hamburger survives a switch to Split and a switch back
to Popover leaves the slot empty.

ItemSelectionState's one-shot GoToState was not equivalent to the
internal View.IsItemSelected it replaced. The internal property was
durable state that took part in every later recomputation; a one-shot
transition stores nothing, so selection was lost when focus changed,
could paint over Disabled, and a recycled row could not be asked whether
it was selected. Selection and pointer-over are now stored in attached
BindableProperty values - the shape upstream's own Tizen
ShellFlyoutItemView uses, and public API, so no reflection - and every
change recomputes by precedence: Disabled > Selected > PointerOver >
Normal, then focus applied independently as VisualElement.ChangeVisualState
does. Applying the base state before the focus transition is what makes
selection survive unfocus when a template authors no Unfocused state.
Reset clears everything the adapter owns and is now called on the recycle
path. VisualElement.IsPointerOver is internal and deliberately not read.

Negative controls fire for all three, including a faithful reproduction of
the original focus path. One trap is recorded in the docs: Toolbar.IsVisible
defaults to false, and a first draft of the back-press test passed for that
reason rather than the intended one.

Also records that the Core dependency surface is wider than the two gated
type names. A throwaway probe compiled the real upstream MauiToolbar,
StackNavigationManager and NaviPage alongside Wave C so the declaration
phase could complete and bodies would bind. No error landed on Wave C's own
logic; every diagnostic was a Core-owned symbol not yet landed (the six
DrawerView extensions, the flyout primitives, WrapperView members, the
colour/scale conversions, ViewHandler.MapToolbar, IPlatformViewHandler).
The probe vendored upstream source and was deleted rather than committed.

Source tests 145 green, parity manifests unchanged, gate unchanged at
40 MauiToolbar + 10 StackNavigationManager.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d33bb102-df70-4547-b840-c3f86c614b0e
Eight defects found by exact review of fc31251.

SHELL CONTENT

TizenShellView.UpdateCurrentItem, TizenShellItemView.UpdateCurrentItem and
TizenShellSectionView.UpdateCurrentItem had all survived the port as empty
bodies whose only content was a comment claiming another layer did the
work. Nothing did, so the Shell hierarchy was never mounted and the root
rendered blank. They now implement the real
Shell -> ShellItem -> ShellSection -> current ShellContent chain, disposing
the previous item handler and mounting the new platform view.

Content is created lazily and reused, because rebuilding a section's view
would discard its navigation stack and scroll position. Switching unmounts
without disposing; disposal happens on removal or shell-item teardown.
Those rules live in ShellSectionViewCache<TSection, TPlatformView>, generic
so it holds no NUI reference - TizenShellItemView is an NView and cannot be
instantiated off-device, so otherwise lazy creation and content switching
could only be asserted about, which is the exact failure mode that produced
the no-ops in the first place.

TabBarIsVisible had the same bug one level up: its mapper called
UpdateCurrentItem(), itself one of the no-ops, so runtime toggling did
nothing. It now calls UpdateTabBar, which respects ShellItemController.ShowTabs.

Shell adaptors register through the same native-to-MAUI lifecycle the items
adaptors use, so recycled rows rebind and UpdateViewState drives selection.
Default flyout/top/bottom item views author Normal/Selected visuals with
appearance bindings, and active tab bars use SingleAlways.

ITEM SELECTION

Selection synchronisation had no re-entrancy guard: a native change wrote
the virtual view, whose property change ran the mapper, which pushed back
into the native view, which raised the native event again. It was also
add-only - nothing was ever deselected, so removing an item left it
selected natively and SelectedItem = null did nothing. ItemSelectionSynchronizer
records the direction of travel to drop the echo and syncs as a set
difference in both directions using RequestItemUnselect, which existed and
was simply unused.

IsItemSelectableAt was defined on the grouped adaptor and never called from
anywhere - dead code - so group headers and footers were selectable. It is
now applied before a push and on the native-originated path, where a
rejected row is also deselected so the two sides cannot disagree.

A holder moving to Selected is selected and NOT focused, so the stored
focus is cleared in the same recomputation; two calls would recompute twice
and flash through Focused.

IsEnabled is observed, and here Wave C hit a real upstream limit rather
than a shortcut. VisualElement.ChangeVisualState runs from the IsEnabled
property-changed callback, which fires after both PropertyChanging and
PropertyChanged - measured with a probe - and applies Normal on re-enable
with no knowledge of selection. No public hook runs after it and
VisualStateGroup is sealed with no notification. That is exactly why the
property this replaced was internal: it was read INSIDE ChangeVisualState.
The disable direction recovers automatically; re-enable needs
ItemSelectionState.Refresh, which UpdateViewState calls. The residual gap
is device-observable only and is pinned by a test that will fail, and tell
us to delete the workaround, if upstream closes it. MAUI-TIZEN-API-0006 is
corrected in place: its previous "(none required)" rationale was disproved
by this work.

Every fix has a negative control. Tests 185 green (was 167), parity
manifests unchanged, gate unchanged at 40 MauiToolbar + 10
StackNavigationManager, no Controls.Internals usings and no reflection in
Wave C.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d33bb102-df70-4547-b840-c3f86c614b0e
Eleven own-scope defects found by exact review of d8de267.

REACHABILITY

Every handler in this assembly was unreachable. MAUI resolves handlers
from a registry and nothing registered these, so they fell back to a
neutral registry that has no entry for them. Implemented, mapped and
tested is not the same as reachable, and nothing in the build said
otherwise. TizenNavigationHandlers registers all 15 concrete handlers and
UseMauiTizenNavigation wires it from a MauiAppBuilder. Registration
replaces rather than chains, because these handlers declare their own
mappers instead of extending the neutral ones. The test DERIVES the
expected set from the source tree, so adding a handler without
registering it now fails; it also rejects duplicates, since the later
registration silently wins. Only the call site remains integration work.

LATENT COMPILE ERRORS

TizenShellView.Dispose(DisposeTypes type) branched on an undefined
`disposing`; it now tests type == DisposeTypes.Explicit. All three Shell
NUI views now complete the base disposal chain, without which the native
handle leaks regardless of what managed teardown released.

Running the acceptance lane with the two missing Core types supplied -
the only way to bind method bodies while the gate is open - surfaced four
real errors the gated build reported as clean: the Dispose bug, two
missing `using System;` (TizenToolbarNavigationSlot, TizenNavigationHandlers)
and a missing `using Microsoft.Maui.Dispatching;`. Two were written this
round; two had been in the tree unnoticed. That is the concrete cost of
the gate hiding the body phase.

SHELL

ShellSection mounts the current content's Page via the public
IShellContentController.GetOrCreateContent(), caching per ShellContent
through the existing NUI-free cache helper. The four Shell item adaptors
no longer keep private native-view tables: TizenItemTemplateAdaptor
exposes Register/Get/UnregisterNativeView and they all go through it, so
recycled rows rebind, UpdateViewState resolves the MAUI view, and removal
unregisters instead of leaving an entry that lets a recycled native view
resolve to a disposed handler. Flyout appearance binds an explicit shared
source; TabbedPage CurrentPage selects the native child tab and labels
bind each child Page.Title. A detached bottom tab bar is re-attached
before the unchanged-items fast path.

ITEMS

Observable sources are subscribed BEFORE the empty check, so a source
that starts empty now observes its first add, and real/empty adaptor
transitions are centralized so field, native adaptor, subscriptions and
disposal cannot drift. Group header rejection cannot be pre-empted -
the native CollectionView offers no hook - so the previous valid index is
preserved and restored, which keeps a SingleAlways collection from being
left with nothing selected.

SELECTED AFTER RE-ENABLE

Not accepted as a bug. ChangeVisualState runs after both notifications
and applies Normal with no knowledge of selection, so recomputing from
the event is always overwritten. Dispatching the refresh puts it after
the whole set-value operation including ChangeVisualState, so the
behaviour is correct on device with no upstream change.
ItemSelectionState.PostRecompute is the seam, defaulting to the element's
dispatcher and substituted in host tests, which have none - so the tests
exercise the real sequencing. The test that previously blessed Normal is
replaced. MAUI-TIZEN-API-0006 is corrected a second time and now stands
only as an ergonomic request.

Items 12 and 13 are recorded as final-stack work: toolbar detach-before-
transfer during Core inlining, and making the acceptance compile
unconditional so missing declarations can no longer hide other errors.

Tests 211 green (was 194), every fix with a negative control, parity
manifests unchanged, gate unchanged at 40 MauiToolbar + 10
StackNavigationManager, no Controls.Internals usings and no reflection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d33bb102-df70-4547-b840-c3f86c614b0e
@Redth
Redth changed the base branch from redth-tizen-handler-wave-b to main August 29, 2026 05:18
Fold navigation, Shell, items, carousel, toolbar, and menu handlers into Maui.Tizen.Controls; align them with the finalized Tizen composition, mapper, ownership, API15, PublicAPI, and source-validation infrastructure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Redth and others added 6 commits August 29, 2026 05:02
Harden Shell/navigation, items, grouping, selection, adaptor ownership, scrolling, carousel feedback, mapper parity, API documentation, and lock-protected mutation coverage on the unified Controls production path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Complete grouped item retention, deferred selection/layout synchronization, Shell flyout/search/toolbar ownership, and navigation teardown semantics. Expand production-path tests, parity artifacts, documentation, and locked mutation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Harden grouped adaptor notifications, selection ordering, Carousel state, Shell search and toolbar ownership, navigation rebinds, and stale async completion handling. Expand executable coverage and locked mutation controls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Add finite items measurement, internal-only Carousel empty semantics, holder-index row ownership, selector-safe decoration templates, normalized observable changes, and final Shell/search lifecycle corrections with expanded mutation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Route Shell navigation through MAUI's request handshake, account for superseded native pops, shift realized row indexes, normalize observable changes, harden flyout/search races, and strengthen production mutation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Close search replacement and focus races, normalize unknown observable indexes, prevent no-op Carousel scrolling state, and add direct production-path coverage for navigation handshakes, stale pops, selectors, and realized row shifts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
@Redth
Redth marked this pull request as ready for review August 29, 2026 16:45
@Redth
Redth merged commit ee7b42e into main Aug 29, 2026
5 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.

2 participants