Skip to content

feat(app): add a tasks page - #142

Closed
GuzmanPintos wants to merge 3 commits into
trycompai:mainfrom
GuzmanPintos:gp/tasks-page-upstream
Closed

GuzmanPintos wants to merge 3 commits into
trycompai:mainfrom
GuzmanPintos:gp/tasks-page-upstream

Conversation

@GuzmanPintos

@GuzmanPintos GuzmanPintos commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Tasks have a page now: Open tasks on the dashboard, or Tasks in the sidebar. It's a normal table, same as Deals. Filter by when something's due or who added it, switch between Open and Done, tick one off without leaving the row, click a row to open whatever it hangs off. You can also edit a task after saving it from the record's timeline, both the text and the due date, and a due date can be cleared now rather than only replaced.

Why: a task you add on a contact with no due date just vanishes. The dashboard only ever showed tasks already past due, and an undated one never is, so the only place it existed was that contact's timeline. Undated is the normal case, too. The date picker doesn't appear until you switch the composer over to Task, and nothing makes you use it. The dashboard card stays as it is. The page is where the rest of them live, undated included, under the No due date filter.

Creating a task still happens on a timeline rather than on this page, since it has to hang off a company, contact or deal.

Screenshots
Dashboard - "Open tasks" button following "Open deals" next to it
image

Tasks page
image

Edit a task
image


Summary by cubic

Adds a paginated Tasks page with search, facets, sorting, and inline complete/edit. It stores task due dates as calendar-day strings so due windows are consistent for the viewer’s “today”, and surfaces undated tasks that were previously invisible outside timelines.

  • Replaces activities.myTasks with activities.tasks returning { rows, total, facetCounts }; supports q, pagination, sorting, and facets: status (open/done), due (overdue/today/week/later/none), and createdBy; requires a today day to compute windows.
  • Adds activities.update to edit a task’s subject and dueAt with validation; dueAt is a calendar day (YYYY-MM-DD) or null, not an instant.
  • Stores task due dates as UTC‑midnight days and serializes dueAt as YYYY-MM-DD. dashboard.summary now requires today and returns overdue task dueAt as a day string.
  • UI: new /tasks route and rail item; table with tabs (Open/Done), facets (Due, Added by), search, sorting, pagination; inline complete; row click opens the linked record; timeline task editor with day picker; viewer‑day context and relative day labels; dashboard “Open tasks” button.

Required migration actions

  • Replace any activities.myTasks calls with activities.tasks.
  • Pass today (YYYY-MM-DD) to activities.tasks and dashboard.summary.
  • When creating or updating tasks, send dueAt as a day string (YYYY-MM-DD) or null.
  • Use activities.update to edit existing tasks.

Written for commit 50895b1. Summary will update on new commits.

Review in cubic

The dashboard's only task surface filtered on `dueAt < now`, so a task saved
without a due date — the default in the composer — was invisible everywhere but
its own record timeline. Adds a paginated tasks list on the same DataTable stack
as the other record pages, replacing the unused `activities.myTasks` procedure,
and lets a task's text and due date be edited after it is saved.

Task due dates are stored as UTC-midnight calendar days so a window filter
means the same thing regardless of the viewer's timezone.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@GuzmanPintos is attempting to deploy a commit to the Comp AI - PoC Team on Vercel.

A member of the Team first needs to authorize it.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 35 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread apps/app/components/viewer-day.tsx Resolved
Comment thread apps/app/app/(app)/[slug]/page.tsx Resolved
Comment thread apps/app/components/crm/task-window.ts Resolved
@GuzmanPintos
GuzmanPintos force-pushed the gp/tasks-page-upstream branch from c764426 to d34ff00 Compare August 14, 2026 20:20
snayyar00 added a commit to snayyar00/crm that referenced this pull request Sep 16, 2026
…e dates

Replaces activities.myTasks with activities.tasks (paged, faceted);
dashboard.summary takes a viewer today. Keeps our Calendar rail item
and the obligations lifecycle inside complete().

@ripgrim ripgrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review result: rewrite from current main.\n\n- Stored timestamps can become incorrect UTC days.\n- Server and browser days use different boundaries.\n- Clickable rows lack keyboard activation.\n- “Due this week” implements a rolling window.\n- Inline editing does not restore focus.\n- Each list request performs ten database queries.\n\nThe feature remains useful, but this branch is not safe to merge.

@ripgrim

ripgrim commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

This branch is stale and conflicts with current main. The tasks feature needs a current-main rewrite with one timezone model and complete keyboard behavior.

@ripgrim ripgrim closed this Oct 22, 2026
snayyar00 added a commit to snayyar00/crm that referenced this pull request Nov 3, 2026
Takes upstream as the base for every file the fork only carried as an
early copy of an upstream PR (trycompai#142, trycompai#194, trycompai#212, trycompai#213, trycompai#216, trycompai#219, trycompai#221),
then re-applies the fork's own changes on top:

- obligations: completing a RECHECK_DUE task spawns the next re-check
  inside the same transaction (new spec covers spawn, re-open, deliverable)
- deals: winning a deal asks for the engagement type
- auth: forced Google consent kept; hd hint withheld when several sign-in
  domains are allowed (spec added); primaryWorkspaceDomain back to upstream
- nav: Calendar and Crons & Syncs re-homed into the Neo workspace nav
- brand: WebAbility strings re-applied to upstream copies
- agent: document agent ported to eve 0.69 (sandbox + dynamic model)
- docker: bun 1.4.0 to match the pinned packageManager and new lockfile

Removes leftover take files the upstream versions replaced (csv-parse,
task-window, viewer-day, task-edit.spec).

check-types 15/15, lint 11/11, lint:slop clean, app build ok,
tests: api 447, agent 416, app 260, auth 69, db 115, telemetry 61,
mcp 12, env 17, validation 8 (0 fail, 0 skip).
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.

2 participants