Skip to content

Render full container app hierarchy at every entry point#1076

Draft
philliphoff wants to merge 1 commit into
mainfrom
philliphoff/full-app-node-hierarchy
Draft

Render full container app hierarchy at every entry point#1076
philliphoff wants to merge 1 commit into
mainfrom
philliphoff/full-app-node-hierarchy

Conversation

@philliphoff
Copy link
Copy Markdown
Member

Container app nodes appear in two places in the Azure resources tree: under their parent managed environment, and standalone (via the "Container Apps" resource type group or the Resource Group view). Previously the standalone copy was a flat leaf with a "Reveal in environment" command, forcing users to navigate elsewhere to inspect revisions, configuration, scaling, secrets, logs, etc. This PR renders the full container app subtree at every entry point, with refreshes synchronized across copies.

Approach

  • Introduce a ContainerAppNamespace ('' for the env tree, '#flat' for the standalone tree) and thread it through ContainerAppModel.treeIdPrefix. Every descendant tree item prefixes its id with that namespace so the two copies have non-colliding tree-element ids.
  • ARM-facing identifiers (containerApp.id, managedEnvironmentId, revision.id, etc.) stay bare/canonical. Only tree-item ids are namespaced, so reveal-by-resource-id still lands on the env-tree node.
  • Add containerAppRegistry, a small dispatcher that fans ext.state.* calls (notifyChildrenChanged, runWithTemporaryDescription, showDeleting, showCreatingChild) across every registered namespace. Command sites that previously refreshed a single subtree now go through the registry, so a deploy / delete / secret edit / revision change initiated from one copy updates both copies at the same time.
  • Replace the old flat ContainerAppResourceItem with ContainerAppsResourceBranchDataProvider, which constructs a fully-featured ContainerAppItem (with treeIdPrefix = '#flat') so the standalone view exposes the same children as the env-parented view.
  • Remove the now-obsolete containerApps.revealInEnvironment command and its menu wiring.

Notes for review

  • The managedEnvironmentId-based notifications (which refresh the env's app list) are retained alongside the new registry calls on containerApp.id (which refresh the app subtree in both copies). These are deliberately paired in command sites that mutate the app.
  • A couple of command sites previously passed item.id (now namespaced) to ext.state.*. Those derive the canonical id from the model instead so the dispatcher routes correctly.
  • The env tree's namespace is '', which keeps existing tree-item ids byte-identical to before for that copy.

Related: #1075

Previously, container app nodes shown in the standalone Container Apps
group (or Resource Group view) were flat leaves with a 'Reveal in
environment' command. Now the full container app subtree is rendered at
every entry point, with refreshes synchronized across copies via a
namespaced tree-id scheme and a shared registry dispatcher.

- Add ContainerAppNamespace ('' for env tree, '#flat' for standalone)
  and thread it through ContainerAppModel.treeIdPrefix.
- Add containerAppRegistry to fan ext.state.* calls across both copies.
- Replace ContainerAppResourceItem with ContainerAppsResourceBranchDataProvider
  that returns the full subtree.
- Remove the now-obsolete revealInEnvironment command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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