Skip to content

Resolve all 12 bugs in LaunchDesk app#8

Open
Janith Wijewardane (J-chief) wants to merge 15 commits into
codezelaca:mainfrom
J-chief:main
Open

Resolve all 12 bugs in LaunchDesk app#8
Janith Wijewardane (J-chief) wants to merge 15 commits into
codezelaca:mainfrom
J-chief:main

Conversation

@J-chief
Copy link
Copy Markdown

@J-chief Janith Wijewardane (J-chief) commented May 12, 2026

Fix1 - Storage key mismatch — STORAGE_LOAD_KEY did not match STORAGE_SAVE_KEY so saved data never loaded on refresh
Fix 2 - 2Misspelled function name — event listener called handleAddChek instead of handleAddCheck so form submission did nothing
Fix 3 - Validation logic — used && instead of || so the form submitted even when one required field was empty
Fix 4 - Search too narrow — search only filtered by owner, expanded to cover title, category, priority, status, and owner
Fix 5 - Status filter compared wrong field — filter was comparing selectedStatus against check.priority instead of check.status
Fix 6 - Broken CSS class for In Progress — space in "In Progress" broke the CSS class name, fixed by replacing spaces with hyphens
Fix 7 - Wrong status value in metrics — readiness score counted "Complete" which doesn't exist, corrected to "Fixed"
Fix 8 - Due soon logic inverted — was counting items due after 7 days, corrected to count items due within the next 7 days
Fix 9 - Delete button attribute mismatch — handler looked for data-delete-id but button used data-remove-id so delete did nothing
Fix 10 - Status change not saved — updating a row's status only re-rendered the UI without saving to localStorage or refreshing metrics
Fix 11 - Wrong fetch path for demo reset — fetched launch-seed.json which doesn't exist, corrected to launch-checks.json
Fix 12 - Wrong property in CSV export — used check.name which is undefined, corrected to check.title

Optionally, 2 features have been added
Feature 1 - Overdue Date Highlighting
Feature 2 - Confirm Before Delete

Summary by CodeRabbit

  • Bug Fixes
    • Fixed issue preventing previously saved items from loading correctly
    • Enhanced form validation to require title and category fields
    • Improved search filtering to match across multiple fields
    • Corrected status filter logic and display formatting
    • Fixed metrics calculations for item counts and due-date tracking
    • Fixed deletion and status persistence functionality
    • Corrected demo reset data source and CSV export

Review Change Stack

Copilot AI review requested due to automatic review settings May 12, 2026 09:01
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

Single-cohort fixes updating js/app.js and css/styles.css: align storage keys, wire form submit, validate required fields, expand search/filtering, slugify status classes, mark overdue/due-soon dates, correct metrics, confirm and persist deletions, fix demo JSON fetch, and export titles in CSV.

Changes

Checklist App Bug Fixes

Layer / File(s) Summary
Data persistence and initialization
js/app.js
STORAGE_LOAD_KEY corrected to match save key; status changes call saveChecks() and re-run filters/metrics/render; demo reset fetches data/launch-checks.json.
Form submission and validation
js/app.js
Form submit listener now calls handleAddCheck; submission blocked when title or category is missing.
Search and filtering logic
js/app.js
Search term matches title, category, priority, status, and owner; status filter compares against check.status.
Status badge, due-date classes, metrics, CSV, styles
js/app.js, css/styles.css
Status CSS class slugifies multi-word statuses; due-date cells receive overdue or due-soon classes based on days-until logic; metrics count status === "Fixed" and compute due-soon as 0–7 days; CSV export uses check.title; new .overdue and .due-soon CSS rules added.
Row deletion handling
js/app.js
Delete reads data-remove-id, converts it to number, prompts for confirmation, filters/removes the check, saves state, and logs the deletion.

Sequence Diagram(s)

sequenceDiagram
  participant BrowserUI
  participant App
  participant localStorage
  participant DataFetch

  BrowserUI->>App: submit form -> handleAddCheck
  App->>localStorage: saveChecks()
  App->>BrowserUI: refresh filters + render
  BrowserUI->>App: change status
  App->>localStorage: saveChecks()
  App->>BrowserUI: refresh metrics + render
  BrowserUI->>App: demo reset clicked
  App->>DataFetch: fetch "data/launch-checks.json"
  DataFetch->>App: return demo checks
  App->>BrowserUI: render demo checks
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit hops through bugs with glee,
Keys aligned so data's free,
Forms now guard the title and category,
Dates glow red or amber for all to see,
CSVs export titles and deletions log with tea. 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Resolve all 12 bugs in LaunchDesk app' accurately summarizes the main objective of the changeset, which encompasses fixes to 12 distinct bugs across the application.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a set of functional issues in the LaunchDesk checklist workflow, primarily around persistence, filtering, UI interactions, and data export so the app behaves correctly across refreshes and user actions.

Changes:

  • Fixed localStorage persistence (key mismatch) and ensured status changes are saved and reflected in the current filtered view/metrics.
  • Corrected UI/workflow breakages (submit handler typo, required-field validation, delete button dataset mismatch).
  • Improved user-facing functionality and reporting (broader search, correct status-based metrics, due-soon logic, demo reset fetch path, CSV export field, and status CSS slugging).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread js/app.js Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
css/styles.css (1)

565-573: ⚡ Quick win

Prefer CSS custom properties for design system consistency.

The new utility classes hardcode color values (#dc2626, #d97706) while the rest of the stylesheet uses CSS custom properties defined in :root. This divergence makes future color updates harder and breaks the design system pattern.

♻️ Proposed refactor to use existing CSS variables
 .overdue {
-  color: `#dc2626`;
+  color: var(--danger);
   font-weight: bold;
 }
 
 .due-soon {
-  color: `#d97706`;
+  color: var(--warning);
   font-weight: bold;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@css/styles.css` around lines 565 - 573, Replace the hardcoded hex colors in
the .overdue and .due-soon utilities with the site's CSS custom properties used
in :root (e.g., use var(--color-danger) for .overdue and var(--color-warning)
for .due-soon or the equivalent variable names used elsewhere in the stylesheet)
while keeping font-weight: bold; so the classes become consistent with the
design system and pick up theme updates automatically.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@css/styles.css`:
- Around line 565-573: Replace the hardcoded hex colors in the .overdue and
.due-soon utilities with the site's CSS custom properties used in :root (e.g.,
use var(--color-danger) for .overdue and var(--color-warning) for .due-soon or
the equivalent variable names used elsewhere in the stylesheet) while keeping
font-weight: bold; so the classes become consistent with the design system and
pick up theme updates automatically.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e8c62da3-1d3d-42ac-bd04-98fda4d381bc

📥 Commits

Reviewing files that changed from the base of the PR and between f30b5c5 and 519261c.

📒 Files selected for processing (2)
  • css/styles.css
  • js/app.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • js/app.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants