Skip to content

feat(GenPage): redesign as first-class project type with SCF packing#64

Draft
TomProkop wants to merge 7 commits into
masterfrom
feat/genpage-multipage-redesign
Draft

feat(GenPage): redesign as first-class project type with SCF packing#64
TomProkop wants to merge 7 commits into
masterfrom
feat/genpage-multipage-redesign

Conversation

@TomProkop

Copy link
Copy Markdown
Member

Redesigns TALXIS DevKit GenPage support so GenUX pages behave as a first-class project type peer to ScriptLibrary/Plugin/PCF.

Summary

  • New GenPage project type (csproj <ProjectType>GenPage</ProjectType>) discovers pages by filename convention (*.tsx at project root, excluding underscore-prefixed files).
  • Each page projects through Rollup → page.compiled and is packed into the consuming Solution project as a uxagentproject SCF component.
  • ProjectReference from a Solution project consumes GenPage output the same way it consumes Plugin/ScriptLibrary/PCF — no manual ID wiring in csproj.
  • Solution-owned XML metadata: stable IDs are persisted under <solution>/uxagentprojects/<projectId>/uxagentproject.xml so renames don't change SCF identity.

SCF layout

The pack output now matches the on-disk layout produced by SolutionPackager when exporting a real environment:

uxagentprojects/{uxagentprojectid}/uxagentproject.xml
uxagentprojects/{uxagentprojectid}/uxagentprojectfiles/{uxagentprojectfileid}/uxagentprojectfile.xml
uxagentprojects/{uxagentprojectid}/uxagentprojectfiles/{uxagentprojectfileid}/filecontent/{baseFileName}

Verified by exporting a live solution from a tenant containing a GenPage and round-tripping pack/unpack.

Specifically:

  • uxagentproject.xml root has only uxagentprojectid; body is <iscustomizable>, <name>, <statecode>, <statuscode>.
  • uxagentprojectfile.xml body uses base filename in <filecontent> and the canonical logical path (src/pages/page.tsx, etc.) in <filename>.
  • Payloads sit at filecontent/<baseName>, flat (not nested under the logical path).
  • No <RootComponent type=\"10090\" .../> in solution.xml.
  • No <uxagentprojects/> placeholder in customizations.xml (it would cause SolutionPackager's GenericComponentProcessor to claim the folder and look only for *.meta.xml files, breaking the pack).

Companion PR

Templates: TALXIS/tools-devkit-templates#TBD (feat/genpage-multipage-redesign).

Status

Draft. Pack / unpack round-trip verified. Live import validation pending due to unrelated data-model drift in the demo environment.

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

TomProkop and others added 3 commits May 30, 2026 17:21
Implement filename-based multipage GenPage discovery, solution-owned uxagentproject declarations, and obj-only native filecontent projection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move GenPage page-discovery checks from target conditions to task conditions so plain dotnet build executes the hook chain, and accept Rollup named default export bundles while ignoring comments during import validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align GenPage projection with the SolutionPackager-compatible SCF ground truth from scf-ground-truth.md: emit uxagentprojectfiles child folders, flatten payload filecontent paths, write the verified XML shapes, and remove fake root/customizations declarations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TomProkop and others added 2 commits June 1, 2026 17:55
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ll project types

- Add dedicated cross-cutting RunNodeTool MSBuild task with shared
  NodeProcessRunner helper (RunNodeTool.cs)
- Direct executable invocation via PATH resolution — no cmd.exe/sh wrapper,
  eliminating orphan process risk
- Kill-tree on timeout/exception: Process.Kill(entireProcessTree:true) on
  net6.0+; taskkill /T /F (Windows) / SIGTERM process-group (Unix) on net472,
  guarded with #if NET6_0_OR_GREATER
- Async stdout/stderr streaming at Normal/High importance (was Low, hiding
  failures)
- TimeoutSeconds (default 600), [Output] ExitCode and TimedOut properties
- Route all npm ci/install/run build and node/npm --version probes through
  RunNodeTool in GenPage, ScriptLibrary, PCF, and CodeApp targets
- npm ci fallback now emits a Warning before falling back to npm install
  (was silently swallowed)
- GenPageGenerateRuntimeTypes: replace shell-wrapper TryRun with
  NodeProcessRunner; pac generate-types failures now warn at Normal/High
  importance instead of being hidden at Low

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread src/Dataverse/GenPage/README.md Outdated
Comment thread src/Dataverse/CodeApp/msbuild/tasks/TALXIS.DevKit.Build.Dataverse.CodeApp.targets Outdated
Comment thread src/Dataverse/CodeApp/msbuild/tasks/TALXIS.DevKit.Build.Dataverse.CodeApp.targets Outdated
Comment thread src/Dataverse/CodeApp/msbuild/tasks/TALXIS.DevKit.Build.Dataverse.CodeApp.targets Outdated
Comment thread src/Dataverse/GenPage/msbuild/tasks/TALXIS.DevKit.Build.Dataverse.GenPage.targets Outdated
Comment thread src/Dataverse/GenPage/msbuild/tasks/TALXIS.DevKit.Build.Dataverse.GenPage.targets Outdated
Comment thread src/Dataverse/GenPage/README.md Outdated
TomProkop and others added 2 commits June 5, 2026 13:54
…tall perf, NODE_ENV, recursive discovery

- Drop firstPrompt.json: remove from GenPageDiscoverPages, GenPageEnsureDeclarations,
  GenPageProjectNativeTree, GenPage.targets, Solution.GenPages.targets, README
- Rename Solution.GenPages targets to Probe/Build/CopyToMetadata convention:
  GenPageProbeProjectReferences→ProbeGenPages, GenPageBuildProjectReferences→BuildGenPages,
  GenPageProjectToMetadata→CopyGenPagesToMetadata; update all internal DependsOnTargets refs
- Fix unconditional npm install in CodeApp/ScriptLibrary/PCF: split into lock/no-lock
  targets with Inputs/Outputs up-to-date checks (npm ci with fallback, warning on failure),
  mirroring GenPage pattern that was already correct
- Propagate NODE_ENV from MSBuild Configuration to npm run build (only):
  Release→production, Debug→development; overridable via $(NodeEnvironment);
  NOT set on npm install/ci to preserve devDependencies
- Recursive GenPage page discovery: switch TopDirectoryOnly→AllDirectories, exclude
  node_modules/dist/build/bin/obj; clearer duplicate error shows relative paths
- RunNodeTool: add EnvironmentVariables string[] property plumbed into ProcessStartInfo

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ra across all project types

- Add Tasks/msbuild/tasks/Targets/NodeBuild.targets (auto-imported by all project
  types via the Tasks package wildcard import):
  - CheckNodePrereqs, NodeInstallPackagesWithLock, NodeInstallPackagesWithoutLock
  - Unified properties: NodeProjectDirectory, NodeProjectName, RunNodeBuild,
    NodeEnvironment, NodeBuildScript, NodeBuildOutputDir
- GenPage.targets: remove duplicated CheckPrereqs/Install targets; delegate to shared;
  pass BUILD_OUTPUT_DIR to npm run build; output copy order: NodeBuildOutputDir > dist > build
- CodeApp.targets: same removal/delegation; pass BUILD_OUTPUT_DIR; CopyCodeAppDist and
  CopyCodeAppDistPublish prefer NodeBuildOutputDir then dist fallback
- ScriptLibrary.targets: set NodeProjectDirectory=TypeScriptDir; remove duplicated targets;
  keep TypeScriptDir existence check inline; pass BUILD_OUTPUT_DIR
- Pcf.targets: replace NpmInstall/NpmInstallWithoutLock with shared targets in TalxisBeforeBuild
- Update CodeApp/ScriptLibrary READMEs for shared target/output conventions

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