Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): keep whitespace in the directory picker's path query

Adam Eivye63f063dfa44
diff --git a/server/lib/validation.js b/server/lib/validation.js
index d1ed5c0cd9..ef6da6cf86 100644
--- a/server/lib/validation.js
+++ b/server/lib/validation.js
@@ -1502,9 +1502,10 @@ const scaffoldPortSchema = z.preprocess(
);
// GET /api/scaffold/directories. `includeFiles` is a query flag, so it arrives
-// as the string 'true' rather than a boolean.
+// as the string 'true' rather than a boolean. The path is not trimmed: a
+// directory name may legitimately begin or end with whitespace.
export const scaffoldDirectoriesQuerySchema = z.object({
- path: z.string().trim().min(1).max(4096).optional(),
+ path: z.string().min(1).max(4096).optional(),
includeFiles: z.enum(['true', 'false']).optional(),
});