feat(sidebar): user-set task labels with priority sort - #3806
Conversation
Adds a small fixed set of manually-set task labels (High priority / Active / Deprioritized / Done) to the sidebar task list. Labels are set from the task context menu's new radio-style "Label" submenu, render as a subtle colored dot on the row, persist per device alongside pin/viewed metadata (workspaces + task_metadata tables, migration 0023), and power a new "Priority" option in the Sort by menu (high-priority -> active -> unlabeled -> deprioritized -> done, tie-broken by last activity). The web host mirrors the data field in its localStorage metadata store. Generated-By: PostHog Code Task-Id: 44774774-c175-4c31-8faa-93781ed713a7
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
|
This PR has had no activity for 7 days and has been marked stale. We are moving to the monorepo and tightening PR staleness in preparation, so it will be closed in 7 days if no further activity occurs. |
|
Hey @DanielVisca, we've migrated this repo into the PostHog/posthog monorepo, so this PR needs to be recreated there. Easiest path: check out the monorepo and run the Shout if you get stuck. |
Problem
There's no lightweight way to triage the sidebar task list — you can pin (moves the row to a dedicated section) or archive (removes it), but nothing in between to mark a task as high priority, actively worked, deprioritized, or done while keeping it in place.
Changes
labelcolumn onworkspacesandtask_metadata(migration0023_task_labels),WorkspaceMetadataService.setTaskLabelwith the dual-table rowless fallback, riding the existinggetAllTaskTimestampsrecord intoTaskDatawith optimistic updates. Per-device only, like pins.@posthog/shared(task-label.ts) so workspace-server, core, ui, and the web host share one source of truth.apps/webmirrors the field in its localStorage metadata store; setting labels is desktop-only for now (the web host has no task context menu).TaskLabelDotcomponent is reusable there later).How did you test this?
WorkspaceMetadataService.setTaskLabel+ timestamp projections,parseTimestamps/deriveTaskData, the context-menu Label submenu + intent resolution,TaskItemdot rendering, and priority sorting inpartitionAndSortTasks.task-label-persistence.test.ts), proving migration 0023 applies.pnpm typecheck,pnpm lint,biome lint packages/core(zeronoRestrictedImports), andnode scripts/check-host-boundaries.mjsall clean. Remaining test failures in the full suite are pre-existing sandbox git-environment failures (identical on a clean checkout).Automatic notifications
Created with PostHog Code