From 02cd75a8bb7d2529bd963135983e970a83e3dc60 Mon Sep 17 00:00:00 2001 From: Robin Choice Date: Wed, 20 May 2026 16:41:04 +0200 Subject: [PATCH] refactor: remove card seeder, seed via DEFAULTS instead Seeder mechanism was fragile and introduced two bugs. New boards (tiefgang, einzelunternehmer) carry their initial cards in DEFAULTS. Existing boards get cards via the UI as intended. Co-Authored-By: Claude Sonnet 4.6 --- index.html | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/index.html b/index.html index 8525851..8e10417 100644 --- a/index.html +++ b/index.html @@ -838,7 +838,7 @@ const DEFAULTS = { name:'Tiefgang', goal:'', wipLimit:3, throughput:2, sle:{days:14,p:85}, cols:[ - {id:'ready', label:'Ready', tasks:[]}, + {id:'ready', label:'Ready', tasks:[{t:'4 Songs mit KI-Tools mastern'},{t:'4 Songs in die Cloud hochladen'}]}, {id:'wip', label:'In Progress', tasks:[]}, {id:'done', label:'Done', tasks:[]}, ] @@ -865,7 +865,7 @@ const DEFAULTS = { name:'Einzelunternehmer', goal:'Finanzen, Buchhaltung, Steuern, Verwaltung als Freelancer.', wipLimit:3, throughput:1, sle:{days:30,p:85}, cols:[ - {id:'ready', label:'Ready', tasks:[]}, + {id:'ready', label:'Ready', tasks:[{t:'Lexoffice: Stand prüfen'}]}, {id:'wip', label:'In Progress', tasks:[]}, {id:'done', label:'Done', tasks:[]}, ] @@ -2374,30 +2374,6 @@ function renderIdeas() { }).join(''); } -// ── CARD SEEDER ────────────────────────────────────────────────────────────── -const CARD_SEED_VERSION = '2026-05-20-b'; -function seedCards() { - if (localStorage.getItem('kanban_cards_seeded') === CARD_SEED_VERSION) return; - const batch = { - tiefgang: ['4 Songs mit KI-Tools mastern','4 Songs in die Cloud hochladen'], - psk: ['Control Chart ↔ Agent Chart gegenüberstellen','Gyra aufhübschen — neues Beispiel (SLA + Definition of Workflow)','Stammbaum: Lean → Agil → Kanban → Scrum','Lead Time & Flow Efficiency — kurzer Abriss','Frage 185: 3 vs. 5 Feedback Loops in Scrum klären','SLE-Formel zugänglich erklären'], - k4: ['PSK-Karten aus Board entfernen','Kontext durchforsten + neue Karten anlegen'], - pleasance: ['DNS: api-Subdomain eintragen','Resend + Kontaktformular-E-Mail testen'], - privat: ['Roborock starten','Wäsche anschmeißen'], - einzelunternehmer: ['Lexoffice: Stand prüfen'], - musichub: ['Status quo klären','Neues Sprint Goal definieren'], - doener: ['App-Store-Launch als Sprint Goal definieren'], - }; - const snap = JSON.parse(localStorage.getItem('kanban_v2') || '{}'); - Object.entries(batch).forEach(([id, tasks]) => { - if (!snap[id]) snap[id] = {cols:[{id:'ready',label:'Ready',tasks:[]},{id:'wip',label:'In Progress',tasks:[]},{id:'done',label:'Done',tasks:[]}],focus:''}; - const ready = (snap[id].cols || []).find(c => c.id === 'ready'); - if (ready) tasks.forEach(t => { if (!ready.tasks.find(c => c.t === t)) ready.tasks.push({t}); }); - }); - localStorage.setItem('kanban_v2', JSON.stringify(snap)); - localStorage.setItem('kanban_cards_seeded', CARD_SEED_VERSION); -} - // ── EXPORT / IMPORT ────────────────────────────────────────────────────────── function exportState() { const keys = ['kanban_v2','kanban_groups','kanban_board_order','kanban_ideas','kanban_ideas_seeded','kanban_cards_seeded']; @@ -2431,7 +2407,6 @@ if (window.location.protocol === 'file:') { } loadGroups(); loadBoardOrder(); -seedCards(); loadState(); renderSidebar(); loadIdeas();