Skip to content

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

Open
alfonso-noriega wants to merge 3 commits intomainfrom
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 3 commits intomainfrom
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

@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 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 2 times, most recently from 6b7f418 to 3c9a3bb Compare March 17, 2026 11:20
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 3c9a3bb to bc8f04a Compare March 18, 2026 10:42
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from 40c8534 to 72e5cc8 Compare March 18, 2026 10:42
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from bc8f04a to 35aaabb Compare March 18, 2026 17:50
@alfonso-noriega alfonso-noriega force-pushed the 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications branch from 72e5cc8 to 2151198 Compare March 18, 2026 17:50
@alfonso-noriega alfonso-noriega changed the base branch from 03-10-clean_up_module_outputfile_calculation_and_move_it_to_the_specifications to graphite-base/6965 March 19, 2026 10:19
@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 35aaabb to 906c43e Compare March 19, 2026 10:19
@alfonso-noriega alfonso-noriega changed the base branch from graphite-base/6965 to main March 19, 2026 10:19
schema: TaxCalculationsSchema,
appModuleFeatures: (_) => [],
buildConfig: {mode: 'tax_calculation'},
getOutputRelativePath: (extension: ExtensionInstance<TaxCalculationsConfigType>) => `dist/${extension.handle}.js`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use joinPath in all of these

Copy link
Contributor

@isaacroldan isaacroldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a minor comment

@alfonso-noriega alfonso-noriega force-pushed the 03-10-create_abstract_client_steps_infrastracture_to_externalize_the_ap_modules_client_configurations branch from 906c43e to 4e75f4d Compare March 19, 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 4e75f4d to 313c611 Compare March 19, 2026 12:01
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