Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frontend/src/pages/TaskBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

/** Effective tier: worst of own status and any descendant */
export function getTaskTier(task: Task): AttendTier {

Check warning on line 26 in frontend/src/pages/TaskBoard.tsx

View workflow job for this annotation

GitHub Actions / ci

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
let worst = ownTier(task.status);
for (const child of task.children) {
const childTier = getTaskTier(child);
Expand All @@ -49,7 +49,7 @@
* getTaskTier already considers descendant status, so a root with a blocked
* child will bubble up even if the root itself is pending.
*/
export function sortByAttention(tasks: Task[]): Task[] {

Check warning on line 52 in frontend/src/pages/TaskBoard.tsx

View workflow job for this annotation

GitHub Actions / ci

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
return [...tasks].sort((a, b) => {
const tierDiff = getTaskTier(a) - getTaskTier(b);
if (tierDiff !== 0) return tierDiff;
Expand All @@ -74,6 +74,7 @@
pauseLoop,
resumeLoop,
stopLoop,
setSpawnEnabled,
approveTask,
rejectTask,
approveSpec,
Expand Down Expand Up @@ -104,10 +105,18 @@
const goals = tasks.filter((t) => !t.parentId);

const t1Count = countT1Recursive(tasks);
const { spawnEnabled } = loopStatus;

return (
<div className="task-board-page">
<PageHeader title="Tasks" badge={t1Count > 0 ? t1Count : tasks.length || undefined}>
<button
className={`task-board-add-btn ${spawnEnabled ? 'cc-spawn-enabled' : 'cc-spawn-disabled'}`}
onClick={() => setSpawnEnabled(!spawnEnabled)}
title={spawnEnabled ? 'Disable session spawning' : 'Enable session spawning'}
>
{spawnEnabled ? '\u26A1' : '\u26D4'}
</button>
<button
className={`task-board-sort-btn${showAll ? '' : ' task-board-sort-btn--active'}`}
onClick={() => setShowAll(!showAll)}
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,9 @@ textarea:focus {
background: var(--surface);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
position: relative;
z-index: 20;
box-shadow: 0 4px 0 0 var(--surface);
transition:
max-height 0.2s,
padding 0.2s,
Expand Down Expand Up @@ -1674,7 +1677,7 @@ textarea:focus {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: var(--space-4) var(--space-3);
padding: 0 var(--space-3) var(--space-4);
display: flex;
flex-direction: column;
gap: var(--space-3);
Expand Down Expand Up @@ -2435,8 +2438,10 @@ textarea:focus {
position: sticky;
top: 0;
z-index: 10;
margin: -1px calc(-1 * var(--space-3)) 0;
padding: 0 var(--space-3);
border-bottom: 1px solid var(--border);
background: var(--bg-primary);
background: var(--surface);
}

.session-banner-header {
Expand Down
Loading