Skip to content

Commit 18d5365

Browse files
fix(dashboard): Exclude naked payload from suggested variables
The new UX prepends payload to all unknown {{foo}} variables as the user types them.
1 parent 0e617cf commit 18d5365

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/dashboard/src/utils/parseStepVariables.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ export function parseStepVariables(schema: JSONSchemaDefinition): ParsedVariable
3535
if (typeof obj === 'boolean') return;
3636

3737
if (obj.type === 'object') {
38-
// Handle object with additionalProperties
39-
if (obj.additionalProperties === true) {
38+
// Exclude naked payload from suggested variables to try the new UX of appending payload to all unknown step variables.
39+
// TODO: Move the exclusion to the API side after the two deployments to avoid breaking the contract between the Dashboard and the API.
40+
if (obj.additionalProperties === true && !path.includes('payload')) {
4041
result.namespaces.push({
4142
type: 'variable',
4243
label: path,

0 commit comments

Comments
 (0)