feat: component type system foundation + browser editor#101
Open
TomProkop wants to merge 10 commits into
Open
Conversation
First step in consolidating component type resolution. Platform-metadata provides the authoritative ComponentType enum, ComponentDefinitionRegistry, and the new GetByName() lookup with alias support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
New metamodel introspection commands backed by ComponentDefinitionRegistry: - txc component type list: shows all registered types with aliases and identity - txc component type explain <type>: detailed ComponentDefinition metadata Accepts canonical names, aliases, enum names, and integer type codes via GetByName() cascading lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete ComponentTypeResolver.cs — its hardcoded type dictionaries are replaced by TALXIS.Platform.Metadata.ComponentDefinitionRegistry which provides the authoritative ComponentType enum (~95 codes), rich ComponentDefinition metadata, and alias support via GetByName(). Update all 8 call sites in env feature commands (dependency, layer, solution component, uninstall check) to use the registry directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open the Power Platform web editor for any component instance. Supports 8 platform types with dedicated URL patterns across 3 domains (make.powerapps.com, make.powerautomate.com, copilotstudio.microsoft.com) plus SCF fallback to Dynamics UCI record form. Components: - BrowserLauncher: cross-platform URL opener, headless-aware - MakerPortalUrlBuilder: static URL templates for all browsable types - ComponentBrowseCliCommand: --type, --id/--name, --entity, --solution Name resolution supported for solution (unique name) and entity (logical name → MetadataId). All other types require --id (GUID). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ands Delete: - Metamodel/ stubs (3 files, never wired) — replaced by txc component type list/explain - ComponentTypeListCliCommand.cs — moved to top-level - ComponentTypeExplainCliCommand.cs — moved to top-level - Nested ComponentTypeCliCommand/ComponentParameterCliCommand subgroups Restructure workspace ComponentCliCommand: direct children are now create and parameter-list. Type introspection lives at top level. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update CLI, MCP, and equivalence tests to reflect: - component type list/explain moved to top-level (txc component type ...) - workspace component parameter-list renamed from parameter list - MCP tool names updated to match new command paths - Assertions updated: pp-entity → Entity (registry-backed) All 26 tests pass, 5 skipped (env-dependent). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Support opening apps at runtime and deep-linking into specific pages within model-driven and canvas apps. Model-driven apps (AppModule): - App shell by name or GUID - Deep-link via --pagetype: entityrecord, entitylist, dashboard, webresource, control, custom, inlinedialog, genux, search - Record/form/view/dashboard/custom-page/PCF control/genux targeting - Form field pre-population via --extraqs - UI options: --navbar (on/off/entity), --cmdbar (true/false) Canvas apps: - Player URL with --screen navigation and --param custom parameters - --hidenavbar for embedding/testing Reports: - Viewer URL with --report-action (run/filter) URL builder uses generic AppModuleDeepLink() with pagetype + params dictionary — automatically supports future page types without code changes. UCI page types sourced from decompiled D365CE server 9.2 RedirectUtility.cs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace monolithic MakerPortalUrlBuilder with focused URL builder classes:
- MakerPortalUrls: make.powerapps.com editor URLs (solution, entity, form, view, role, dataflow)
- PowerAutomateUrls: make.powerautomate.com (flow editor, details, runs, specific run)
- CopilotStudioUrls: copilotstudio.microsoft.com (bot editor)
- DynamicsUciUrls: {org}.crm.dynamics.com/main.aspx (app shell, UCI deep-links, SCF records, reports)
- CanvasAppUrls: apps.powerapps.com/play (canvas app player)
- BrowseUrlConstants: shared constants (default solution GUID, org URL normalization)
Add Power Automate flow navigation options:
- --flow-view: editor (default), details, or runs
- --run: open a specific flow run by ID
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The UCI runtime is Power Apps, not Dynamics 365. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors component-type handling to a single registry backed by TALXIS.Platform.Metadata, introduces new top-level component-type discovery commands, and adds an environment component browse command to deep-link into the relevant Power Platform web editor for a component instance.
Changes:
- Add
txc component type list/explaincommands backed byComponentDefinitionRegistry(and remove legacy/stubbed metamodel/type code). - Add
txc env component browseplus URL-builder utilities and a cross-platformBrowserLauncher. - Migrate existing environment/workspace commands + integration tests to the new command surface and registry-based resolution.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/TALXIS.CLI.IntegrationTests/McpTests.cs | Updates MCP integration tests to use new operation names and canonical type names. |
| tests/TALXIS.CLI.IntegrationTests/EquivalenceTests.cs | Updates CLI↔MCP equivalence cases for renamed operations and arguments. |
| tests/TALXIS.CLI.IntegrationTests/CliTests.cs | Updates CLI integration coverage for new component type commands and expected output. |
| src/TALXIS.CLI/TxcCliCommand.cs | Registers the new top-level component command group under txc. |
| src/TALXIS.CLI/Component/ComponentTypeListCliCommand.cs | New command to list component types from the metadata registry (text table + JSON). |
| src/TALXIS.CLI/Component/ComponentTypeExplainCliCommand.cs | New command to print detailed ComponentDefinition information. |
| src/TALXIS.CLI/Component/ComponentTypeCliCommand.cs | New txc component type subgroup wiring (list/explain). |
| src/TALXIS.CLI/Component/ComponentCliCommand.cs | New txc component top-level group for metamodel introspection. |
| src/TALXIS.CLI.Features.Workspace/Metamodel/MetamodelListCliCommand.cs | Deletes unused/unwired metamodel stub. |
| src/TALXIS.CLI.Features.Workspace/Metamodel/MetamodelDescribeCliCommand.cs | Deletes unused/unwired metamodel stub. |
| src/TALXIS.CLI.Features.Workspace/Metamodel/MetamodelCliCommand.cs | Deletes unused/unwired metamodel group stub. |
| src/TALXIS.CLI.Features.Workspace/ComponentTypeListCliCommand.cs | Removes legacy workspace-scoped component type listing (template-engine based). |
| src/TALXIS.CLI.Features.Workspace/ComponentTypeExplainCliCommand.cs | Removes legacy workspace-scoped component type explain (template-engine based). |
| src/TALXIS.CLI.Features.Workspace/ComponentParameterListCliCommand.cs | Renames command to parameter-list and updates description to point to registry-based type metadata. |
| src/TALXIS.CLI.Features.Workspace/ComponentCliCommand.cs | Reworks workspace component group: keeps create + exposes parameter-list; removes nested type/parameter subgroups. |
| src/TALXIS.CLI.Features.Environment/Solution/SolutionUninstallCheckCliCommand.cs | Replaces legacy resolver usage with registry lookups for dependency printing. |
| src/TALXIS.CLI.Features.Environment/Solution/Component/SolutionComponentRemoveCliCommand.cs | Migrates type resolution to registry for remove operations. |
| src/TALXIS.CLI.Features.Environment/Solution/Component/SolutionComponentListCliCommand.cs | Migrates type filtering resolution to registry for list operations. |
| src/TALXIS.CLI.Features.Environment/Solution/Component/SolutionComponentAddCliCommand.cs | Migrates type resolution to registry for add operations. |
| src/TALXIS.CLI.Features.Environment/Component/Dependency/DependencyOutputHelper.cs | Uses registry to render component type names in dependency tables. |
| src/TALXIS.CLI.Features.Environment/Component/Dependency/ComponentDependencyRequiredCliCommand.cs | Migrates type resolution to registry for “required” dependency queries. |
| src/TALXIS.CLI.Features.Environment/Component/Dependency/ComponentDependencyListCliCommand.cs | Migrates type resolution to registry for “dependents” dependency queries. |
| src/TALXIS.CLI.Features.Environment/Component/Dependency/ComponentDependencyDeleteCheckCliCommand.cs | Migrates type resolution to registry for delete checks. |
| src/TALXIS.CLI.Features.Environment/Component/ComponentCliCommand.cs | Adds browse subcommand and updates description to include browser navigation. |
| src/TALXIS.CLI.Features.Environment/Component/Browse/PowerAutomateUrls.cs | New URL builders for Power Automate portal deep links. |
| src/TALXIS.CLI.Features.Environment/Component/Browse/PowerAppsUciUrls.cs | New URL builders for Power Apps UCI deep links and SCF fallback record form. |
| src/TALXIS.CLI.Features.Environment/Component/Browse/MakerPortalUrls.cs | New URL builders for Power Apps maker portal editors (solutions/entities/forms/views/roles/dataflows). |
| src/TALXIS.CLI.Features.Environment/Component/Browse/CopilotStudioUrls.cs | New URL builders for Copilot Studio bot/agent editor deep links. |
| src/TALXIS.CLI.Features.Environment/Component/Browse/ComponentBrowseCliCommand.cs | New txc env component browse command to resolve IDs/names and open the correct editor URL. |
| src/TALXIS.CLI.Features.Environment/Component/Browse/CanvasAppUrls.cs | New URL builder for canvas app player links (screen/params/navbar). |
| src/TALXIS.CLI.Features.Environment/Component/Browse/BrowseUrlConstants.cs | Shared constants + org URL normalization helper for URL construction. |
| src/TALXIS.CLI.Core/TALXIS.CLI.Core.csproj | Adds TALXIS.Platform.Metadata package reference for registry access. |
| src/TALXIS.CLI.Core/Shared/BrowserLauncher.cs | New cross-platform “open default browser” helper with headless detection. |
| src/TALXIS.CLI.Core/Contracts/Dataverse/ComponentTypeResolver.cs | Deletes legacy hardcoded name/code resolver in favor of metadata registry. |
1. Validate EnvironmentUrl before use — parse with Uri.TryCreate, fail with validation error for types that need orgUrl (AppModule, Report, SCF). CanvasApp/Workflow don't require it. 2. Reject non-positive raw type codes (rawCode > 0). 3. NormalizeOrgUrl uses Uri.TryCreate to extract host, not string replace. 4. BrowserLauncher logs at Warning level (not Information) for headless skip. 5. JSON output: aliases kept as string array, identity as enum value (not ToString). Text renderer formats for display only. 6. Package version note: 0.5.0-preview.1 is the local pack of the platform-metadata PR; will be updated to 0.5.0 when PR #55 is released. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unified component type system backed by
TALXIS.Platform.Metadata+ new browser editor command. Zero legacy/dead/duplicated code after merge.New commands
txc component type list— list all known component types (registry + aliases)txc component type explain <type>— full ComponentDefinition detailstxc env component browse— open Power Platform web editor for a component instanceDeleted
ComponentTypeResolver.cs— replaced byComponentDefinitionRegistry.GetByName()(8 call sites migrated)Metamodel/stubs (3 files) — never wired, replaced by realtxc component type list/explainComponentTypeListCliCommand.cs/ComponentTypeExplainCliCommand.cs— moved to top-levelComponentTypeCliCommand/ComponentParameterCliCommandsubgroupsBrowse command
Opens the web editor for any component type across 3 domains:
make.powerapps.com— Solution, Entity, Form, View, Dataflow, Security Rolemake.powerautomate.com— Flowcopilotstudio.microsoft.com— Bot/main.aspx?etn=...&id=...)Options:
--type,--id/--name,--entity,--solution. Headless-aware (skips browser open in CI).Architecture
This PR establishes the foundation for the component-type-extensible CLI:
txc component type— metamodel introspection (top-level, no context needed)txc env component— lifecycle operations against live environmenttxc ws component— workspace operations (safe, git-backed)Type-specific commands plug in incrementally. 13 tracking issues created for future work.
Dependencies
Requires TALXIS/platform-metadata#55 (Aliases + GetByName) → published as 0.5.0.
Tests
All 26 integration tests pass. +616/-363 lines across 29 files.
Tracking issues