Disable unwanted default applications and clean up related scripts

Remove `enable-default-apps.ts` script, add `disable-deprecated-apps.ts`, update seeding logic in `seed.ts` to set `isActive` to false for documents, and modify `DOCKER.md` and `scripts/package.json` accordingly.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ac51f801-911b-4be5-b27c-e3212d5c0c73
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/1WKAcHk
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
riyadhafraa
2026-05-18 07:18:15 +00:00
parent aba984d238
commit 7d65198298
4 changed files with 17 additions and 10 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
"hello": "tsx ./src/hello.ts",
"seed": "tsx ./src/seed.ts",
"remove-chat": "tsx ./src/remove-chat.ts",
"enable-default-apps": "tsx ./src/enable-default-apps.ts",
"disable-deprecated-apps": "tsx ./src/disable-deprecated-apps.ts",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "node --test 'tests/**/*.test.mjs'"
},
@@ -1,13 +1,13 @@
import { db, appsTable } from "@workspace/db";
import { inArray } from "drizzle-orm";
const SLUGS = ["calendar", "notifications"];
const SLUGS = ["calendar", "notifications", "documents"];
async function main() {
console.log(`Enabling apps: ${SLUGS.join(", ")}...`);
console.log(`Disabling apps: ${SLUGS.join(", ")}...`);
const updated = await db
.update(appsTable)
.set({ isActive: true })
.set({ isActive: false })
.where(inArray(appsTable.slug, SLUGS))
.returning({ slug: appsTable.slug, isActive: appsTable.isActive });
@@ -15,7 +15,7 @@ async function main() {
console.warn("No matching apps found — did seed run yet?");
} else {
for (const row of updated) {
console.log(` ${row.slug} (isActive=${row.isActive})`);
console.log(` - ${row.slug} (isActive=${row.isActive})`);
}
}
console.log("Done.");
+8 -1
View File
@@ -294,7 +294,14 @@ async function main() {
iconName: "FileText",
route: "/documents",
color: "#64748b",
isActive: true,
// #577: same policy as notifications/calendar — ship Documents
// DISABLED on fresh installs. There is no Documents surface the
// user is actively using yet and the tile cluttered the home
// launcher. Insert uses onConflictDoNothing, so existing
// environments keep whatever the current row says — see
// scripts/src/disable-deprecated-apps.ts for the one-shot that
// flips already-seeded rows off.
isActive: false,
isSystem: false,
sortOrder: 6,
},