feat: Improve task UI layout - narrower task list, maximize Progress Log, fix Terminal at bottom, add auto-scroll

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-01-02 13:23:12 -03:00
parent b51c542afa
commit ea9bd091c3
3 changed files with 117 additions and 25 deletions

View file

@ -363,7 +363,7 @@
.main-content { .main-content {
display: grid; display: grid;
grid-template-columns: 400px 1fr; grid-template-columns: 320px 1fr;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
} }
@ -376,7 +376,28 @@
background: var(--sentient-bg-secondary); background: var(--sentient-bg-secondary);
border-right: 1px solid var(--sentient-border); border-right: 1px solid var(--sentient-border);
overflow-y: auto; overflow-y: auto;
padding: 16px; overflow-x: hidden;
padding: 12px;
max-height: 100%;
scrollbar-width: thin;
scrollbar-color: var(--sentient-border) transparent;
}
.intent-list-panel::-webkit-scrollbar {
width: 6px;
}
.intent-list-panel::-webkit-scrollbar-track {
background: transparent;
}
.intent-list-panel::-webkit-scrollbar-thumb {
background: var(--sentient-border);
border-radius: 3px;
}
.intent-list-panel::-webkit-scrollbar-thumb:hover {
background: var(--sentient-border-light);
} }
.intent-list { .intent-list {
@ -1620,7 +1641,7 @@
@media (max-width: 1200px) { @media (max-width: 1200px) {
.main-content { .main-content {
grid-template-columns: 350px 1fr; grid-template-columns: 280px 1fr;
} }
} }

View file

@ -13,6 +13,24 @@
overflow: hidden; overflow: hidden;
} }
/* Scrollbar styling for detail panel */
.task-detail-panel::-webkit-scrollbar {
width: 6px;
}
.task-detail-panel::-webkit-scrollbar-track {
background: transparent;
}
.task-detail-panel::-webkit-scrollbar-thumb {
background: var(--border, #2a2a2a);
border-radius: 3px;
}
.task-detail-panel::-webkit-scrollbar-thumb:hover {
background: var(--border-light, #3a3a3a);
}
/* Main Container */ /* Main Container */
.task-detail-rich { .task-detail-rich {
display: flex; display: flex;
@ -33,10 +51,11 @@
overflow-x: hidden; overflow-x: hidden;
} }
/* Header */ /* Header - compact */
.taskmd-header { .taskmd-header {
padding: 20px 24px; padding: 12px 20px;
border-bottom: 1px solid var(--border, #1a1a1a); border-bottom: 1px solid var(--border, #1a1a1a);
flex-shrink: 0;
} }
.taskmd-url { .taskmd-url {
@ -58,10 +77,10 @@
} }
.taskmd-title { .taskmd-title {
font-size: 24px; font-size: 18px;
font-weight: 500; font-weight: 500;
color: var(--text, #fff); color: var(--text, #fff);
margin: 0 0 12px 0; margin: 0 0 8px 0;
} }
.taskmd-status-badge { .taskmd-status-badge {
@ -105,38 +124,41 @@
flex-shrink: 0; flex-shrink: 0;
} }
/* Progress log section - scrollable */ /* Progress log section - takes maximum space, scrollable */
.taskmd-section-progress { .taskmd-section-progress {
flex: 0 1 auto; flex: 1 1 auto;
min-height: 100px; min-height: 200px;
max-height: 40%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
} }
/* Terminal section - takes remaining space */ /* Terminal section - fixed at bottom, smaller */
.taskmd-section-terminal { .taskmd-section-terminal {
flex: 1 1 auto; flex: 0 0 auto;
min-height: 150px; height: 140px;
min-height: 120px;
max-height: 180px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
border-top: 1px solid var(--border, #1a1a1a);
} }
.taskmd-section-header { .taskmd-section-header {
padding: 16px 24px; padding: 10px 20px;
font-size: 11px; font-size: 10px;
font-weight: 600; font-weight: 600;
letter-spacing: 1.5px; letter-spacing: 1.5px;
color: var(--text-tertiary, #666); color: var(--text-tertiary, #666);
text-transform: uppercase; text-transform: uppercase;
background: var(--bg-secondary, #0d0d0d); background: var(--bg-secondary, #0d0d0d);
flex-shrink: 0;
} }
/* STATUS Section */ /* STATUS Section - more compact */
.taskmd-status-content { .taskmd-status-content {
padding: 16px 24px; padding: 10px 20px;
background: var(--surface, #111); background: var(--surface, #111);
} }
@ -230,14 +252,33 @@
margin-left: 12px; margin-left: 12px;
} }
/* PROGRESS LOG Section */ /* PROGRESS LOG Section - maximized with auto-scroll */
.taskmd-progress-content { .taskmd-progress-content {
background: var(--bg, #0a0a0a); background: var(--bg, #0a0a0a);
flex: 1 1 auto; flex: 1 1 auto;
min-height: 0; min-height: 0;
max-height: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
scroll-behavior: smooth;
scrollbar-width: thin;
scrollbar-color: var(--border, #2a2a2a) transparent;
}
.taskmd-progress-content::-webkit-scrollbar {
width: 6px;
}
.taskmd-progress-content::-webkit-scrollbar-track {
background: transparent;
}
.taskmd-progress-content::-webkit-scrollbar-thumb {
background: var(--border, #2a2a2a);
border-radius: 3px;
}
.taskmd-progress-content::-webkit-scrollbar-thumb:hover {
background: var(--border-light, #3a3a3a);
} }
.taskmd-tree { .taskmd-tree {
@ -543,10 +584,12 @@
/* TERMINAL Section */ /* TERMINAL Section */
.taskmd-terminal { .taskmd-terminal {
flex: 1 1 auto; flex: 0 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 140px;
min-height: 120px; min-height: 120px;
max-height: 180px;
overflow: hidden; overflow: hidden;
} }
@ -554,9 +597,10 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 14px 24px; padding: 8px 16px;
background: var(--bg-secondary, #0d0d0d); background: var(--bg-secondary, #0d0d0d);
border-bottom: 1px solid var(--border, #1a1a1a); border-bottom: 1px solid var(--border, #1a1a1a);
flex-shrink: 0;
} }
.taskmd-terminal-title { .taskmd-terminal-title {
@ -602,15 +646,17 @@
.taskmd-terminal-output { .taskmd-terminal-output {
flex: 1 1 auto; flex: 1 1 auto;
padding: 16px 24px; padding: 8px 16px;
background: var(--bg, #0a0a0a); background: var(--bg, #0a0a0a);
font-family: "JetBrains Mono", "Fira Code", monospace; font-family: "JetBrains Mono", "Fira Code", monospace;
font-size: 13px; font-size: 12px;
line-height: 1.7; line-height: 1.5;
color: var(--text-secondary, #888); color: var(--text-secondary, #888);
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
min-height: 0; min-height: 0;
scrollbar-width: thin;
scrollbar-color: var(--border, #2a2a2a) transparent;
} }
/* Markdown content in terminal */ /* Markdown content in terminal */

View file

@ -839,11 +839,15 @@ function renderManifestProgress(
itemCount, itemCount,
"items", "items",
); );
// Auto-scroll to running item
scrollToRunningItem(progressLog);
} else { } else {
// Incremental update - only update what changed (no flicker) // Incremental update - only update what changed (no flicker)
console.log("[Manifest] Updating tree in place"); console.log("[Manifest] Updating tree in place");
updateProgressTreeInPlace(tree, manifest, totalSteps); updateProgressTreeInPlace(tree, manifest, totalSteps);
console.log("[Manifest] Tree updated successfully"); console.log("[Manifest] Tree updated successfully");
// Auto-scroll to running item
scrollToRunningItem(progressLog);
} }
} catch (treeError) { } catch (treeError) {
console.error( console.error(
@ -858,6 +862,27 @@ function renderManifestProgress(
updateTerminalStats(taskId, manifest); updateTerminalStats(taskId, manifest);
} }
// Auto-scroll progress log to show the currently running item
function scrollToRunningItem(progressLog) {
if (!progressLog) return;
// Find the running item (highest priority) or running section
const runningItem = progressLog.querySelector(".tree-item.running");
const runningSection = progressLog.querySelector(".tree-section.running");
const runningChild = progressLog.querySelector(".tree-child.running");
const targetElement = runningItem || runningChild || runningSection;
if (targetElement) {
// Scroll the target into view within the progress log container
targetElement.scrollIntoView({
behavior: "smooth",
block: "center",
inline: "nearest",
});
}
}
// Update STATUS section from task_progress messages // Update STATUS section from task_progress messages
function updateStatusFromProgress(message, step) { function updateStatusFromProgress(message, step) {
const statusContent = document.querySelector(".taskmd-status-content"); const statusContent = document.querySelector(".taskmd-status-content");