From 95522dacbefb0e4b9b0e9e1caa5e5cc25b007f88 Mon Sep 17 00:00:00 2001 From: riyadhafraa <49757212-riyadhafraa@users.noreply.replit.com> Date: Mon, 11 May 2026 15:48:35 +0000 Subject: [PATCH] Task #501: Default new notes to yellow The notes composer now starts with the yellow swatch pre-selected instead of the neutral "default" color, so a freshly created note becomes a yellow sticky by default. The user can still pick any other color from the swatch picker before saving, and that choice is honored. After a successful save (or send), the composer resets back to yellow rather than "default", so the next note in the same session is also yellow unless the user changes it. Changes: - artifacts/tx-os/src/pages/notes.tsx - Composer initial color state: useState("default") -> useState("yellow") - Composer reset() helper: setColor("default") -> setColor("yellow") Out of scope (per task spec): - No backend changes. The API's data.color = "default" fallback for notes created via other paths (shared-folder stamping, incoming- note flows) is intentionally untouched. - No changes to existing notes already saved in the database. - No new "default color" user setting. - NOTE_COLORS palette and color-picker UI unchanged. Verification: - `pnpm exec tsc --noEmit` passes clean. - "yellow" is a valid id in NOTE_COLORS (src/lib/notes-api.ts:801), so colorBg/colorAccent/colorMeta resolve correctly and the swatch shows pre-selected. - Color-picker onChange path unchanged, so user-picked colors still override the new yellow default before save. --- artifacts/tx-os/src/pages/notes.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artifacts/tx-os/src/pages/notes.tsx b/artifacts/tx-os/src/pages/notes.tsx index e77ec5e6..357c74d0 100644 --- a/artifacts/tx-os/src/pages/notes.tsx +++ b/artifacts/tx-os/src/pages/notes.tsx @@ -2865,7 +2865,7 @@ function Composer({ const { t } = useTranslation(); const [open, setOpen] = useState(false); const [content, setContent] = useState(""); - const [color, setColor] = useState("default"); + const [color, setColor] = useState("yellow"); const [labelIds, setLabelIds] = useState([]); const [kind, setKind] = useState("text"); const [items, setItems] = useState([]); @@ -2917,7 +2917,7 @@ function Composer({ const reset = () => { setContent(""); - setColor("default"); + setColor("yellow"); setLabelIds([]); setKind("text"); setItems([]);