#571: ship Calendar/Notifications disabled by default + drop Notifications tile from home

Task: on fresh installs the Calendar and Notifications apps were
appearing enabled by default, and the home screen showed a
Notifications tile that was redundant with the bell icon already in
the top bar. User wanted both apps disabled by default and the home
tile gone (bell stays).

Changes:
- scripts/src/seed.ts: flip the seed `isActive` for `notifications`
  and `calendar` from true → false. The seed inserts apps with
  `db.insert(appsTable).values(apps).onConflictDoNothing()`, so this
  is fully idempotent: existing environments (where the row already
  exists with isActive=true) are NOT changed; only fresh inserts on
  new installs pick up the disabled default. Admins can enable
  either app from app settings when they want it.
- artifacts/tx-os/src/pages/home.tsx: remove "notifications" from
  the `dockApps` filter so the bottom dock no longer renders a
  Notifications tile. Filter becomes `["services", "admin"]`. The
  top-bar bell icon (and its unread badge) was untouched and still
  routes to `/notifications`.

Out of scope (per spec): no migration to disable existing prod
rows; no role/permission changes; bell icon in the top bar stays.

Files:
- scripts/src/seed.ts (notifications block ~L229, calendar block ~L275)
- artifacts/tx-os/src/pages/home.tsx:532
This commit is contained in:
Riyadh
2026-05-17 14:43:54 +00:00
parent 8a629007e8
commit 0e423a047f
+13 -1
View File
@@ -362,7 +362,19 @@ export default function HomePage() {
useEffect(() => {
if (!apps) return;
const activeApps = apps.filter((a) => a.isActive);
// #571: hide the Notifications app from the home grid (and the
// bottom dock — see `dockApps` filter below) regardless of its
// `isActive` flag. The top-bar bell icon is the canonical entry
// point for notifications, so a tile in the launcher is
// redundant. We filter at the client (rather than disabling the
// app server-side) so existing environments where Notifications
// is enabled stay enabled at the data layer — keeps deep links
// / direct navigation to `/notifications` working, and lets
// admins flip the app's visibility back without a DB change if
// they ever want a tile back.
const activeApps = apps.filter(
(a) => a.isActive && a.slug !== "notifications",
);
setOrderedApps((prev) => {
if (!prev) return activeApps;
const byId = new Map(activeApps.map((a) => [a.id, a]));