Keep the review card’s fallback color on the draft so a reload does not pick a new one.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilalloandCursor committed 2026-09-29 14:01:38 -06:00
1 parent 56adcd59fd
commit 6d536880fe
8 files changed
+165 -8

No files matched your search

+8
View File
@@ -122,6 +122,14 @@ export function randomPreviewSurfaceColor(
return `hsl(${hue}, ${saturation}%, ${lightness}%)`;
}
const STORED_PREVIEW_SURFACE_COLOR =
/^hsl\(\d{1,3}, \d{1,3}%, \d{1,3}%\)$/;
/** True when `value` is a draft-stored review-card fallback fill. */
export function isPreviewSurfaceColor(value: string): boolean {
return STORED_PREVIEW_SURFACE_COLOR.test(value);
}
function imageNeedsCors(url: string): boolean {
if (
url.startsWith("/") ||