A full-featured CRM built with React, shadcn/ui, and Supabase.
split deals/tags/tasks + remove the undesireable step
erwanMarmelabbce16f87cd47
diff --git a/.claude/skills/delete-initial-resource/SKILL.md b/.claude/skills/delete-initial-resource/SKILL.mdindex 6cf2505a..4b4a30fb 100644--- a/.claude/skills/delete-initial-resource/SKILL.md+++ b/.claude/skills/delete-initial-resource/SKILL.md@@ -12,7 +12,9 @@ Removes one or more of the five initial Atomic CRM resources (`contacts`, `compa1. **Confirm the target(s)**, then read each one's file before editing:- `contacts` → [`contacts.md`](contacts.md) — spine; **confirm cascade scope first**- `companies` → [`companies.md`](companies.md) — spine/link; **confirm cascade scope first**- - `deals` → [`deals.md`](deals.md) · `tags` → [`tags.md`](tags.md) · `tasks` → [`tasks.md`](tasks.md)+ - `deals` → [`deals.md`](deals.md)+ - `tags` → [`tags.md`](tags.md)+ - `tasks` → [`tasks.md`](tasks.md)2. **Run the script** (below) — deletes each `src/components/atomic-crm/<resource>/` folder and prints the dependent files to clean.3. **Clean each dependent file** using the "Shapes" patterns below + the per-resource file.4. **Verify** (below).diff --git a/.claude/skills/delete-initial-resource/companies.md b/.claude/skills/delete-initial-resource/companies.mdindex 51b0acfe..94979b1f 100644--- a/.claude/skills/delete-initial-resource/companies.md+++ b/.claude/skills/delete-initial-resource/companies.md@@ -3,11 +3,7 @@A **spine/link** resource: it owns the `companies` table *and* is a `company_id` link on **both** `contacts` and `deals`, its `companies_summary` view aggregates `nb_contacts`/`nb_deals`, and it adds a **denormalized `company_name`** to the `Contact` type. So it fans out far wider than its folder (≈50 frontend files + backend).## Confirm cascade scope first-Ask whether to:-- **remove `company_id` fully** (cleanest — drops the column from the `Contact`/`Deal` types, the CSV import/export, `mergeContacts`, the fakerest generators, and i18n), or-- **leave it as an orphaned shell** (keep the column typed `Identifier`, default `null`/unset, but delete all company UI — compiles, but leaves dead FKs pointing at a dropped table).--The full removal is what makes the deletion large.+**Remove `company_id` fully** — drop the column from the `Contact`/`Deal` types, the CSV import/export, `mergeContacts`, the fakerest generators, and i18n. This full removal is what makes the deletion large.## Frontend specifics- **Activity log** — a dedicated `company.created` branch (delete `ActivityLogCompanyCreated.tsx` outright + the branch in `ActivityLogIterator.tsx` + `COMPANY_CREATED` in `consts.ts`/`types.ts`) **and** a `"company"` member in the context union. Narrowing the union turns the `=== "company"` checks in `ActivityLogContactCreated`/`ActivityLogContactNoteCreated`/`ActivityLogDealCreated`/`ActivityLogDealNoteCreated` into type errors — prune those branches (the `company_id` "to/at `<company>`" ReferenceField + the `CompanyAvatar` in the deal-note header). `ActivityLog.tsx` has a `companyId` prop + `company_id` filter; `providers/commons/activity.ts` has a `getNewCompanies` fetcher + `companyId` param.