Skip to content

Create abstract client steps infrastracture to externalize the ap modules client configurations#6965

Open
alfonso-noriega wants to merge 1 commit into03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specificationsfrom
03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations
Open

Create abstract client steps infrastracture to externalize the ap modules client configurations#6965
alfonso-noriega wants to merge 1 commit into03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specificationsfrom
03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations

Conversation

@alfonso-noriega
Copy link
Contributor

@alfonso-noriega alfonso-noriega commented Mar 10, 2026

WHY are these changes introduced?

This introduces a new client-side build pipeline system to replace the existing buildConfig approach for extensions. The current system is limited and doesn't provide enough flexibility for complex build scenarios.

WHAT is this pull request doing?

  • Adds a new ClientSteps interface that defines build steps as configuration objects with execution handled separately
  • Introduces BuildContext to pass data through the step pipeline and store results
  • Implements step executors for build_function, build_theme, bundle_theme, and bundle_ui operations
  • Adds an include_assets step type with support for pattern-based and config-key-based file inclusions
  • Updates ExtensionSpecification to include optional clientSteps field alongside existing buildConfig
  • Modifies buildForBundle method to handle app config extensions differently by using the extension UID as the output path
  • Adds null coalescing operators to prevent undefined errors when filePatterns and ignoredFilePatterns are not defined
  • Includes comprehensive test coverage for the new client steps system

How to test your changes?

  1. Create an extension that uses the new clientSteps configuration
  2. Run the build process and verify that steps execute in sequence
  3. Test the include_assets step with both pattern and configKey inclusion types
  4. Verify that error handling works correctly with continueOnError flag
  5. Ensure existing extensions using buildConfig continue to work unchanged

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor Author

alfonso-noriega commented Mar 10, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alfonso-noriega alfonso-noriega marked this pull request as ready for review March 10, 2026 08:34
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner March 10, 2026 08:34
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 16768f3 to 59f0139 Compare March 10, 2026 09:59
@alfonso-noriega alfonso-noriega changed the base branch from main to graphite-base/6965 March 10, 2026 11:07
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 59f0139 to f9f9e63 Compare March 10, 2026 11:07
@alfonso-noriega alfonso-noriega changed the base branch from graphite-base/6965 to 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications March 10, 2026 11:07
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from 7b68eb7 to c3ee349 Compare March 10, 2026 11:24
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from f9f9e63 to 59dcaa7 Compare March 10, 2026 11:24
@binks-code-reviewer
Copy link

⚠️ Findings outside the diff

These findings are in files not modified by this PR and cannot be posted as inline comments.


packages/app/src/cli/services/build/client-steps.integration.test.ts:168Integration tests assert copying behavior but no implementation exists

The integration test calls executeStep with type: 'include_assets' and asserts files were copied into outputDir, but the router currently throws “not yet implemented” for include_assets, so this test should fail consistently.

Evidence:

await executeStep({ ..., type: 'include_assets', ... }, context)
...
expect(await fileExists(joinPath(outputDir, 'logo.png'))).toBe(true)

Impact:

  • PR should fail CI (or indicates these tests aren’t running).
  • Confirms the core feature is incomplete.

@binks-code-reviewer
Copy link

binks-code-reviewer bot commented Mar 10, 2026

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

Complete - No issues

📋 History

❌ Failed → ❌ Failed → ❌ Failed → ✅ 2 findings → ✅ No issues → ❌ Failed → ❌ Failed → ✅ No issues → ✅ No issues

@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 59dcaa7 to fb4c01d Compare March 10, 2026 11:35
@binks-code-reviewer
Copy link

⚠️ Findings outside the diff

These findings are in files not modified by this PR and cannot be posted as inline comments.


packages/app/src/cli/models/extensions/extension-instance.ts:369New build mode 'hosted_app_home' is added to the type but not handled in build switch

BuildConfig.mode includes 'hosted_app_home', but ExtensionInstance.build() does not handle it. The extension may not be built, producing missing artifacts.

Impact: Specs setting mode=hosted_app_home can lead to deploy failures or missing runtime resources.

@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from fb4c01d to 68f4751 Compare March 10, 2026 12:15
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch 2 times, most recently from 24fb214 to ecf7d0f Compare March 10, 2026 12:41
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch 4 times, most recently from 9257821 to 596be94 Compare March 10, 2026 14:45
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from 9bebf7c to dd63de8 Compare March 12, 2026 10:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from be30889 to 903f8f5 Compare March 12, 2026 10:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from dd63de8 to ea4aee6 Compare March 12, 2026 10:45
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch 2 times, most recently from e614518 to b534c43 Compare March 12, 2026 12:11
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from ea4aee6 to 243fb31 Compare March 12, 2026 12:11
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from b534c43 to ac5fd70 Compare March 12, 2026 12:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from 243fb31 to 7e38d07 Compare March 12, 2026 12:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from ac5fd70 to dcbe359 Compare March 12, 2026 13:19
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from 7e38d07 to 880b269 Compare March 12, 2026 13:19
@github-actions
Copy link
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/git.d.ts
@@ -1,13 +1,5 @@
 import { AbortError } from './error.js';
-export interface GitLogEntry {
-    hash: string;
-    date: string;
-    message: string;
-    refs: string;
-    body: string;
-    author_name: string;
-    author_email: string;
-}
+import { DefaultLogFields, ListLogLine } from 'simple-git';
 /**
  * Initialize a git repository at the given directory.
  *
@@ -48,12 +40,14 @@ export declare function addToGitIgnore(root: string, entry: string): void;
  *
  * @param repoUrl - The URL of the repository to clone.
  * @param destination - The directory where the repository will be cloned.
+ * @param progressUpdater - A function that will be called with the progress of the clone.
  * @param shallow - Whether to clone the repository shallowly.
  * @param latestTag - Whether to clone the latest tag instead of the default branch.
  */
 export interface GitCloneOptions {
     repoUrl: string;
     destination: string;
+    progressUpdater?: (statusString: string) => void;
     shallow?: boolean;
     latestTag?: boolean;
 }
@@ -70,7 +64,7 @@ export declare function downloadGitRepository(cloneOptions: GitCloneOptions): Pr
  * @param directory - The directory of the git repository.
  * @returns The latest commit of the repository.
  */
-export declare function getLatestGitCommit(directory?: string): Promise<GitLogEntry>;
+export declare function getLatestGitCommit(directory?: string): Promise<DefaultLogFields & ListLogLine>;
 /**
  * Add all files to the git index from the given directory.
  *

@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from dcbe359 to e5c297b Compare March 16, 2026 10:53
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch 2 times, most recently from 5647756 to dcffdf5 Compare March 16, 2026 11:17
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from e5c297b to 63f01da Compare March 16, 2026 11:17
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from dcffdf5 to b7dd050 Compare March 17, 2026 10:08
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 63f01da to 576d4ea Compare March 17, 2026 10:08
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from b7dd050 to a8cf663 Compare March 17, 2026 11:02
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch 2 times, most recently from 70b51d3 to f140406 Compare March 17, 2026 11:07
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from a8cf663 to 40c8534 Compare March 17, 2026 11:07
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from f140406 to 6b7f418 Compare March 17, 2026 11:19
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 6b7f418 to 3c9a3bb Compare March 17, 2026 11:20
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.

3 participants