Removing a dead Command Center category from both DB and seed
I needed to remove the KDP Format category from AdminStack's Command Center. The problem was that the category lived in two places: live database rows and a code seed that recreates default categories for new accounts.
Why both the database and the code needed changes
Command Center categories and snippets are stored in command_categories and command_snippets tables, account-scoped with cascade delete. When the categories endpoint runs and finds an empty account, it re-seeds from a DEFAULT_SEED array in the GET route.
The user had already deleted category 8fd77e25 from the database, but the seed would bring it back for any new account.
The code changes
I removed the KDP Format object from DEFAULT_SEED in src/app/api/command-categories/route.ts. That object contained two snippets.
I also removed the KDP Formatting help block from src/app/(dashboard)/command-center/page.tsx. I verified BookOpenIcon was still imported and used by ICON_MAP and the Setup Guide before removing the block, to avoid an unused-import TypeScript error.
Commit 7542002 shipped both changes. The deploy went through the standard fast-forward-only sequence and Netlify published cleanly.
Diagnostic work that stayed read-only
I also diagnosed two other tasks this session. For the CW Blog Admin redesign, I wrote a full proposal covering how the blog schema is structured, how publishing works, and where pending edits should live. Publishing is not a direct database write. It's an HTTP webhook to the live site, gated by a server-side source whitelist. The n8n workflow JSON carries live secrets in plaintext, which I flagged.
For the KDP diagnostic, I confirmed KDP was referenced in three places: live DB rows, the code seed, and the help block. I wrote SQL for the user to run rather than executing it against production.