From f8d9545db5fac4af87abf3fecc45f2409492f174 Mon Sep 17 00:00:00 2001 From: shrinishLT Date: Mon, 7 Sep 2026 16:19:34 +0530 Subject: [PATCH 1/5] TE-13434: accept tags in smartui.json and surface tag warnings from build creation tags is an array of up to 10 unique non-empty strings of at most 50 characters, the dashboard's own limits, so the config fails loudly at the edge instead of DES dropping names silently. It rides the existing config payload to the rendering service, and upload-pdf sends it as a form field. Warnings returned by build creation are printed. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JFAN4x1TwwoT9mHnqqn6Eh --- src/lib/ctx.ts | 3 ++- src/lib/httpClient.ts | 1 + src/lib/schemaValidation.ts | 16 ++++++++++++++++ src/tasks/createBuild.ts | 1 + src/tasks/createBuildExec.ts | 1 + src/types.ts | 1 + 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/lib/ctx.ts b/src/lib/ctx.ts index 1b176e6..854731b 100644 --- a/src/lib/ctx.ts +++ b/src/lib/ctx.ts @@ -245,7 +245,8 @@ export default (options: Record): Context => { approvalThreshold: config.approvalThreshold, rejectionThreshold: config.rejectionThreshold, showRenderErrors: config.showRenderErrors ?? false, - customCSS: (config as any).customCSS + customCSS: (config as any).customCSS, + tags: config.tags || [] }, uploadFilePath: '', webStaticConfig: [], diff --git a/src/lib/httpClient.ts b/src/lib/httpClient.ts index bd740dd..a783ffb 100644 --- a/src/lib/httpClient.ts +++ b/src/lib/httpClient.ts @@ -836,6 +836,7 @@ export default class httpClient { if (ctx.git?.commitId) form.append('commitId', ctx.git.commitId); if (ctx.git?.commitAuthor) form.append('commitAuthor', ctx.git.commitAuthor); if (ctx.git?.commitMessage) form.append('commitMessage', ctx.git.commitMessage); + if (ctx.config.tags?.length) form.append('tags', ctx.config.tags.join(',')); try { const response = await this.axiosInstance.request({ diff --git a/src/lib/schemaValidation.ts b/src/lib/schemaValidation.ts index 76951d6..0f95aba 100644 --- a/src/lib/schemaValidation.ts +++ b/src/lib/schemaValidation.ts @@ -389,6 +389,22 @@ const ConfigSchema = { showRenderErrors: { type: "boolean", errorMessage: "Invalid config; showRenderErrors must be true/false" + }, + tags: { + type: "array", + items: { + type: "string", + minLength: 1, + maxLength: 50, + errorMessage: "Invalid config; each tag must be a non-empty string of at most 50 characters" + }, + maxItems: 10, + uniqueItems: true, + errorMessage: { + type: "Invalid config; tags must be an array of strings", + maxItems: "Invalid config; at most 10 tags are allowed", + uniqueItems: "Invalid config; tags must be unique" + } } }, anyOf: [ diff --git a/src/tasks/createBuild.ts b/src/tasks/createBuild.ts index 92feac4..ed14e1c 100644 --- a/src/tasks/createBuild.ts +++ b/src/tasks/createBuild.ts @@ -22,6 +22,7 @@ export default (ctx: Context): ListrTask Date: Mon, 7 Sep 2026 16:32:30 +0530 Subject: [PATCH 2/5] TE-13434: tags cap is 50, matching the project limit Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JFAN4x1TwwoT9mHnqqn6Eh --- src/lib/schemaValidation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/schemaValidation.ts b/src/lib/schemaValidation.ts index 0f95aba..ceb9bbe 100644 --- a/src/lib/schemaValidation.ts +++ b/src/lib/schemaValidation.ts @@ -398,11 +398,11 @@ const ConfigSchema = { maxLength: 50, errorMessage: "Invalid config; each tag must be a non-empty string of at most 50 characters" }, - maxItems: 10, + maxItems: 50, uniqueItems: true, errorMessage: { type: "Invalid config; tags must be an array of strings", - maxItems: "Invalid config; at most 10 tags are allowed", + maxItems: "Invalid config; at most 50 tags are allowed", uniqueItems: "Invalid config; tags must be unique" } } From 9bac9e40d1e8e7d376565b870e40f5a09c2013f2 Mon Sep 17 00:00:00 2001 From: shrinishLT Date: Mon, 7 Sep 2026 19:44:52 +0530 Subject: [PATCH 3/5] TE-13434: print tag warnings after a PDF upload too Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JFAN4x1TwwoT9mHnqqn6Eh --- src/tasks/uploadPdfs.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tasks/uploadPdfs.ts b/src/tasks/uploadPdfs.ts index 072c6ed..22ee53c 100644 --- a/src/tasks/uploadPdfs.ts +++ b/src/tasks/uploadPdfs.ts @@ -75,6 +75,7 @@ async function uploadPdfs(ctx: Context, pdfPath: string): Promise { if (response && response.projectId) { ctx.build.projectId = response.projectId; } + for (const warning of response?.warnings || []) ctx.log.warn(warning); } catch (error : any) { throw new Error(error.message); } From 2b428cc727f77104b3b0fb6c2a0c3ce4acd164b2 Mon Sep 17 00:00:00 2001 From: shrinishLT Date: Mon, 7 Sep 2026 20:21:08 +0530 Subject: [PATCH 4/5] TE-13434: no warning output; invalid tags fail the build up front Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JFAN4x1TwwoT9mHnqqn6Eh --- src/tasks/createBuild.ts | 1 - src/tasks/createBuildExec.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/tasks/createBuild.ts b/src/tasks/createBuild.ts index ed14e1c..92feac4 100644 --- a/src/tasks/createBuild.ts +++ b/src/tasks/createBuild.ts @@ -22,7 +22,6 @@ export default (ctx: Context): ListrTask Date: Mon, 7 Sep 2026 20:22:41 +0530 Subject: [PATCH 5/5] TE-13434: drop the PDF warning print as well Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JFAN4x1TwwoT9mHnqqn6Eh --- src/tasks/uploadPdfs.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tasks/uploadPdfs.ts b/src/tasks/uploadPdfs.ts index 22ee53c..072c6ed 100644 --- a/src/tasks/uploadPdfs.ts +++ b/src/tasks/uploadPdfs.ts @@ -75,7 +75,6 @@ async function uploadPdfs(ctx: Context, pdfPath: string): Promise { if (response && response.projectId) { ctx.build.projectId = response.projectId; } - for (const warning of response?.warnings || []) ctx.log.warn(warning); } catch (error : any) { throw new Error(error.message); }