Skip to content

Read client steps from remote config#6941

Open
alfonso-noriega wants to merge 1 commit into01-build-steps-infrastructurefrom
03-06-read_client_steps_from_remote_config
Open

Read client steps from remote config#6941
alfonso-noriega wants to merge 1 commit into01-build-steps-infrastructurefrom
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

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 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% 14568/18498
🟡 Branches 73.03% 7256/9935
🟡 Functions 78.93% 3705/4694
🟡 Lines 79.11% 13766/17402

Test suite run success

3817 tests passing in 1460 suites.

Report generated by 🧪jest coverage report action from 92899bf

@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 from 92899bf to 55fc27f Compare March 6, 2026 16:51
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 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

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