Skip to content

Label Issue to refine the code by optimising it #11

@kavyashri-as

Description

@kavyashri-as

Overview\n\nThis issue tracks code refinement and optimisation work for the Label feature.\n\n## Areas to Optimise\n\n- Database queries: Batch-fetch labels for all tasks in a single query instead of one query per task in enrichTasksWithLabels, reducing N+1 query overhead.\n- Frontend rendering: Avoid full task list re-renders on label assign/remove; update only the affected task DOM node.\n- Filter logic: Cache filtered task results client-side to avoid redundant API calls when switching between the same label filters.\n- Label validation: Consolidate duplicated validation logic between the test routes and the main index.js routes.\n\n## Acceptance Criteria\n\n- [ ] enrichTasksWithLabels uses a single batched SQL query\n- [ ] Assigning/removing a label updates only the relevant task in the DOM\n- [ ] No redundant network requests when re-selecting an active filter\n- [ ] Shared validation helpers are reused across route files and tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions