Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and bug fixes related to snapshot processing, status tracking, and build context management in the SmartUI CLI. The changes primarily focus on making the context-to-snapshot mapping more robust by switching status tracking from numeric codes to string-based identifiers, improving reliability in snapshot status polling, and enhancing API request payloads with additional metadata.
Key changes include:
Context and Snapshot Status Management:
contextToSnapshotMap
now uses string values (such as build IDs or status codes as strings) instead of numbers to track the status of each context, improving clarity and consistency in status handling throughout the codebase. [1] [2] [3] [4]server.ts
is updated to handle string statuses, includes a timeout mechanism, and now retrieves the correct build ID from the map for external status checks.Snapshot Processing and API Enhancements:
processSnapshotCaps
anduploadSnapshotForCaps
methods inhttpClient.ts
now acceptvariantCount
andsync
parameters, and these values are included in the API request payloads, providing more detailed context for snapshot processing. [1] [2] [3]API Request Improvements:
getSnapshotStatus
method now requires an explicitbuildId
parameter, rather than relying onctx.build.id
, making the method more flexible and accurate in multi-build scenarios.Miscellaneous:
4.1.37-beta.0
.These changes collectively improve the reliability and traceability of snapshot handling, especially in parallel and distributed test execution environments.