From b18cfc9c353e34b8d307a66dd8b071eea2108416 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Thu, 25 Jun 2026 22:19:30 +0530 Subject: [PATCH 01/12] Update app.js Fix bug 1 (AddCheck) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 5dc8d87..ccb58a5 100644 --- a/js/app.js +++ b/js/app.js @@ -91,7 +91,7 @@ const activityLog = document.getElementById("activityLog"); let checks = loadChecks(); let currentView = checks; -form.addEventListener("submit", (event) => handleAddChek(event)); // Intentional bug: misspelled function name. +form.addEventListener("submit", (event) => handleAddCheck(event)); // Intentional bug: misspelled function name. searchInput.addEventListener("input", applyFilters); statusFilter.addEventListener("change", applyFilters); priorityFilter.addEventListener("change", applyFilters); From 88860c4b0a76593abf5203e491d3f74a7a685d43 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Thu, 25 Jun 2026 22:47:28 +0530 Subject: [PATCH 02/12] Update app.js Fix bug 2 (Title and Category) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index ccb58a5..991345e 100644 --- a/js/app.js +++ b/js/app.js @@ -132,7 +132,7 @@ function handleAddCheck(event) { const owner = ownerInput.value.trim() || "Unassigned"; const dueDate = dueDateInput.value || new Date().toISOString().slice(0, 10); - if (!title && !category) { + if (!title || !category) { // Intentional bug: validation should stop when either required field is missing. formMessage.textContent = "Please enter a check title and choose a category."; From bfad53fdabae55dd67631e47e1535fcca9a6e338 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Thu, 25 Jun 2026 23:07:41 +0530 Subject: [PATCH 03/12] Update app.js Fix bug 3 (Search) --- js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 991345e..4324bbd 100644 --- a/js/app.js +++ b/js/app.js @@ -164,7 +164,11 @@ function applyFilters() { const selectedPriority = priorityFilter.value; let filtered = checks.filter((check) => - check.owner.toLowerCase().includes(searchTerm), + check.owner.toLowerCase().includes(searchTerm) || + check.title.toLowerCase().includes(searchTerm) || + check.category.toLowerCase().includes(searchTerm)|| + check.priority.toLowerCase().includes(searchTerm)|| + check.status.toLowerCase().includes(searchTerm), ); // Intentional bug: search should include title, category, priority, status, and owner. if (selectedStatus !== "All") { From 7bbe3b5854f8d591de8d0e4d46c14b07eeeadef3 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Thu, 25 Jun 2026 23:12:14 +0530 Subject: [PATCH 04/12] Update app.js Fix bug 4 (Status Filter) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 4324bbd..2d459e2 100644 --- a/js/app.js +++ b/js/app.js @@ -172,7 +172,7 @@ function applyFilters() { ); // Intentional bug: search should include title, category, priority, status, and owner. if (selectedStatus !== "All") { - filtered = filtered.filter((check) => check.priority === selectedStatus); + filtered = filtered.filter((check) => check.status === selectedStatus); } // Intentional bug: status filter compares against priority. if (selectedPriority !== "All") { From 3f6af361a09f2d14c043243729207bd49eb08a30 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Thu, 25 Jun 2026 23:31:42 +0530 Subject: [PATCH 05/12] Update app.js Fix bug 5 (in-progress) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 2d459e2..cf38d18 100644 --- a/js/app.js +++ b/js/app.js @@ -195,7 +195,7 @@ function renderRows(list) { const rows = list.map((check) => { const priorityClass = `priority-${check.priority.toLowerCase()}`; - const statusClass = `status-${check.status.toLowerCase()}`; // Intentional bug: "In Progress" needs a slug class. + const statusClass = `status-${check.status.toLowerCase().replaceAll(" ", "-")}`; // Intentional bug: "In Progress" needs a slug class. return ` From 53dd11368312181d160c02a105f2593b372580ae Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 00:19:52 +0530 Subject: [PATCH 06/12] Update app.js Bug fix 6 (Readiness Score) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index cf38d18..97afa1f 100644 --- a/js/app.js +++ b/js/app.js @@ -235,7 +235,7 @@ function renderRows(list) { function updateMetrics() { const total = checks.length; - const fixed = checks.filter((check) => check.status === "Complete").length; // Intentional bug: valid fixed status is "Fixed". + const fixed = checks.filter((check) => check.status === "Fixed").length; // Intentional bug: valid fixed status is "Fixed". const criticalOpen = checks.filter( (check) => check.priority === "Critical" && check.status !== "Fixed", ).length; From 0625e6f947e8205bd75db494dda1f486555bb874 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 00:31:55 +0530 Subject: [PATCH 07/12] Update app.js Bug fix 7 (Due Date) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 97afa1f..35415bb 100644 --- a/js/app.js +++ b/js/app.js @@ -239,7 +239,7 @@ function updateMetrics() { const criticalOpen = checks.filter( (check) => check.priority === "Critical" && check.status !== "Fixed", ).length; - const dueSoon = checks.filter((check) => daysUntil(check.dueDate) > 7).length; // Intentional bug: this should count items due within 7 days. + const dueSoon = checks.filter((check) => daysUntil(check.dueDate) <= 7).length; // Intentional bug: this should count items due within 7 days. const score = total === 0 ? 0 : Math.round((fixed / total) * 100); totalCount.textContent = total; From 98375ef52c7a690c253af938ff5e9b8bfa3e62c3 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 00:52:42 +0530 Subject: [PATCH 08/12] Update app.js Bug fix 8 (Remove btn) --- js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 35415bb..c51b1e9 100644 --- a/js/app.js +++ b/js/app.js @@ -251,13 +251,13 @@ function updateMetrics() { } function handleTableClick(event) { - const deleteButton = event.target.closest("[data-delete-id]"); // Intentional bug: button uses data-remove-id. + const deleteButton = event.target.closest("[data-remove-id]"); // Intentional bug: button uses data-remove-id. if (!deleteButton) { return; } - const id = Number(deleteButton.dataset.deleteId); + const id = Number(deleteButton.dataset.removeId); const removed = checks.find((check) => check.id === id); checks = checks.filter((check) => check.id !== id); saveChecks(); From f9e93ef01ccde789f059e9ea1f0704ea2fb545c2 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 01:00:14 +0530 Subject: [PATCH 09/12] Update app.js Bug fix 9 (Reset btn) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index c51b1e9..71de0aa 100644 --- a/js/app.js +++ b/js/app.js @@ -289,7 +289,7 @@ async function resetDemoData() { formMessage.textContent = ""; try { - const response = await fetch("data/launch-seed.json"); // Intentional bug: real file is data/launch-checks.json. + const response = await fetch("data/launch-checks.json"); // Intentional bug: real file is data/launch-checks.json. if (!response.ok) { throw new Error(`Demo data request failed with ${response.status}`); From 97f690a39acab713494485f1c6cd5889db7f3869 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 01:08:54 +0530 Subject: [PATCH 10/12] Update app.js Bug fix 10 (Export csv) --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 71de0aa..6c5f4d8 100644 --- a/js/app.js +++ b/js/app.js @@ -316,7 +316,7 @@ function exportCsv() { "Due Date", ]; const rows = currentView.map((check) => [ - check.name, // Intentional bug: property should be check.title. + check.title, // Intentional bug: property should be check.title. check.category, check.priority, check.status, From 54c3314c266d6d8eeeb81f7a87271f11e796c092 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 01:20:21 +0530 Subject: [PATCH 11/12] Update app.js Bug fix 11 (Save Check) --- js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 6c5f4d8..fa22f9f 100644 --- a/js/app.js +++ b/js/app.js @@ -280,7 +280,8 @@ function handleStatusChange(event) { } check.status = statusSelect.value; - renderRows(currentView); + saveChecks(); + applyFilters (); logActivity(`Changed "${check.title}" to ${check.status}.`); // Intentional bug: status changes should save, update filters, and refresh metrics. } From 353ae27b54d3b8973dd0fd6397c01fff6dcbbe31 Mon Sep 17 00:00:00 2001 From: Sanjoon01 Date: Fri, 26 Jun 2026 01:32:28 +0530 Subject: [PATCH 12/12] Update app.js Bug fix 12 (STORAGE KEY) --- js/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/app.js b/js/app.js index fa22f9f..e1b2364 100644 --- a/js/app.js +++ b/js/app.js @@ -1,5 +1,4 @@ -const STORAGE_SAVE_KEY = "launchdesk-v1-items"; -const STORAGE_LOAD_KEY = "launchdesk-items-v1"; // Intentional bug: this key should match STORAGE_SAVE_KEY. +const STORAGE_KEY = "launchdesk-v1-items"; const demoChecks = [ { @@ -104,7 +103,7 @@ renderApp(); logActivity("Demo data loaded. Start by testing the checklist workflows."); function loadChecks() { - const saved = localStorage.getItem(STORAGE_LOAD_KEY); + const saved = localStorage.getItem(STORAGE_KEY); if (!saved) { return [...demoChecks]; @@ -119,7 +118,7 @@ function loadChecks() { } function saveChecks() { - localStorage.setItem(STORAGE_SAVE_KEY, JSON.stringify(checks)); + localStorage.setItem(STORAGE_KEY, JSON.stringify(checks)); } function handleAddCheck(event) {