Repository navigation
Description
Context
The request: "It should show the task assignment status in the task detail page. From there it should be possible to change the assignment (assign one ore multiple users to it)."
The endpoints exist (GET/PUT /api/task/:taskId/assignees, GET /api/task/:taskId/assignable-users) and AssigneeList exists. This task adds the control to the detail page.
The detail header is a carefully budgeted layout. ContextStrip groups facts into a "Git context" cluster (repo, PR, issue, commit) and a "telemetry" cluster (model, duration, tokens, spend), separated by hairline dividers, and DesktopTaskHeader composes those with the title and ActionBar. On a phone the header collapses into a single 44px bar (MOBILE_COMPACT_BAR_HEIGHT) that holds only the PR, the title and the overflow. Assignment is a Git-context fact - it lives on the issue or pull request - so it belongs in that cluster, and it must not expand the collapsed phone bar.
Assignment also does not apply to every task: a goal task has no issue or PR, and the API answers 409 with NO_ASSIGNMENT_SUBJECT for those. The control has to hide itself in that case rather than showing a broken editor.
Requirements
- Add
propr-ui/src/components/TaskDetails/AssignmentControl.tsx:- Read-only display of the current assignees using
AssigneeListin theprominentdensity, with anAssignaffordance when the viewer may edit. - A popover editor listing assignable users with checkboxes, a filter input, the current selection pre-checked, and Save / Cancel.
- An unassign path (clearing the selection and saving).
- Optimistic update with rollback and a toast on failure, matching how
useTaskDatareports stop and delete failures.
- Read-only display of the current assignees using
- Add
propr-ui/src/components/TaskDetails/useTaskAssignment.tsowning the fetch, the save, theNO_ASSIGNMENT_SUBJECTdetection and the loading/error state. - Render the control inside
ContextStrip's Git cluster on desktop, after the commit chip. - On a phone, render it in the expanded
MobileSummarymetadata section only; the collapsed compact bar must stay exactly 44px and keep its current contents. - When the API reports
NO_ASSIGNMENT_SUBJECT, render nothing at all - no label, no empty state. - When the user lacks write access (403 on save), keep the read-only display, show the reason once in a toast, and stop offering the editor for that task.
- Accessibility: the popover traps focus, closes on Escape with focus returned to the trigger, and the checkbox list is keyboard-navigable - following the patterns already used by
TaskOverflowMenuinActionBar.tsx. - Playwright coverage for display, editing, unassigning, the hidden-for-goals case, the read-only case, and no overflow at 390px/1440px.
Implementation Specification
Files added
propr-ui/src/components/TaskDetails/AssignmentControl.tsxpropr-ui/src/components/TaskDetails/useTaskAssignment.tspropr-ui/e2e/task-details-assignment.pw.ts
Files modified
propr-ui/src/components/TaskDetails/ContextStrip.tsx- render the control in the Git cluster.propr-ui/src/components/TaskDetails/index.tsx- pass the task id into the strip's props and render the control inMobileSummary.
Step-by-step
- Write
useTaskAssignment.ts: fetch on mount withgetTaskAssignees, exposeassignees,subject,editable,unavailable,saving, andsave(logins); detectNO_ASSIGNMENT_SUBJECTfrom the 409 body and setunavailable. - Write
AssignmentControl.tsxwith the display, the trigger and the popover. Load assignable users lazily, only when the popover first opens, so the detail page costs nothing extra until the control is used. - Render in
ContextStrip'sgitpart, guarded ontaskIdso the component keeps working for callers that do not pass one. - Render in
MobileSummaryand leaveCompactTitleLineuntouched. - Add the Playwright spec.
Acceptance Criteria
npm run typecheckandnpm run lintpass forpropr-ui.- The detail page shows the current assignees as avatar plus
@login, and a labelledUnassignedaffordance when there are none. - Opening the editor lists assignable users with the current assignees pre-checked; saving assigns on GitHub and the display updates.
- Selecting several users assigns all of them; clearing the selection and saving unassigns.
- Assignable users are requested only when the editor is first opened, not on page load.
- A save failure rolls the display back to the previous assignees and shows a toast.
- A 403 keeps the read-only display, shows one toast, and the editor is no longer offered for that task.
- For a goal task (409
NO_ASSIGNMENT_SUBJECT) nothing is rendered: no label, no empty state, no extra divider in the Git cluster. - Escape closes the popover and returns focus to the trigger; Tab cycles within the popover while it is open.
- The collapsed mobile bar remains 44px tall and its contents are unchanged.
- No horizontal overflow at 390px or 1440px.
Created by ProPR AI Planner
Activity
propr-dev commentedon Oct 8, 2026
Suggested Implementation:
Implementation Approach
The header is the constrained resource here, so placement drives the design.
ContextStripalready separates "where this task lives" (repo, PR, issue, commit) from "how its run went" (model, duration, tokens, spend), with a documented rule that clusters are divided by hairlines rather than dots. Assignment is a property of the GitHub issue or pull request, so it is a Git-context fact and goes in that cluster, after the commit chip. Putting it in the telemetry cluster would be wrong by that file's own taxonomy; putting it on its own row would add a third header line to a layout whose comments are explicit about its two-tier budget.On a phone the collapsed bar is a fixed 44px holding the PR, the title and the overflow, and
MobileCompactBaris deliberately zero-height when hidden so showing it never reflows the page. Adding anything to it would break both properties. So assignment appears only in the expandedMobileSummary, which already holds the metadata variant of the strip.Three editor shapes were considered:
The
unavailablepath matters more than it looks. A goal task has no issue or PR, and rendering anUnassignedlabel there would be a lie about a task that can never be assigned. The hook distinguishes "nobody is assigned" from "assignment does not apply" using the API'sNO_ASSIGNMENT_SUBJECTcode, and the control renders nothing in the second case - including no divider, so the Git cluster does not gain a dangling separator.Optimistic update with rollback follows
useTaskData's existing convention for stop and delete: act immediately, revert on failure, report through the toast context rather than an inline error that would reflow the header.File:
propr-ui/src/components/TaskDetails/useTaskAssignment.ts(new file)Why this file: keeps fetching, saving, the 409/403 interpretation and the optimistic rollback out of the component, so
AssignmentControlis rendering logic only. The distinction between "unassigned" and "assignment does not apply" is decided once here, where the HTTP response is actually visible.File:
propr-ui/src/components/TaskDetails/AssignmentControl.tsx(new file)Why this file: the display and the popover editor for one task's assignment. It is a separate component so the header files stay layout-only, and so the focus-trap behaviour lives beside the popover it belongs to rather than being spread through
ContextStrip.File:
propr-ui/src/components/TaskDetails/ContextStrip.tsxWhy this file: the Git cluster is defined here, and
ContextGrouprenders nothing when it has no children, so adding the control as a child keeps the "no dangling divider" behaviour for tasks where it hides itself.@@ in the git cluster {commitInfo?.shortHash && commitInfo.url && <CommitInfoChip commitInfo={commitInfo} />} + {/* Last in the Git cluster: assignment belongs to the issue or pull + request, so it sits with them rather than with the run telemetry. + The control returns null for a task with no GitHub subject, and + ContextGroup renders no divider for an empty cluster. */} + {taskId && <AssignmentControl taskId={taskId} density="prominent" />} <AttemptLineage taskInfo={taskInfo} /></ContextGroup>File:
propr-ui/src/components/TaskDetails/index.tsxWhy this file: this component builds
contextStripPropsfor all three header variants, so the task id has to be threaded in here. It is also whereMobileSummaryandMobileCompactBarare defined, which is where the phone placement rule has to be enforced.The expanded summary already renders the metadata variant of the strip, which now carries the control.
CompactTitleLineis deliberately untouched:@@ in MobileCompactBar {/* Only the left side clips, so the 44px overflow button keeps its full touch target. */} <div className="flex h-full min-w-0 flex-1 items-center overflow-hidden"> + {/* Deliberately no assignment control here: this bar is a fixed + MOBILE_COMPACT_BAR_HEIGHT and is zero-height while hidden, so + adding anything would both reflow the page and break the height + contract. Assignment lives in the expanded summary above. */} <ContextStrip {...contextStripProps} mobileCompact={true} />The strip props gain the task id, which reaches every variant at once:
@@ where contextStripProps is assembled by useTaskHeaderView's consumer const { headerProps, contextStripProps, runStripProps, runState, inspection, headerRun } = useTaskHeaderView(taskId, runs, ownSummary); + // Threaded in here so all three header variants (desktop, mobile summary, + // mobile compact) receive it from one place. + const stripProps = useMemo(() => ({ ...contextStripProps, ...(taskId ? { taskId } : {}) }), [contextStripProps, taskId]);Replace the
contextStripPropsspreads passed toMobileSummary,MobileCompactBarandDesktopTaskHeaderwithstripProps.File:
propr-ui/e2e/task-details-assignment.pw.ts(new file)Why this file: the risks are the header layout and the hidden-for-goals case, neither of which a unit test can show. The 44px compact-bar assertion is the specific regression guard: it is the one measurement that would silently change if assignment were added to the wrong variant.
propr-dev commentedon Oct 9, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-52894/claude-opus-5-5-show-and-edit-task-assign-20261009-0651-lwb2888-epic-task-assignment-1m4issue-2894-20261009-0651-claude-opus-5-5-lwb🔍 Track Task Execution