Promote domains + priority UI on task rows (#162)#165
Open
meninoebom wants to merge 2 commits into
Open
Conversation
…debar (#162) - Add `important` and `urgent` booleans to the Task interface in api-types.ts - Add `setPriority()` API helper calling POST /tasks/{id}/priority - Create DomainNav sidebar component fetching domains + pending task counts, with URL param filtering (?domain_id=<id>) - Add DomainNav to desktop sidebar in layout.tsx (below time bucket nav) - Remove domain pill row from today/page.tsx; domain filter now reads ?domain_id from URL - Add ! and ⚡ priority pills to TaskItem: hidden by default, visible on hover, active state with red/amber styling - Apply Q1 row styling (2px red left border + rgba(239,68,68,0.08) bg) when both important && urgent - Optimistic updates with rollback on priority toggle Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
🚅 Deployed to the tend-pr-165 environment in Tend
|
…, DomainNav All - task-item: sync important/urgent from props via useEffect (stale local state bug) - task-item: mountedRef guard on rollback setState to avoid unmounted-component update - task-item: call onMutate() after successful priority toggle so quadrant/list re-sorts - task-item: add aria-label to ! and ⚡ pills for screen readers - task-item: Q1 row uses Tailwind bg-red-500/[0.08] instead of inline rgba (theme-safe) - task-item: remove dead inline style overrides on pills (Tailwind classes now own it) - domain-nav: add "All" button to clear the domain filter - domain-nav: distinguish loaded-empty vs load-failed (show null only after data arrives) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
importantandurgentboolean fields to the frontendTasktype and API layerDomainNav) using URL param?domain_id=<id>for cross-page state!(important) and⚡(urgent) priority pills to everyTaskItem— hidden by default, visible on hover, with active red/amber styling from the prototype specrgba(239,68,68,0.08)tinted background on the rowChanges
api-types.ts— addimportant: booleanandurgent: booleantoTaskinterfaceapi.ts— addsetPriority(id, {important?, urgent?})callingPOST /tasks/{id}/prioritycomponents/domain-nav.tsx— new client component: fetches domains + pending tasks, renders sidebar nav with colored dots + task counts, filters via?domain_idURL param(app)/layout.tsx— import and renderDomainNavbelow main nav items (desktop sidebar only), wrapped in Suspense(app)/today/page.tsx— remove domain pill row, readdomainFilterfromuseSearchParams("domain_id"), wrap in Suspense for production compatibilitycomponents/task-item.tsx— add optimistic priority state,handleToggleImportant/handleToggleUrgentwith try/catch rollback, priority pills (opacity-0 → visible on group-hover), Q1 row border + bgTest plan
?domain_id=<id>!and⚡pills appear!— pill turns red, task shows important active styling⚡— pill turns amber, task shows urgent active stylingnpm run buildexits 0 with no TypeScript errors🤖 Generated with Claude Code