Agent Zero AI framework
task detail ux/quality of life
Alessandrod3a02482766a
diff --git a/webui/components/settings/scheduler/scheduler-store.js b/webui/components/settings/scheduler/scheduler-store.jsindex a65395e2d..e2b0afe54 100644--- a/webui/components/settings/scheduler/scheduler-store.js+++ b/webui/components/settings/scheduler/scheduler-store.js@@ -915,6 +915,19 @@ const schedulerStoreModel = {window.closeModal();},+ editFromDetail() {+ const taskId = this.selectedTaskForDetail?.uuid;+ if (!taskId) return;+ this.closeTaskDetail();+ this.startEditTask(taskId);+ },++ async deleteFromDetail() {+ const taskId = this.selectedTaskForDetail?.uuid;+ if (!taskId) return;+ await this.deleteTask(taskId);+ },+async startCreateTask() {this.isCreating = true;this.isEditing = false;diff --git a/webui/components/settings/scheduler/scheduler-task-detail.html b/webui/components/settings/scheduler/scheduler-task-detail.htmlindex 85dae0187..050a2ac58 100644--- a/webui/components/settings/scheduler/scheduler-task-detail.html+++ b/webui/components/settings/scheduler/scheduler-task-detail.html@@ -11,12 +11,31 @@<div class="scheduler-detail-view"x-show="$store.schedulerStore.selectedTaskForDetail"><div class="scheduler-detail-header">- <h2 class="scheduler-detail-title"- x-text="$store.schedulerStore.selectedTaskForDetail ? $store.schedulerStore.selectedTaskForDetail.name : ''"></h2>- <div class="scheduler-status-badge"- :class="$store.schedulerStore.selectedTaskForDetail ? $store.schedulerStore.getStateBadgeClass($store.schedulerStore.selectedTaskForDetail.state) : ''"- x-text="$store.schedulerStore.selectedTaskForDetail ? $store.schedulerStore.selectedTaskForDetail.state : ''"></div>- <button class="btn btn-cancel" @click="$store.schedulerStore.closeTaskDetail()">Close</button>+ <div class="scheduler-detail-header-left">+ <h2 class="scheduler-detail-title"+ x-text="$store.schedulerStore.selectedTaskForDetail ? $store.schedulerStore.selectedTaskForDetail.name : ''"></h2>+ <div class="scheduler-status-badge"+ :class="$store.schedulerStore.selectedTaskForDetail ? $store.schedulerStore.getStateBadgeClass($store.schedulerStore.selectedTaskForDetail.state) : ''"+ x-text="$store.schedulerStore.selectedTaskForDetail ? $store.schedulerStore.selectedTaskForDetail.state : ''"></div>+ </div>+ <div class="scheduler-detail-header-actions">+ <button class="btn btn-action-header"+ @click="$store.schedulerStore.runTask($store.schedulerStore.selectedTaskForDetail.uuid)"+ title="Run Task">+ <span class="material-symbols-outlined">play_arrow</span>+ </button>+ <button class="btn btn-action-header"+ @click="$store.schedulerStore.editFromDetail()"+ title="Edit Task">+ <span class="material-symbols-outlined">edit</span>+ </button>+ <button class="btn btn-action-header danger"+ @click="$store.schedulerStore.deleteFromDetail()"+ title="Delete Task">+ <span class="material-symbols-outlined">delete</span>+ </button>+ <button class="btn btn-cancel" @click="$store.schedulerStore.closeTaskDetail()">Close</button>+ </div></div><div class="scheduler-detail-content">diff --git a/webui/components/settings/scheduler/scheduler-task-list.html b/webui/components/settings/scheduler/scheduler-task-list.htmlindex 0d60e45a9..f140be8fc 100644--- a/webui/components/settings/scheduler/scheduler-task-list.html+++ b/webui/components/settings/scheduler/scheduler-task-list.html@@ -53,57 +53,46 @@x-effect="$el.style.display = (!$store.schedulerStore.isLoading && $store.schedulerStore.filteredTasks.length > 0) ? '' : 'none'"><thead><tr>- <th @click="$store.schedulerStore.changeSort('name')">+ <th class="col-name" @click="$store.schedulerStore.changeSort('name')">Name<span class="scheduler-sort-indicator"x-show="$store.schedulerStore.sortField === 'name'":class="{'scheduler-sort-desc': $store.schedulerStore.sortDirection === 'desc'}">↑</span></th>- <th @click="$store.schedulerStore.changeSort('state')">+ <th class="col-state" @click="$store.schedulerStore.changeSort('state')">State<span class="scheduler-sort-indicator"x-show="$store.schedulerStore.sortField === 'state'":class="{'scheduler-sort-desc': $store.schedulerStore.sortDirection === 'desc'}">↑</span></th>- <th>Type</th>- <th>Project</th>- <th>Schedule</th>- <th @click="$store.schedulerStore.changeSort('last_run')">+ <th class="col-project">Project</th>+ <th class="col-lastrun" @click="$store.schedulerStore.changeSort('last_run')">Last Run<span class="scheduler-sort-indicator"x-show="$store.schedulerStore.sortField === 'last_run'":class="{'scheduler-sort-desc': $store.schedulerStore.sortDirection === 'desc'}">↑</span></th>- <th>Actions</th>+ <th class="col-actions">Actions</th></tr></thead><tbody><template x-for="task in $store.schedulerStore.filteredTasks" :key="task.uuid"><tr @click="$store.schedulerStore.showTaskDetail(task.uuid)">- <td>+ <td class="col-name"><span x-text="task.name"></span></td>- <td>+ <td class="col-state"><span class="scheduler-status-badge":class="$store.schedulerStore.getStateBadgeClass(task.state)"x-text="task.state"></span></td>- <td x-text="task.type"></td>- <td>+ <td class="col-project"><span class="project-color-ball":style="$store.schedulerStore.extractTaskProject(task)?.color ? { backgroundColor: $store.schedulerStore.extractTaskProject(task).color } : { border: '1px solid var(--color-border)' }"></span><span x-text="$store.schedulerStore.formatTaskProject(task)"></span></td>- <td>- <span x-show="task.type === 'scheduled'"- x-text="$store.schedulerStore.formatSchedule(task)"></span>- <span x-show="task.type === 'adhoc'"- class="scheduler-no-schedule">—</span>- <span x-show="task.type === 'planned'"- x-html="$store.schedulerStore.formatPlan(task).replace(/\n/g, '<br>')"></span>- </td>- <td x-text="$store.schedulerStore.formatDate(task.last_run)"></td>- <td @click.stop>+ <td class="col-lastrun" x-text="$store.schedulerStore.formatDate(task.last_run)"></td>+ <td class="col-actions" @click.stop><div class="scheduler-task-actions"><button class="scheduler-task-action"@click="$store.schedulerStore.runTask(task.uuid)" title="Run Task">diff --git a/webui/css/modals.css b/webui/css/modals.cssindex 0d7aa9c1b..08effeb31 100644--- a/webui/css/modals.css+++ b/webui/css/modals.css@@ -124,7 +124,6 @@ some classes like modal-header are shared between the old and the new system */.modal-content {padding: 0.5rem 1.5rem 0 1.5rem;overflow-y: auto;- overflow-x: hidden;height: calc(90vh);flex-grow: 1;background-clip: border-box;diff --git a/webui/css/settings.css b/webui/css/settings.cssindex 871b36401..32b97e22a 100644--- a/webui/css/settings.css+++ b/webui/css/settings.css@@ -382,7 +382,7 @@ nav ul li a img {border-spacing: 0;white-space: nowrap;padding-bottom: 8px;- table-layout: auto;+ table-layout: fixed;}.scheduler-task-list th,@@ -393,41 +393,51 @@ nav ul li a img {border-bottom: 1px solid var(--color-border);}-/* Ensure columns have proper min-width */-.scheduler-task-list th:nth-child(1),-.scheduler-task-list td:nth-child(1) {- min-width: 150px;- max-width: 200px;+/* Column styles */+.scheduler-task-list .col-name {+ width: 30%;overflow: hidden;text-overflow: ellipsis;}-.scheduler-task-list th:nth-child(2),-.scheduler-task-list td:nth-child(2) {- min-width: 100px;+.scheduler-task-list .col-state {+ width: 12%;}-.scheduler-task-list th:nth-child(3),-.scheduler-task-list td:nth-child(3) {- min-width: 100px;+.scheduler-task-list .col-project {+ width: 20%;}-.scheduler-task-list th:nth-child(4),-.scheduler-task-list td:nth-child(4) {- min-width: 150px;+.scheduler-task-list .col-lastrun {+ width: 20%;}-.scheduler-task-list th:nth-child(5),-.scheduler-task-list td:nth-child(5) {- min-width: 180px;+.scheduler-task-list .col-actions {+ width: 18%;+ text-align: right;}-.scheduler-task-list th:nth-child(6),-.scheduler-task-list td:nth-child(6) {- min-width: 160px;- white-space: nowrap;+/* Mobile: hide less important columns */+@media (max-width: 768px) {+ .scheduler-task-list .col-project,+ .scheduler-task-list .col-lastrun {+ display: none;+ }++ .scheduler-task-list .col-name {+ width: 50%;+ }++ .scheduler-task-list .col-state {+ width: 25%;+ }++ .scheduler-task-list .col-actions {+ width: 25%;+ }}+/* Task actions container */.scheduler-task-actions {display: flex;@@ -551,17 +561,6 @@ nav ul li a img {background-color: var(--color-secondary);}-/* Adjust media queries to handle small screens */-@media (max-width: 768px) {- .scheduler-task-list {- min-width: 700px;- }-- .scheduler-detail-view {- min-width: 650px;- }-}-/* Scrollbar styling for better visibility */.section::-webkit-scrollbar {height: 10px; /* Taller scrollbar for better usability */@@ -579,14 +578,6 @@ nav ul li a img {/* Mobile styles for scheduler sections */@media (max-width: 1280px) {- .scheduler-container {- min-width: max-content; /* Allow expansion based on content */- }-- .scheduler-task-list {- min-width: max-content; /* Expand to fit content if needed */- }-/* Scrollbar styling for mobile view */.section::-webkit-scrollbar {height: 10px;@@ -634,15 +625,53 @@ nav ul li a img {/* Scheduler detail header styling */.scheduler-detail-header {display: flex;- justify-content: flex-start;+ justify-content: space-between;align-items: center;flex-wrap: wrap;gap: 10px;width: 100%;}-.scheduler-detail-header .scheduler-detail-title {- margin-right: auto;+.scheduler-detail-header-left {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+}++.scheduler-detail-header-left .scheduler-detail-title {+ margin: 0;+}++.scheduler-detail-header-actions {+ display: flex;+ align-items: center;+ gap: 0.5rem;+}++.scheduler-detail-header .btn-action-header {+ padding: 0.4rem 0.6rem;+ display: flex;+ align-items: center;+ background: var(--color-bg-secondary);+ border: 1px solid var(--color-border);+ color: var(--color-text);+ border-radius: var(--border-radius);+ cursor: pointer;+}++.scheduler-detail-header .btn-action-header:hover {+ border-color: var(--color-primary);+ color: var(--color-primary);+}++.scheduler-detail-header .btn-action-header.danger:hover {+ border-color: var(--color-accent);+ color: var(--color-accent);+}++.scheduler-detail-header .btn-action-header .material-symbols-outlined {+ font-size: 18px;}/* Responsive adjustments for headers */@@ -658,14 +687,14 @@ nav ul li a img {}.scheduler-detail-header {- flex-direction: row; /* Keep in row even on mobile */- align-items: center;- flex-wrap: wrap;- gap: 0.5rem;+ flex-direction: column;+ align-items: flex-start;+ gap: 0.75rem;}- .scheduler-detail-header .btn {- margin-left: auto; /* Push to right edge */+ .scheduler-detail-header-actions {+ width: 100%;+ justify-content: flex-end;}.scheduler-form-field {diff --git a/webui/index.css b/webui/index.cssindex 341954dce..68496ef7c 100644--- a/webui/index.css+++ b/webui/index.css@@ -1210,7 +1210,6 @@ nav ul li a img {border-collapse: collapse;margin: 1rem 0;font-size: 0.9rem;- overflow-x: auto;table-layout: fixed;}@@ -1225,37 +1224,6 @@ nav ul li a img {white-space: nowrap;}-.scheduler-task-list th:nth-child(1), /* Name */-.scheduler-task-list td:nth-child(1) {- width: 25%;-}--.scheduler-task-list th:nth-child(2), /* State */-.scheduler-task-list td:nth-child(2) {- width: 10%;-}--.scheduler-task-list th:nth-child(3), /* Type */-.scheduler-task-list td:nth-child(3) {- width: 10%;-}--.scheduler-task-list th:nth-child(4), /* Schedule */-.scheduler-task-list td:nth-child(4) {- width: 20%;-}--.scheduler-task-list th:nth-child(5), /* Last Run */-.scheduler-task-list td:nth-child(5) {- width: 20%;-}--.scheduler-task-list th:nth-child(6), /* Actions */-.scheduler-task-list td:nth-child(6) {- width: 15%;- text-align: right;-}-.scheduler-task-list th {background-color: var(--color-bg-secondary);font-weight: 500;