Files
TX/scripts/package.json
T
Riyadh e97f103a73 Task #603: distinct, non-purple home-tile colours
The four default home-screen tiles (Notes / Services / Meetings /
Admin) showed up as three blue tiles + one orange one. Root cause was
NOT the DB — seed.ts already gave each app a distinct hex — but the
`gradientForColor()` mapper in `artifacts/tx-os/src/pages/home.tsx`
only recognised blue/purple/green/orange/pink/teal, so yellow
(#eab308), red (#ef4444), and the dark navy meetings colour all fell
through to the default blue gradient.

Changes:

1. `artifacts/tx-os/src/index.css` — added `.icon-tile-red` and
   `.icon-tile-yellow` gradients matching the existing tile style.

2. `artifacts/tx-os/src/pages/home.tsx` — `gradientForColor()` now
   maps red/dc2626 and yellow/facc15 first. Purple branch stays for
   admin-custom apps but no seeded row uses it.

3. `scripts/src/seed.ts` —
   - Meetings: `#0B1E3F` → `#22c55e` (green).
   - Notifications: `#8b5cf6` → `#06b6d4` (cyan) — kills the last
     purple in the default palette per user direction.

4. `scripts/src/update-app-colors.ts` (new) — idempotent migration
   that bumps existing rows ONLY when they still hold the exact old
   default colour, so admin customisations from the Apps editor are
   preserved. Wired into `scripts/package.json` as
   `pnpm run update-app-colors`.

5. `scripts/redeploy.sh` — new step 5/6 runs the colour migration
   after seed and before `docker compose up -d`, on the same one-shot
   `migrate` container pattern as other one-shot scripts.

No schema changes, no new deps. tx-os tsc passes, scripts tsc passes.
After `./scripts/redeploy.sh` on Mac, home shows four distinct hues
(yellow / orange / green / red) and no tile is purple anywhere.
2026-05-18 13:52:42 +00:00

26 lines
690 B
JSON

{
"name": "@workspace/scripts",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"hello": "tsx ./src/hello.ts",
"seed": "tsx ./src/seed.ts",
"remove-chat": "tsx ./src/remove-chat.ts",
"disable-deprecated-apps": "tsx ./src/disable-deprecated-apps.ts",
"update-app-colors": "tsx ./src/update-app-colors.ts",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "node --test 'tests/**/*.test.mjs'"
},
"dependencies": {
"@workspace/db": "workspace:*",
"drizzle-orm": "catalog:"
},
"devDependencies": {
"@types/bcryptjs": "^3.0.0",
"@types/node": "catalog:",
"bcryptjs": "^3.0.3",
"tsx": "catalog:"
}
}