Skip to content

Added new project - #4

Open
fazilmemmedzade wants to merge 1 commit into
burakorkmez:masterfrom
fazilmemmedzade:master
Open

Added new project#4
fazilmemmedzade wants to merge 1 commit into
burakorkmez:masterfrom
fazilmemmedzade:master

Conversation

@fazilmemmedzade

@fazilmemmedzade fazilmemmedzade commented Jul 2, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features
    • Added a productivity dashboard with a focus timer, quick notes area, and task list.
    • Users can start, pause, and reset the timer, add tasks, mark them complete, and delete them.
    • Quick notes are automatically saved and restored for later use.
    • Added a polished, responsive layout and styling for the dashboard.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new static "productivity dashboard" page consisting of an HTML structure, a CSS stylesheet, and a JavaScript file. The page provides a countdown focus timer with start/pause/reset controls, a task list with add/complete/delete and a 4-item cap, and a quick notes field persisted via localStorage.

Changes

Productivity Dashboard

Layer / File(s) Summary
Dashboard markup
55-productivity-dashboard/index.html
New HTML page with timer display, Start/Reset buttons, quick notes textarea, task input/add button, and empty task list container; loads style.css and script.js.
Countdown timer logic
55-productivity-dashboard/script.js
Implements 25-minute countdown, display updates, Start/Pause/Resume toggling, alert on completion, and Reset behavior.
Task list behavior
55-productivity-dashboard/script.js
Adds tasks (max 4), toggles completed state on click, deletes tasks, and supports Enter-key submission.
Quick note persistence
55-productivity-dashboard/script.js
Loads and saves quick note text to localStorage on input.
Dashboard styling
55-productivity-dashboard/style.css
Adds reset styles, layout/container/card/panel styles, timer typography, button variants, input/textarea styles, and task list visuals including completed/delete states.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UI
  participant Script
  participant LocalStorage

  User->>UI: click Start
  UI->>Script: startBtn click handler
  Script->>Script: decrement timeLeft, update display
  Script->>UI: alert on time up

  User->>UI: type task, press Enter/click Add
  UI->>Script: addTaskBtn handler
  Script->>UI: render task item in `#taskList`

  User->>UI: type quick note
  UI->>Script: input event handler
  Script->>LocalStorage: save note
  LocalStorage-->>Script: return saved note on load
Loading

Compact metadata: New feature addition, single directory, no exported/public API changes.

Suggested labels: enhancement, javascript, css

Suggested reviewers: burakorkmez

Poem:

A rabbit clicks Start, the timer begins to run,
Tasks hop in a list, capped at four, then done,
Notes tucked safe in storage, saved with every key,
A tidy little dashboard, built for you and me. 🐇⏱️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague to describe the actual change; it doesn't mention the new productivity dashboard or its UI/script files. Use a specific title like 'Add productivity dashboard with timer, tasks, and notes'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (5)
55-productivity-dashboard/index.html (4)

19-19: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Timer text updates aren't announced to assistive tech.

#timer is updated every second by script.js but has no aria-live region, so screen-reader users get no periodic feedback on remaining time.

🤖 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 `@55-productivity-dashboard/index.html` at line 19, The timer updates in the
timer display are not announced to assistive technologies because the `#timer`
element lacks a live region. Update the timer element in index.html so the
existing timer display used by script.js exposes changes to screen readers,
using an appropriate aria-live setting and accessible announcement behavior
while keeping the timer’s current role and content flow intact.

44-46: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Icon-only button has no accessible name.

addTaskBtn renders only a Bootstrap icon glyph, so screen readers announce nothing meaningful for this control.

♿ Proposed fix
-                <button class="btn btn-primary" id="addTaskBtn">
+                <button class="btn btn-primary" id="addTaskBtn" aria-label="Add task">
                     <i class="bi bi-plus-lg"></i>
                 </button>
🤖 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 `@55-productivity-dashboard/index.html` around lines 44 - 46, The addTaskBtn
button is icon-only and lacks an accessible name for assistive technologies.
Update the button in the markup for addTaskBtn so it exposes a meaningful label
via accessible text or an aria-label while keeping the Bootstrap icon as the
visual affordance. Ensure the fix is applied to the button element itself so
screen readers can identify the action clearly.

8-8: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add Subresource Integrity (SRI) to the CDN stylesheet.

Loading bootstrap-icons from a third-party CDN without an integrity/crossorigin attribute means a compromised CDN could silently inject malicious CSS/content-based attacks into the page.

🔒 Proposed fix
-    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" integrity="<sha384-hash-from-jsdelivr>" crossorigin="anonymous">
🤖 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 `@55-productivity-dashboard/index.html` at line 8, The external bootstrap-icons
stylesheet link in index.html is missing SRI protection, so update the existing
<link rel="stylesheet"> tag to include the proper integrity hash and crossorigin
attribute. Use the same stylesheet reference already present, and verify the
attributes are added on that CDN link so the browser can validate the resource
before applying it.

33-33: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Inputs rely on placeholder text instead of labels.

The quickNote textarea and taskInput field only have placeholder attributes, no associated <label>. Placeholder text disappears on input/focus and isn't reliably announced by all screen readers, hurting accessibility for these form controls.

♿ Proposed fix
+            <label for="quickNote" class="visually-hidden">Quick notes</label>
             <textarea class="form-control text-textarea" id="quickNote" placeholder="Type your thoughts here..."></textarea>
+                <label for="taskInput" class="visually-hidden">Add a new task</label>
                 <input type="text" class="form-control" id="taskInput" placeholder="Add a new task...">

Also applies to: 43-43

🤖 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 `@55-productivity-dashboard/index.html` at line 33, The form controls in the
productivity dashboard rely on placeholder text instead of accessible labels.
Add explicit associated <label> elements for both quickNote and taskInput in the
HTML, making sure each label is tied to the correct control via id/for or
equivalent accessible markup. Keep the placeholders if useful, but do not use
them as the only accessible name for these inputs.
55-productivity-dashboard/style.css (1)

18-36: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Fixed-size layout with overflow: hidden won't adapt to smaller viewports.

The dashboard body forces height: 100vh; overflow: hidden, and .dashboard-container is hard-coded to 680px x 380px. On viewports narrower/shorter than this (e.g., typical mobile), content will be clipped with no way to scroll to it.

🤖 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 `@55-productivity-dashboard/style.css` around lines 18 - 36, The fixed viewport
sizing in body and .dashboard-container prevents the dashboard from adapting to
smaller screens, so update the layout in style.css to be responsive instead of
relying on hard-coded dimensions. Adjust the body styling to avoid forcing
height: 100vh with overflow hidden, and change .dashboard-container from fixed
680px x 380px sizing to flexible, viewport-aware sizing (for example using
max-width, min-height, and responsive flex wrapping or media queries). Use the
existing body and dashboard-container selectors to locate the layout rules and
ensure the page can scroll or reflow on narrow or short viewports.
🤖 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.

Inline comments:
In `@55-productivity-dashboard/script.js`:
- Around line 61-67: The task item markup in the task list rendering uses
untrusted taskText inside innerHTML, which should be replaced with DOM
construction to avoid XSS-style injection. Update the task creation flow in the
function that builds each li so the text is assigned via textContent on a span
element instead of interpolation, then create the delete button and icon with
createElement, and wire the existing delete handler directly to that button
rather than using li.querySelector for lookups.
- Around line 60-67: The add-task flow in script.js checks the 4-task limit
before validating empty input, so an empty submission can trigger the
maximum-tasks alert. In the task creation handler around the taskText check and
the max-item guard, move the empty-string validation ahead of the cap check so
blank input becomes a silent no-op. Keep the logic in the same add-task path
where li is created and appended, but ensure the alert only fires for non-empty
submissions that actually exceed the limit.

In `@55-productivity-dashboard/style.css`:
- Around line 58-70: The utility class set in style.css is missing the flex
centering helper used by the button container, so the Start/Reset buttons stay
left-aligned. Add a .justify-content-center rule alongside the existing flex
utilities in style.css so the markup using d-flex justify-content-center gap-2
can center its children correctly.

---

Nitpick comments:
In `@55-productivity-dashboard/index.html`:
- Line 19: The timer updates in the timer display are not announced to assistive
technologies because the `#timer` element lacks a live region. Update the timer
element in index.html so the existing timer display used by script.js exposes
changes to screen readers, using an appropriate aria-live setting and accessible
announcement behavior while keeping the timer’s current role and content flow
intact.
- Around line 44-46: The addTaskBtn button is icon-only and lacks an accessible
name for assistive technologies. Update the button in the markup for addTaskBtn
so it exposes a meaningful label via accessible text or an aria-label while
keeping the Bootstrap icon as the visual affordance. Ensure the fix is applied
to the button element itself so screen readers can identify the action clearly.
- Line 8: The external bootstrap-icons stylesheet link in index.html is missing
SRI protection, so update the existing <link rel="stylesheet"> tag to include
the proper integrity hash and crossorigin attribute. Use the same stylesheet
reference already present, and verify the attributes are added on that CDN link
so the browser can validate the resource before applying it.
- Line 33: The form controls in the productivity dashboard rely on placeholder
text instead of accessible labels. Add explicit associated <label> elements for
both quickNote and taskInput in the HTML, making sure each label is tied to the
correct control via id/for or equivalent accessible markup. Keep the
placeholders if useful, but do not use them as the only accessible name for
these inputs.

In `@55-productivity-dashboard/style.css`:
- Around line 18-36: The fixed viewport sizing in body and .dashboard-container
prevents the dashboard from adapting to smaller screens, so update the layout in
style.css to be responsive instead of relying on hard-coded dimensions. Adjust
the body styling to avoid forcing height: 100vh with overflow hidden, and change
.dashboard-container from fixed 680px x 380px sizing to flexible, viewport-aware
sizing (for example using max-width, min-height, and responsive flex wrapping or
media queries). Use the existing body and dashboard-container selectors to
locate the layout rules and ensure the page can scroll or reflow on narrow or
short viewports.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9009b025-863c-497f-acfb-0fdacd5f5dc4

📥 Commits

Reviewing files that changed from the base of the PR and between 11f2e5a and c0c577e.

📒 Files selected for processing (3)
  • 55-productivity-dashboard/index.html
  • 55-productivity-dashboard/script.js
  • 55-productivity-dashboard/style.css

Comment on lines +60 to +67
if (taskText !== "") {
const li = document.createElement('li');
li.className = 'task-item';

li.innerHTML = `
<span>${taskText}</span>
<button class="delete-task-btn"><i class="bi bi-trash"></i></button>
`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Empty-input path hits the max-task alert unnecessarily.

The 4-item cap check (Lines 55-58) runs before the empty-string check (Line 60). If the list already has 4 tasks and the user presses Enter/Add with an empty input, they get a spurious "Maximum 4 tasks allowed" alert instead of a silent no-op.

🐛 Proposed fix
 addTaskBtn.addEventListener('click', () => {
     const taskText = taskInput.value.trim();
-    
-    // Prevent scrolling by limiting to 4 items max
-    if (taskList.children.length >= 4) {
-        alert("Maximum 4 tasks allowed to keep the interface compact!");
-        return;
-    }
-
-    if (taskText !== "") {
+    if (taskText === "") return;
+
+    // Prevent scrolling by limiting to 4 items max
+    if (taskList.children.length >= 4) {
+        alert("Maximum 4 tasks allowed to keep the interface compact!");
+        return;
+    }
+
+    {
         const li = document.createElement('li');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (taskText !== "") {
const li = document.createElement('li');
li.className = 'task-item';
li.innerHTML = `
<span>${taskText}</span>
<button class="delete-task-btn"><i class="bi bi-trash"></i></button>
`;
addTaskBtn.addEventListener('click', () => {
const taskText = taskInput.value.trim();
if (taskText === "") return;
// Prevent scrolling by limiting to 4 items max
if (taskList.children.length >= 4) {
alert("Maximum 4 tasks allowed to keep the interface compact!");
return;
}
{
const li = document.createElement('li');
li.className = 'task-item';
li.innerHTML = `
<span>${taskText}</span>
<button class="delete-task-btn"><i class="bi bi-trash"></i></button>
`;
🧰 Tools
🪛 ast-grep (0.44.0)

[warning] 63-66: Avoid assigning untrusted data to innerHTML/outerHTML or document.write
Context: li.innerHTML = <span>${taskText}</span> <button class="delete-task-btn"><i class="bi bi-trash"></i></button>
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

(inner-outer-html)

🤖 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 `@55-productivity-dashboard/script.js` around lines 60 - 67, The add-task flow
in script.js checks the 4-task limit before validating empty input, so an empty
submission can trigger the maximum-tasks alert. In the task creation handler
around the taskText check and the max-item guard, move the empty-string
validation ahead of the cap check so blank input becomes a silent no-op. Keep
the logic in the same add-task path where li is created and appended, but ensure
the alert only fires for non-empty submissions that actually exceed the limit.

Comment on lines +61 to +67
const li = document.createElement('li');
li.className = 'task-item';

li.innerHTML = `
<span>${taskText}</span>
<button class="delete-task-btn"><i class="bi bi-trash"></i></button>
`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Untrusted input written via innerHTML (CWE-79).

taskText (from Line 52, user's own taskInput) is interpolated directly into li.innerHTML. Flagged by static analysis for CWE-79 improper neutralization. Even on a single-user local page, building markup via textContent/createElement avoids the anti-pattern entirely.

🛡️ Proposed fix
-        li.innerHTML = `
-            <span>${taskText}</span>
-            <button class="delete-task-btn"><i class="bi bi-trash"></i></button>
-        `;
+        const span = document.createElement('span');
+        span.textContent = taskText;
+        const delBtn = document.createElement('button');
+        delBtn.className = 'delete-task-btn';
+        delBtn.innerHTML = '<i class="bi bi-trash"></i>';
+        li.append(span, delBtn);

Then update the selectors to use span/delBtn directly instead of li.querySelector(...).

🧰 Tools
🪛 ast-grep (0.44.0)

[warning] 63-66: Avoid assigning untrusted data to innerHTML/outerHTML or document.write
Context: li.innerHTML = <span>${taskText}</span> <button class="delete-task-btn"><i class="bi bi-trash"></i></button>
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

(inner-outer-html)

🤖 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 `@55-productivity-dashboard/script.js` around lines 61 - 67, The task item
markup in the task list rendering uses untrusted taskText inside innerHTML,
which should be replaced with DOM construction to avoid XSS-style injection.
Update the task creation flow in the function that builds each li so the text is
assigned via textContent on a span element instead of interpolation, then create
the delete button and icon with createElement, and wire the existing delete
handler directly to that button rather than using li.querySelector for lookups.

Source: Linters/SAST tools

Comment on lines +58 to +70
.p-3 { padding: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.text-muted { color: var(--bs-text-muted) !important; }
.text-uppercase { text-transform: uppercase; }
.small { font-size: 0.875rem; }
.font-weight-bold { font-weight: 700; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.gap-2 { gap: 0.5rem; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

.justify-content-center is used in the markup but never defined here.

index.html line 20 applies d-flex justify-content-center gap-2 to center the Start/Reset buttons. Since .d-flex sets display:flex, the parent's text-align:center (from .text-center on the card) has no effect on flex-item positioning — without a .justify-content-center rule, those buttons will render left-aligned instead of centered as intended.

🐛 Proposed fix
 .gap-2 { gap: 0.5rem; }
+.justify-content-center { justify-content: center; }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.p-3 { padding: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.text-muted { color: var(--bs-text-muted) !important; }
.text-uppercase { text-transform: uppercase; }
.small { font-size: 0.875rem; }
.font-weight-bold { font-weight: 700; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.gap-2 { gap: 0.5rem; }
.p-3 { padding: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.text-muted { color: var(--bs-text-muted) !important; }
.text-uppercase { text-transform: uppercase; }
.small { font-size: 0.875rem; }
.font-weight-bold { font-weight: 700; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.gap-2 { gap: 0.5rem; }
.justify-content-center { justify-content: center; }
🤖 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 `@55-productivity-dashboard/style.css` around lines 58 - 70, The utility class
set in style.css is missing the flex centering helper used by the button
container, so the Start/Reset buttons stay left-aligned. Add a
.justify-content-center rule alongside the existing flex utilities in style.css
so the markup using d-flex justify-content-center gap-2 can center its children
correctly.

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.

1 participant