Repository navigation
Closed
Description
Context
On a 1080p screen the /tasks page shows about 11 compact rows and then roughly 400px of empty space above the pagination bar, which says Showing 1–50 of 14,919 tasks. One title also stops mid-word with no ellipsis (… so an MCP client can actu).
Here is what the code shows is going on. Don't skip this part: it changes which fixes are worth doing.
- The footer isn't lying about the data, but it misleads.
TaskListasks for 50 tasks per page (listTasks({ limit: 50 })).groupTasksForDisplay(propr-ui/src/components/TaskList/utils.ts) then folds every run of the same pull request into one row with an "N earlier runs" rollup (seerowModel.ts/TaskRows.tsx). 50 tasks across 11 pull requests become 11 rows. Asking for "25–30 tasks per page" (the quick fix in the request) would make this worse: fewer tasks means fewer rows. The real problems are (a) the footer counts tasks while the screen shows pull-request rows, and (b) the layout pins the footer to the bottom of the viewport. - Layout. The full-page branch of
TaskListstretches its container to the viewport height (amin-h-[calc(100vh-…)]/flex-1+justify-betweenstyle column) soPaginationstays at the bottom edge. A short page therefore leaves a tall blank gap between the last row and the footer. - Horizontal sprawl. The ledger grid (
task-queue.css,TASK_QUEUE_COLUMNS) gives the title column all remaining width. On a 1920px monitor that leaves around 800px of white space between a short title and the metadata columns. - Mid-word cutoff. The visible title is exactly 100 characters long. A hard
substring(0, 100)/slice(0, 100)runs on the title before it is stored (most likely where PR task titles are built:src/jobs/prTaskTitleHelpers.ts→buildPrTaskTitle, or where issue titles are copied intoinitial_job_data). The UI's CSSline-clampcan't add an ellipsis because the string itself is already cut.
Goal
Make /tasks feel like a desktop triage console (the Linear/Sentry pattern recommended in the request, Solution 1), and also apply the cheap structural fixes (Solution 3 and the truncation bug):
- Master-detail split pane at ≥1280px (Tailwind
xl). Selecting a task opens the existingTaskDetailsview (timeline, changed files, implementation log, terminal) in a right-hand pane. There is no route change and no modal. The list stays on the left. - Footer docks under the last row instead of sitting at the bottom of the viewport.
- Footer copy matches what is on screen: it says both how many tasks and how many pull-request rows the page contains.
- Titles are never cut mid-word: new titles are shortened at a word boundary with
…, and titles that were already stored hard-cut at 100 characters get an…in the UI.
Virtualized infinite scroll (Solution 2) is out of scope. With rows grouped by pull request it would also need server-side grouping to page correctly, so it's a separate project.
Requirements
R1 – Selection state lives in the URL
- Add
?task=<taskId>to/tasks. Keep every existing filter param (repository,status,search,page, …) when it changes. Usereplace: trueso arrow-key triage doesn't flood browser history. - Add a hook
useTaskSelection()(new file) that returns{ selectedTaskId, select(id|null), isSplitViewport }.isSplitViewportuseswindow.matchMedia('(min-width: 1280px)')and updates on change.
R2 – Split workspace (≥1280px)
- New component
TaskSplitWorkspacerendersreact-resizable-panels(already a dependency; seeAiAgentsDesktopWorkspace.tsxandPlanEditorDesktopLayout.tsxfor the house pattern): a left panel (default 45%, min 32%) holding<TaskList … />and a right panel (default 55%, min 35%) holding<TaskDetails taskId={selected} embedded onClose onDeleted />. - The split is shown only when a task is selected and the viewport is ≥1280px. With nothing selected the ledger stays full width, exactly as today. This keeps first load uncluttered and keeps the existing full-width e2e assertions valid.
- Below 1280px nothing changes: clicking a row goes to
/tasks/:idas it does today. - The pane header has two controls: Open full page (link to
/tasks/:id) and Close (clears?task,Escalso works). - Each panel scrolls on its own (
min-h-0 overflow-y-auto) so neither creates page-level scroll.
R3 – Row interaction in split-capable viewports
TaskListgets two optional props:selectedTaskId?: string | nullandonSelectTask?: (taskId: string) => void. WhenonSelectTaskis set, a plain primary click (no Ctrl/Meta/Shift/Alt, button 0) on a row's title link callsevent.preventDefault()andonSelectTask(primaryTaskId). Modified clicks, middle-click and "open in new tab" keep working because the element is still a real<Link to="/tasks/:id">.- The selected row gets
aria-selected="true"(rows already haverole="row") and a visible selected style (bg-teal-50/60plus a 2px teal inset shadow on the left; reuse the teal accent the sidebar uses). - Keyboard triage while the split is active:
j/ArrowDownandk/ArrowUpmove the selection to the next/previous primary row (group.tasks[0].id) on the current page. They do nothing while focus is in aninput,textarea,selector[contenteditable].Esccloses the pane. Earlier runs inside an expanded rollup can be selected by clicking them, but j/k skip them. - The left pane is narrower than 880px, so the existing container queries in
task-queue.cssswitch the list to theMobileTaskCardlayout on their own. Don't fight this: card density is right for a 45% pane. Check that the queries use@containeron the list wrapper and not viewport@media. If they use@media, convert them to a container (container-type: inline-sizeon.task-queue).
R4 – TaskDetails can run embedded
propr-ui/src/components/TaskDetails/index.tsxcurrently reads the task ID fromuseParams. Add optional propstaskId?: string,embedded?: boolean,onClose?: () => void,onDeleted?: () => void. The prop wins over the route param.- When
embedded:- don't call
useDocumentTitle(the list owns the title); - after a successful delete, call
onDeleted()instead ofnavigate('/tasks'); - use
h-full min-h-0and keep the internal desktop split. Abovelg,TaskDetailsalready switches to a two-column timeline/output layout; inside a ~55% pane at 1280–1600px that is about 700–880px wide. Use a container query or theembeddedflag to force the single-columntask-workspace-scrolllayout, whichtask-details-responsive.pw.tsalready covers at narrow widths. key={taskId}on<TaskDetails>in the workspace, so switching tasks tears down old socket subscriptions and live-data state (useTaskLiveData,useTaskData) cleanly.
- don't call
R5 – Footer docks under the list and states row count honestly
- Remove the viewport-height stretching from the full-page
TaskListwrapper soPaginationcomes right after the table/cards, withmt-4 pb-8spacing. Paginationgets an optionalgroupCountprop. New copy:Showing tasks 1–50 of 14,919 · 11 pull requests on this page. Keep the task range wording so the existing count assertion only needs a small change. Leave out the second part whengroupCount === tasksOnPage(every task is its own row).
R6 – Titles are never cut mid-word
- Backend (new data): find the hard slice. Run
grep -rnE "\.(substring|slice)\(0, ?100\)" src packages/core/src packages/apiand check every hit that touches atitle. Replace it with a new shared helpertruncateAtWord(text, max)inpackages/shared/src/text.ts(export it from the shared index). The helper cuts at the last whitespace beforemax - 1, trims trailing punctuation, and appends…. Never return more thanmaxcharacters. - UI (existing data): add
ellipsizeHardCutTitle(title)inpropr-ui/src/components/TaskList/displayTitle.ts. If the string is exactly 100 characters and ends in a letter or digit (a strong sign of the legacy hard slice, see Context), trim back to the last whitespace and append…. Apply it at the end ofsanitizeTaskTitleinrowModel.ts, so the desktop rows, mobile cards and the earlier-runs list all pick it up. The full original title stays in thetitle=tooltip.
Out of scope
- Server-side grouping, infinite scroll, virtualization.
- Changing the API page size (it stays 50 tasks).
Acceptance criteria
- At 1920×1080, clicking a task title on
/tasksputs?task=<id>in the URL. The list moves to the left pane,TaskDetails(timeline, changed files, implementation log, terminal) appears on the right, and the page does not navigate. j/k/arrow keys move the selection and update the right pane.Esccloses it. Typing in the search box doesn't trigger these keys.- Ctrl/Cmd-click and middle-click on a title still open
/tasks/:idin a new tab. At 1024px a plain click still navigates to/tasks/:id. - Reloading
/tasks?task=<id>&repository=xrestores both the selection and the filter. - With a short page, the pagination bar sits right under the last row (no viewport-height gap). The footer reads
Showing tasks 1–50 of N · K pull requests on this page. - A stored title of exactly 100 characters that ends mid-word shows
…in rows, cards and earlier runs. Newly generated titles longer than the limit end with…at a word boundary. - Deleting a task from the embedded pane closes the pane and refreshes the list. Nothing navigates away.
npm run typecheck -w propr-ui,npm run lint -w propr-ui -- --max-warnings 0, the vitest suites, andnpx playwright test e2e/task-list-desktop.pw.ts(with the assertion updates described in the implementation) all pass.
Created by ProPR AI Planner
Activity
propr-dev commentedon Oct 3, 2026
Suggested Implementation:
Implementation Approach
The empty space has two causes. Rows are grouped by pull request (50 tasks become ~11 rows), and the footer is pinned to the bottom of the viewport. Fetching more tasks treats a symptom and changes API semantics. So we fix the layout and the copy, and then make better use of the space with a master-detail split, built from components the app already has:
?task=), not in React state. A reload or a shared link restores it, browser back works, and the existingTaskListURL-synced filters keep working with no extra plumbing. We considered a context/store, but it loses state on reload, so we rejected it.react-resizable-panelsis already used byAiAgentsDesktopWorkspaceandPlanEditorDesktopLayout. Reusing it keeps keyboard-resizable handles consistent across the app and adds no dependency.TaskDetailsis reused as-is behind ataskIdprop. This is not a new "diagnostic console" component.TaskDetailsalready renders the timeline, files, log and terminal, with socket subscriptions and responsive scroll ownership covered by e2e tests. A second implementation would drift.File:
propr-ui/src/components/TaskList/useTaskSelection.ts(new file)Why this file: This is the single source of truth for "which task is open in the pane" and "is the viewport wide enough to split".
TasksPage,TaskSplitWorkspaceand the keyboard handler all read from it, so selection and URL can't get out of sync.File:
propr-ui/src/components/TaskList/TaskSplitWorkspace.tsx(new file)Why this file: Keeps the panel layout, pane chrome and keyboard triage out of
TaskList, which is already large and handles fetching, filters and sockets.TasksPagemounts it instead of a bareTaskList. It reusesTaskDetailsthrough the newembeddedprops (see the TaskDetails changes below).File:
propr-ui/src/pages/TasksPage.tsxWhy this file: This is the route entry point.
/tasks(no:taskId) now mounts the workspace instead of a bare list./tasks/:taskIdstill renders the full-pageTaskDetails, so deep links and narrow screens behave exactly as before.File:
propr-ui/src/components/TaskList/types.tsWhy this file: Adds the selection contract to
TaskListPropssoTaskList→StateComponents→TaskRows/MobileTaskCardstay type-checked end to end.File:
propr-ui/src/components/TaskList.tsxWhy this file: Two changes. (1) Remove the viewport-height stretching that pins
Paginationto the bottom of the screen and causes the blank gap (Solution 3). (2) Pass the selection props down and givePaginationthe row count, so its copy matches what is on screen.File:
propr-ui/src/components/TaskList/StateComponents.tsxWhy this file:
TaskTableContentmaps groups toTaskQueueRow(desktop grid) orMobileTaskCard(narrow container). Both need the selection props. The split's left pane is narrow, so it will usually render cards.File:
propr-ui/src/components/TaskList/selectionLink.ts(new file)Why this file:
TaskQueueRow,MobileTaskCardandEarlierRunsListshare one click rule. Without a shared helper, three copies of the modifier-key check would drift and break Ctrl-click in one of them.File:
propr-ui/src/components/TaskList/TaskRows.tsxWhy this file: This is where the row's title
<Link>androle="row"element live. It hooks up the shared click rule, marks the selected row and exposesdata-task-row-id, which the workspace uses for j/k order.Make the same three changes in
propr-ui/src/components/TaskList/MobileTaskCard.tsx:data-task-row-id={primaryId}on the card root,SELECTED_ROW_CLASS+aria-current={selected ? 'true' : undefined}on the card (cards are list items, not grid rows, soaria-currentis the right attribute), andonClick={event => handleTaskLinkClick(event, primaryId, onSelectTask)}on its title link. PassonSelectTaskinto itsEarlierRunsListtoo.File:
propr-ui/src/components/TaskList/Pagination.tsxWhy this file: This is the footer whose copy reads as "50 rows" while 11 rows show. It now states both units. The second clause is left out when grouping didn't collapse anything, so the common one-run-per-PR case stays short.
File:
propr-ui/src/components/TaskList/displayTitle.ts(new file)Why this file: This is a pure function that repairs titles stored before the backend fix. It is a separate module so it can be unit-tested without React, and it is called from the one place every title passes through:
sanitizeTaskTitle.File:
propr-ui/src/components/TaskList/displayTitle.test.ts(new file)File:
propr-ui/src/components/TaskList/rowModel.tsWhy this file:
sanitizeTaskTitleis the single funnel for row, card and earlier-run titles (seerowModel.test.ts). Applying the repair after prefix and model-tag stripping matters: stripping shortens the string, so the 100-character check has to run on the raw title, and the ellipsis is then added to the sanitized result.(If
cleanedis shorter than 100 after stripping, the first branch applies: drop the trailing partial word and append…. Add a case torowModel.test.tswith aFix PR #2693:prefix and a 100-character raw title, and assert that the output ends withcan….)File:
packages/shared/src/text.ts(new file)Why this file: The backend needs one tested truncation helper for every place that clips titles. It lives in
@propr/sharedso the API, core and worker code all import the same rule.Export it from
packages/shared/src/index.ts(export * from './text.js';). Addpackages/shared/src/text.test.tswith the same four cases as the UI test, plustruncateAtWord('abc', 10) === 'abc'and a check that the result length is always<= max.File: backend title builders (locate with grep)
Why: This stops the bug at its source for new tasks. Run:
and replace each title-related hit as below (the likely location is
src/jobs/prTaskTitleHelpers.ts,buildPrTaskTitle):Update
test/prTaskTitleHelpers.test.ts: add a case with an over-long issue title and assert that the built title ends with…and has no partial final word.File:
propr-ui/src/components/TaskDetails/index.tsxWhy this file:
TaskDetailsis reused in the pane, so it has to accept the ID as a prop and give up page-level responsibilities (document title, post-delete navigation, wide two-column layout) when embedded.If
useDocumentTitledoesn't acceptnull, call it conditionally through a tiny wrapper component instead. Don't call a hook conditionally. In the two-column layout branch, choose the single-column branch whenembeddedis true. Use the same condition the component already uses for widths below 1024px (task-workspace-scroll), so the scroll ownership already verified bytask-details-responsive.pw.tsis reused.File:
propr-ui/e2e/task-list-split.pw.ts(new file)Why this file: Covers the new behaviour end to end with the same privacy-safe fixture approach as
task-list-desktop.pw.ts(route stubs, fixed clock), so a future layout change can't quietly bring back the blank gap or break new-tab clicks.File:
propr-ui/e2e/task-list-desktop.pw.tsWhy this file: Two existing assertions depend on old behaviour: the footer wording, and Enter on a title navigating at 1280/1920. Update them so they describe the new contract instead of deleting coverage.
(Enter on a focused
<a>fires aclickwithbutton === 0and no modifiers, sohandleTaskLinkClickintercepts it on purpose. Keyboard users get the pane, and "Open full page" in the pane header gives the full route.) Check the rollup assertions in the same test: they run before any selection, so they still see the full-width table.Verification steps for the implementer
npm run build -w @propr/shared && npm run typecheck -w propr-ui && npm run lint -w propr-ui -- --max-warnings 0npx vitest run src/components/TaskList(inpropr-ui), plus theTaskDetailsandTaskList.test.tsxsuites.TaskList.test.tsxhas footer-text assertions; update them to the new copy.node scripts/run-test-suite.mjs test/prTaskTitleHelpers.test.ts packages/shared/src/text.test.tscd propr-ui && npx playwright test e2e/task-list-desktop.pw.ts e2e/task-list-split.pw.ts e2e/task-details-responsive.pw.tspropr-dev commentedon Oct 3, 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-52719/claude-opus-5-5-turn-tasks-into-a-master--20261003-2256-hk0mainissue-2719-20261003-2256-claude-opus-5-5-hk0🔍 Track Task Execution