Skip to content

Self-hosted AI workspace.

Python

Fix task status toggle hit target

pewdiepie-archdaemondf5d22f191e1
diff --git a/static/js/tasks.js b/static/js/tasks.js
index d70f5597a..df0f62e4a 100644
--- a/static/js/tasks.js
+++ b/static/js/tasks.js
@@ -754,9 +754,9 @@ function _renderList() {
const titleRow = document.createElement('div');
titleRow.style.cssText = 'display:flex;align-items:center;gap:6px;cursor:pointer;';
const statusBadge = task.status === 'paused'
- ? `<span class="task-status-badge task-state-badge task-paused-badge" data-task-status-action="resume" title="Paused - click to resume" style="position:relative;top:4px;"><svg width="10" height="10" viewBox="0 0 24 24" fill="currentColor"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg><span class="task-state-label">paused</span></span>`
+ ? `<button type="button" class="task-status-badge task-state-badge task-paused-badge" data-task-status-action="resume" title="Paused - click to resume" style="position:relative;top:4px;"><svg width="10" height="10" viewBox="0 0 24 24" fill="currentColor"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg><span class="task-state-label">paused</span></button>`
: task.status === 'active'
- ? `<span class="task-status-badge task-state-badge task-active-badge" data-task-status-action="pause" title="Active - click to pause" style="position:relative;top:4px;"><svg width="10" height="10" viewBox="0 0 24 24" fill="currentColor"><polygon points="7 4 19 12 7 20 7 4"/></svg><span class="task-state-label">active</span></span>`
+ ? `<button type="button" class="task-status-badge task-state-badge task-active-badge" data-task-status-action="pause" title="Active - click to pause" style="position:relative;top:4px;"><svg width="10" height="10" viewBox="0 0 24 24" fill="currentColor"><polygon points="7 4 19 12 7 20 7 4"/></svg><span class="task-state-label">active</span></button>`
: '';
const builtinBadge = task.is_builtin
? `<span class="task-builtin-badge${task.is_modified ? ' modified' : ''}" title="${task.is_modified ? 'Built-in task — edited from its default' : 'Built-in task'}">built-in${task.is_modified ? ' · edited' : ''}</span>`
diff --git a/static/style.css b/static/style.css
index 20c5a9048..e3d137432 100644
--- a/static/style.css
+++ b/static/style.css
@@ -11050,9 +11050,12 @@ textarea.memory-add-input {
filter: saturate(0.9);
}
.task-status-badge {
+ appearance: none;
+ -webkit-appearance: none;
display: inline-flex;
align-items: center;
gap: 3px;
+ margin: 0;
font-size: 9px;
font-weight: 600;
text-transform: uppercase;
@@ -11067,6 +11070,10 @@ textarea.memory-add-input {
transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, filter 0.12s ease;
user-select: none;
}
+.task-state-badge > svg,
+.task-state-badge > .task-state-label {
+ pointer-events: none;
+}
.task-state-label-mobile {
display: none;
}