Skip to content

feat: Add task search bar for real-time task filtering.#993

Open
Rohith0750 wants to merge 1 commit into
Charushi06:mainfrom
Rohith0750:feat/task-search-bar-988
Open

feat: Add task search bar for real-time task filtering.#993
Rohith0750 wants to merge 1 commit into
Charushi06:mainfrom
Rohith0750:feat/task-search-bar-988

Conversation

@Rohith0750
Copy link
Copy Markdown

Related Issue

Closes #988

Summary

This pull request adds a real-time task search bar next to the label-filter dropdown in the main dashboard. Students can now filter their active or archived tasks by typing keywords that match task titles or notes.

Changes Made

  • Added a styled text input element #task-search in index.html, positioned inline with the existing top-bar controls.
  • Added searchQuery state and a text input listener in js/app.js to handle real-time search input.
  • Updated the renderTasks() function in js/app.js to dynamically filter tasks based on the current search query.
  • Search is case-insensitive and matches both task titles and task notes.
  • Ensured search functionality works alongside existing label/tag filtering.

Testing

  • Tested locally by running the application with npm start.
  • Verified that typing keywords filters tasks instantly without requiring a page refresh.
  • Confirmed that search works correctly with subject filters and tag labels.
  • Ran the automated test suite using npm test.
  • All tests passed successfully (5/5).

Screenshots

Before

image

After

Screenshot 2026-05-31 203110 Screenshot 2026-05-31 203121

Copilot AI review requested due to automatic review settings May 31, 2026 15:12
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a task search input that filters tasks by title or notes alongside the existing label filter.

Changes:

  • Introduces a searchQuery state variable and input handler that re-renders tasks on change.
  • Updates renderTasks to apply the search filter in combination with the label filter.
  • Adds a search <input> element in the topbar and adjusts the label-filter styling for layout.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
js/app.js Adds search query state, input listener, and search filtering logic in renderTasks.
index.html Adds the search input field and shifts margin styling on the label filter.

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

Comment thread index.html
<div class="topbar">
<div class="topbar-title">April 2026</div>
<select id="label-filter" style="margin-left:auto; margin-right: 12px; padding: 6px; border-radius: 6px; border: 1px solid var(--color-border-secondary); background: var(--color-background-primary); color: var(--color-text-primary); outline: none; cursor: pointer;">
<input type="text" id="task-search" placeholder="Search tasks..." style="margin-left:auto; margin-right: 12px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--color-border-secondary); background: var(--color-background-primary); color: var(--color-text-primary); outline: none; width: 180px;">
Comment thread index.html
Comment on lines +117 to +118
<input type="text" id="task-search" placeholder="Search tasks..." style="margin-left:auto; margin-right: 12px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--color-border-secondary); background: var(--color-background-primary); color: var(--color-text-primary); outline: none; width: 180px;">
<select id="label-filter" style="margin-right: 12px; padding: 6px; border-radius: 6px; border: 1px solid var(--color-border-secondary); background: var(--color-background-primary); color: var(--color-text-primary); outline: none; cursor: pointer;">
@Rohith0750
Copy link
Copy Markdown
Author

Hi @Charushi06,

I have completed the implementation and submitted a PR for this issue.

PR: #988

Looking forward to your review. Thank you!

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.

feat:Task Search Bar (Frontend/UX)

2 participants