Skip to content

Conversation

Copy link

Copilot AI commented Nov 20, 2025

Implements real-time text search for tasks with 100ms debouncing, case-insensitive partial matching, and URL state persistence.

Changes

New component: components/task-search.tsx

  • Search input with magnifying glass icon
  • Clear button (X) that appears when search has text
  • Filter button placeholder (non-functional, deferred to st002)
  • 100ms debounced URL updates via router.push()

Server-side filtering: app/(dashboard)/tasks/actions.ts

export async function getAllTasks(searchQuery?: string) {
  let tasks = await prisma.task.findMany({ /* ... */ });
  
  if (searchQuery) {
    const lowerQuery = searchQuery.toLowerCase();
    tasks = tasks.filter(task => 
      task.name.toLowerCase().includes(lowerQuery)
    );
  }
  
  return { tasks, error: null };
}

Note: In-memory filtering used instead of Prisma's mode: "insensitive" due to SQLite limitations.

Page integration: app/(dashboard)/tasks/page.tsx

  • Accepts searchParams prop (Next.js 15 async pattern)
  • Passes search query to getAllTasks()
  • Renders <TaskSearch /> component

Behavior

  • Search executes 100ms after user stops typing
  • URL updates to /tasks?search=query (preserves state across refreshes)
  • Clear button removes search param and shows all tasks
  • Partial matching: "create" matches "Create automated workflow system"

Screenshots

Search UI with results
Search filtered results

Initial state
Tasks page with search bar

Original prompt

This section details on the original issue you should resolve

<issue_title>TF-14 Basic Text Search for Tasks</issue_title>
<issue_description> Implement the work described in Jira ticket TF-14, including looking at any Figma files mentioned. When finished, transition the ticket to "In Reivew".

To do the work use the following prompt chain which describes steps for best implementing the feature:

  1. Open the repository on GitHub: https://github.com/bitovi/ai-enablement-prompts.
  2. Execute the prompt writing-code/generate-feature/generate-feature.md</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add basic text search for tasks TF-14: Add text search to tasks page Nov 20, 2025
Copilot AI requested a review from BitoviAI November 20, 2025 16:01
Copilot finished work on behalf of BitoviAI November 20, 2025 16:02
@mikedane-bitovi mikedane-bitovi deleted the copilot/add-basic-text-search branch November 24, 2025 19:09
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.

TF-14 Basic Text Search for Tasks

3 participants