[M5] Demo: upload-failure message renders as success (green) #26

Open
opened 2026-06-27 03:54:47 +00:00 by sessamekesh · 0 comments
Owner

File: demo/src/FilestoreOpsPanel.tsx:218

The result text is colored green when uploadResult.startsWith("Upload"):

color: uploadResult.startsWith("Upload") ? "#8f8" : "#f88",

Both the success string Uploaded "..." and the failure string Upload failed: ... start with "Upload", so failures render in the success color.

Fix: track success with an explicit boolean flag instead of string-prefix matching.


Filed by an automated AI code review (manual proof-of-concept run). Code locations reference the various-cleanup branch.

**File:** `demo/src/FilestoreOpsPanel.tsx:218` The result text is colored green when `uploadResult.startsWith("Upload")`: ```tsx color: uploadResult.startsWith("Upload") ? "#8f8" : "#f88", ``` Both the success string `Uploaded "..."` **and** the failure string `Upload failed: ...` start with `"Upload"`, so **failures render in the success color**. **Fix:** track success with an explicit boolean flag instead of string-prefix matching. --- _Filed by an automated AI code review (manual proof-of-concept run). Code locations reference the `various-cleanup` branch._
Sign in to join this conversation.
No description provided.