> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# To-Dos

> View and manage to-do items with My and All tabs, filtering, drag-to-reorder support, and per-item detail with comments and status transitions.

The To-Dos screen is accessible at `/lo/todos` and provides a list view of to-do items scoped to the current user or the entire organization, with filtering, search, and drag-to-reorder capability.

## Overview

The `TodosPage` uses the platform `useTasks` hook (mapping results through `mapTaskToTodo`) to load to-dos for the current organization. Two tabs — **My** and **All** — switch between the current user's tasks and all organization tasks. Filters include status, priority, linked goal (`rockId`), due date range, and a search input. The `includeCompleted` toggle shows or hides completed items. To-do cards are rendered as `TodoCardSwipeable` components supporting swipe gestures. Tasks are reordered via `useTaskReorder`. The `TodoFormDialog` opens when the "+" button is clicked or when the `?action=new` query parameter is present (used by keyboard shortcuts). A "today" due-date filter is available.

## Who it's for

Requires `LO_PERMISSIONS.DASHBOARD_VIEW` (`lo.dashboard.view`) via the shared `LOViewGuard`. Creating to-dos additionally requires `lo.todos.create`.

## Before you start

* `lo.dashboard.view` permission required.
* An active organization context is required (`useOrganization`).

## Steps

<Steps>
  <Step title="Navigate to To-Dos">Go to `/lo/todos`. The page loads your to-dos on the My tab.</Step>
  <Step title="Switch tabs">Toggle between My (current user's tasks) and All (organization-wide tasks).</Step>
  <Step title="Filter items">Use the status, priority, and due-date filters, or type in the search input to narrow results.</Step>
  <Step title="Show completed items">Enable the include-completed toggle to see finished to-dos.</Step>
  <Step title="Reorder">Drag `TodoCardSwipeable` cards to reorder them; order is persisted via `useTaskReorder`.</Step>
  <Step title="Create a to-do">Select the "+" button or navigate to `/lo/todos?action=new` to open `TodoFormDialog`.</Step>
  <Step title="Open a to-do">Select a card to navigate to `/lo/todos/:todoId` for full detail.</Step>
</Steps>

## Key concepts

* **mapTaskToTodo**: adapter that converts platform `Task` objects to the LO `Todo` type.
* **TodoCardSwipeable**: swipeable card component for mobile-friendly to-do management.
* **sort\_order**: persisted ordering field updated via `useTaskReorder`.

## Viewing a to-do

The To-Do Details screen is accessible at `/lo/todos/:todoId` and shows the full detail for a single to-do item, including status/priority/overdue indicators, a comment thread, assignee, dates, and a linked goal.

The `TodoDetailPage` fetches the to-do via `useTask` (mapped through `mapTaskToTodo`) and `useTaskMutation` for mutations. The page displays a title, status badge (open/in\_progress/complete/cancelled), priority badge (high/medium/low), an overdue indicator (when due date is past and status is not complete), a description, and a `TodoCommentThread`. Metadata panels show the assignee avatar, creation date, due date, and the linked goal if present. Action buttons allow completing, starting, cancelling, editing (via `TodoFormDialog`), and deleting (with an `AlertDialog` confirmation). If the to-do is not found, a "To-do not found" message is shown.

Permissions: `lo.dashboard.view` required; editing requires `lo.todos.edit`. The to-do identified by `:todoId` must exist in the active organization.

1. Open a to-do: navigate to `/lo/todos/:todoId` or select a to-do from the To-Dos list.
2. Review details: read the title, status, priority, description, assignee, and due date. An overdue badge appears if the due date is past.
3. Add a comment: use the `TodoCommentThread` section to add comments to the to-do.
4. Change status: use the Start, Complete, or Cancel action buttons to update the to-do's status.
5. Edit: select Edit to open `TodoFormDialog` with the current values pre-filled.
6. Delete: select Delete and confirm in the `AlertDialog` to permanently remove the to-do.

**Key concepts:**

* **Status values**: `open`, `in_progress`, `complete`, `cancelled`.
* **Priority values**: `high`, `medium`, `low`.
* **Overdue**: computed via `isPast` and `isToday` from `date-fns` against the due date when status is not `complete`.

## Related

<Columns cols={2}>
  <Card title="Leadership" icon="compass" href="/lo/overview">
    Leadership core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/lo.tsx
  * src/cores/lo/pages/TodosPage.tsx
  * src/cores/lo/pages/TodoDetailPage.tsx
  * src/cores/lo/utils/taskAdapters.ts
</Accordion>
