Skip to content

Read client steps from remote config#6941

Open
alfonso-noriega wants to merge 1 commit into03-10-add_client_steps_implementation_to_support_existing_functionalitiesfrom
03-06-read_client_steps_from_remote_config
Open

Read client steps from remote config#6941
alfonso-noriega wants to merge 1 commit into03-10-add_client_steps_implementation_to_support_existing_functionalitiesfrom
03-06-read_client_steps_from_remote_config

Conversation

@alfonso-noriega
Copy link
Contributor

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

WHY are these changes introduced?

Extension specifications need to include client steps information to support build processes that require step-by-step client-side operations.

WHAT is this pull request doing?

  • Adds clientSteps field to the GraphQL query for fetching extension specifications
  • Updates the RemoteSpecification interface to include a clientSteps property of type ClientSteps
  • Implements parsing logic in AppManagementClient to convert the string-based clientSteps field from the API response into a structured ClientSteps array
  • Imports the ClientSteps type from the build services module

How to test your changes?

  1. Run the application and trigger a fetch of extension specifications
  2. Verify that the clientSteps field is properly retrieved from the GraphQL API
  3. Confirm that the client steps are correctly parsed and available in the specification objects

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
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

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 6, 2026

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

github-actions bot commented Mar 6, 2026

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-06-read_client_steps_from_remote_config branch from b6f6989 to 92899bf Compare March 6, 2026 14:04
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.75% 14572/18505
🟡 Branches 72.99% 7246/9927
🟡 Functions 78.95% 3714/4704
🟡 Lines 79.09% 13768/17407

Test suite run success

3814 tests passing in 1458 suites.

Report generated by 🧪jest coverage report action from d695822

@alfonso-noriega alfonso-noriega force-pushed the 01-build-steps-infrastructure branch from ce4a75e to 4088d90 Compare March 6, 2026 16:51
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from 55fc27f to b5573b3 Compare March 6, 2026 16:55
function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined {
if (!clientSteps) return undefined
return JSON.parse(clientSteps)
}

Choose a reason for hiding this comment

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

Unhandled JSON.parse can crash specifications fetch

clientSteps is sourced from a remote API field (spec.clientSteps) and is parsed with JSON.parse without a try/catch. If the API returns invalid JSON (e.g., empty string, partially-written JSON, a plain string, or an unexpectedly formatted value), JSON.parse will throw and the entire specifications() call will reject.

Evidence:

function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined {
  if (!clientSteps) return undefined
  return JSON.parse(clientSteps)
}

This can make the CLI fail to fetch extension specifications, potentially breaking deploy/build flows for users receiving malformed clientSteps (or during a transient backend bug).

@binks-code-reviewer
Copy link

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

Complete - 1 findings

📋 History

✅ 1 findings

@alfonso-noriega alfonso-noriega force-pushed the 01-build-steps-infrastructure branch from 4088d90 to e9af6ce Compare March 9, 2026 09:51
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from b513dcb to 27d6a77 Compare March 9, 2026 10:36
@alfonso-noriega alfonso-noriega force-pushed the 01-build-steps-infrastructure branch 2 times, most recently from 028d41e to e312b08 Compare March 9, 2026 10:37
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 27d6a77 to c72d83b Compare March 9, 2026 10:37
@alfonso-noriega alfonso-noriega changed the base branch from 01-build-steps-infrastructure to graphite-base/6941 March 10, 2026 08:33
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from c72d83b to 9e042a7 Compare March 10, 2026 08:34
@alfonso-noriega alfonso-noriega changed the base branch from graphite-base/6941 to 03-10-add_client_steps_implementation_to_support_existing_functionalities March 10, 2026 08:34
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 9e042a7 to 6bf2ab6 Compare March 10, 2026 08:47
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from e60fc83 to 9c2e1fd Compare March 10, 2026 08:47
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 6bf2ab6 to fe8b229 Compare March 10, 2026 09:04
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 8515fcc to 8a41de9 Compare March 10, 2026 10:29
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from e6f3577 to 3f28156 Compare March 10, 2026 11:05
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 8a41de9 to e4825ef Compare March 10, 2026 11:05
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 3f28156 to 44034c5 Compare March 10, 2026 11:11
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from 526032a to 95bf05a Compare March 10, 2026 11:24
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 44034c5 to 094a68c Compare March 10, 2026 11:24
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 95bf05a to 65f7784 Compare March 10, 2026 11:35
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 094a68c to 0478573 Compare March 10, 2026 11:35
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 65f7784 to fb7e81c Compare March 10, 2026 12:15
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 0478573 to a8b39c0 Compare March 10, 2026 12:15
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from fb7e81c to cffedd1 Compare March 10, 2026 12:41
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch 2 times, most recently from 74a2028 to e39fbcd Compare March 10, 2026 13:09
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from d2eccd1 to c707af8 Compare March 10, 2026 13:21
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch 2 times, most recently from 5e27f1f to e03b479 Compare March 10, 2026 14:45
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from c707af8 to 0eb54f3 Compare March 10, 2026 14:45
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from e03b479 to ca267e2 Compare March 10, 2026 14:52
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 0eb54f3 to 9eaca1c Compare March 10, 2026 14:52
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from ca267e2 to 991bfa9 Compare March 10, 2026 15:18
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 9eaca1c to 0591ba8 Compare March 10, 2026 15:18
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 991bfa9 to c673b4a Compare March 10, 2026 15:23
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 0591ba8 to 8ccd857 Compare March 10, 2026 15:23
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 8ccd857 to d695822 Compare March 10, 2026 15:51
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from c673b4a to 6a3974c Compare March 10, 2026 15:51
identifier
externalIdentifier
features
clientSteps
Copy link
Contributor

Choose a reason for hiding this comment

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

I am worried about the coupling of client <> server we're doing here and the implications it has.

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.

2 participants