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 <noreply@anthropic.com>
This commit is contained in:
29
index.html
29
index.html
@@ -838,7 +838,7 @@ const DEFAULTS = {
|
|||||||
name:'Tiefgang', goal:'',
|
name:'Tiefgang', goal:'',
|
||||||
wipLimit:3, throughput:2, sle:{days:14,p:85},
|
wipLimit:3, throughput:2, sle:{days:14,p:85},
|
||||||
cols:[
|
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:'wip', label:'In Progress', tasks:[]},
|
||||||
{id:'done', label:'Done', tasks:[]},
|
{id:'done', label:'Done', tasks:[]},
|
||||||
]
|
]
|
||||||
@@ -865,7 +865,7 @@ const DEFAULTS = {
|
|||||||
name:'Einzelunternehmer', goal:'Finanzen, Buchhaltung, Steuern, Verwaltung als Freelancer.',
|
name:'Einzelunternehmer', goal:'Finanzen, Buchhaltung, Steuern, Verwaltung als Freelancer.',
|
||||||
wipLimit:3, throughput:1, sle:{days:30,p:85},
|
wipLimit:3, throughput:1, sle:{days:30,p:85},
|
||||||
cols:[
|
cols:[
|
||||||
{id:'ready', label:'Ready', tasks:[]},
|
{id:'ready', label:'Ready', tasks:[{t:'Lexoffice: Stand prüfen'}]},
|
||||||
{id:'wip', label:'In Progress', tasks:[]},
|
{id:'wip', label:'In Progress', tasks:[]},
|
||||||
{id:'done', label:'Done', tasks:[]},
|
{id:'done', label:'Done', tasks:[]},
|
||||||
]
|
]
|
||||||
@@ -2374,30 +2374,6 @@ function renderIdeas() {
|
|||||||
}).join('');
|
}).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 ──────────────────────────────────────────────────────────
|
// ── EXPORT / IMPORT ──────────────────────────────────────────────────────────
|
||||||
function exportState() {
|
function exportState() {
|
||||||
const keys = ['kanban_v2','kanban_groups','kanban_board_order','kanban_ideas','kanban_ideas_seeded','kanban_cards_seeded'];
|
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();
|
loadGroups();
|
||||||
loadBoardOrder();
|
loadBoardOrder();
|
||||||
seedCards();
|
|
||||||
loadState();
|
loadState();
|
||||||
renderSidebar();
|
renderSidebar();
|
||||||
loadIdeas();
|
loadIdeas();
|
||||||
|
|||||||
Reference in New Issue
Block a user