|
|
@@ -242,52 +242,14 @@
|
|
|
<span stm-if="task.parent_task_id > 0"> · subtask of
|
|
|
<a stm-attribute.href="'/tasks/' + task.parent_task_id" stm-text="'#' + task.parent_task_id">#parent</a></span></p>
|
|
|
|
|
|
- <!-- Status block pinned to the very top (plan 10): the
|
|
|
- current state is the first thing on the page. The
|
|
|
- lifecycle buttons ride the card (plan 11): Enqueue and
|
|
|
- Delete in draft (delete guarded by dependents), Cancel
|
|
|
- in non-draft non-terminal; completion is bot-only. -->
|
|
|
- <section class="card status-head">
|
|
|
- <h3>Status</h3>
|
|
|
- <p><span stm-attribute.class="'badge badge-' + task.status" stm-text="task.display">status</span>
|
|
|
- · priority <strong stm-text="task.priority">5</strong></p>
|
|
|
- <p class="muted">Created <span stm-text="task.created_display">when</span></p>
|
|
|
- <p class="muted" stm-if="task.started_display.length > 0">Started <span stm-text="task.started_display">when</span></p>
|
|
|
- <p class="muted" stm-if="task.completed_display.length > 0">Completed <span stm-text="task.completed_display">when</span></p>
|
|
|
- <p stm-if="task.task_branch.length > 0">Branch: <strong stm-text="task.task_branch">branch</strong>
|
|
|
- <span class="muted" stm-if="task.branch_from.length > 0"> from <span stm-text="task.branch_from">base</span></span></p>
|
|
|
- <p stm-if="task.working_branch.length > 0" class="muted">Working branch: <span stm-text="task.working_branch">branch</span></p>
|
|
|
- <p stm-if="task.status == 'suspended' && task.subtask_draft > 0" class="muted">
|
|
|
- Parked — <span stm-text="task.subtask_draft">0</span> subtask(s) still in draft:
|
|
|
- enqueue them so this task's work can finish.</p>
|
|
|
- <p stm-if="task.status == 'suspended' && task.subtask_draft == 0" class="muted">Parked — waiting on
|
|
|
- subtasks (<span stm-text="task.subtask_open">0</span> open). The task
|
|
|
- resumes with a status report whenever one finishes.</p>
|
|
|
- <form class="inline">
|
|
|
- <input type="hidden" name="task_id" stm-attribute.value="task.id">
|
|
|
- <button type="button" stm-if="task.draft" class="primary"
|
|
|
- stm-action="task.enqueue">Enqueue task</button>
|
|
|
- <button type="button" stm-if="task.draft"
|
|
|
- stm-action="task.delete"
|
|
|
- stm-confirm="Delete this draft task? This cannot be undone.">Delete</button>
|
|
|
- <button type="button" stm-if="task.status == 'failed'" class="primary"
|
|
|
- stm-action="task.retry">Retry task</button>
|
|
|
- <button type="button" stm-if="task.resume_available"
|
|
|
- stm-action="task.resume"
|
|
|
- stm-confirm="Requeue this task? The daemon restores its workspace context on the next dispatch.">Requeue to resume</button>
|
|
|
- <button type="button" stm-if="!task.draft && !task.terminal"
|
|
|
- stm-action="task.cancel" stm-confirm="Cancel this task?">Cancel task</button>
|
|
|
- </form>
|
|
|
- </section>
|
|
|
-
|
|
|
- <!-- The agent's progress feed sits directly below the status
|
|
|
- head: newest first (the latest line up top, the history
|
|
|
- behind the fold). -->
|
|
|
+ <!-- Progress feed ABOVE the status card (plan 11 task D):
|
|
|
+ the agent's newest line leads the page, its history
|
|
|
+ behind the "Show history" expander. -->
|
|
|
<h3>Progress</h3>
|
|
|
<div stm-if="task.progress.length > 0">
|
|
|
<p class="progress-latest" stm-text="task.progress[0].summary">latest</p>
|
|
|
<p class="muted" stm-text="'reported ' + task.progress[0].when_display">when</p>
|
|
|
- <details stm-if="task.progress.length > 1">
|
|
|
+ <details class="history-expander" stm-if="task.progress.length > 1">
|
|
|
<summary>Show history (<span stm-text="task.progress.length">0</span> updates)</summary>
|
|
|
<ul class="progress-history">
|
|
|
<li stm-for-item-in="task.progress">
|
|
|
@@ -300,7 +262,47 @@
|
|
|
<p stm-if="task.progress.length == 0" class="muted">No progress reports yet — the agent reports via
|
|
|
<code>saddle progress-update</code>.</p>
|
|
|
|
|
|
- <div class="cards">
|
|
|
+ <!-- Status + description side by side in a 50/50 grid (plan
|
|
|
+ 11 task D), collapsing to stacked
|
|
|
+ status-then-description on small screens. The
|
|
|
+ lifecycle buttons ride the status card (plan 11): new
|
|
|
+ tasks are drafts — Enqueue and Delete in draft (delete
|
|
|
+ guarded by dependents), Cancel in non-draft
|
|
|
+ non-terminal; completion is bot-only. -->
|
|
|
+ <div class="grid-2">
|
|
|
+ <section class="card status-head">
|
|
|
+ <h3>Status</h3>
|
|
|
+ <p><span stm-attribute.class="'badge badge-' + task.status" stm-text="task.display">status</span>
|
|
|
+ · priority <strong stm-text="task.priority">5</strong></p>
|
|
|
+ <p class="muted">Created <span stm-text="task.created_display">when</span></p>
|
|
|
+ <p class="muted" stm-if="task.started_display.length > 0">Started <span stm-text="task.started_display">when</span></p>
|
|
|
+ <p class="muted" stm-if="task.completed_display.length > 0">Completed <span stm-text="task.completed_display">when</span></p>
|
|
|
+ <p stm-if="task.task_branch.length > 0">Branch: <strong stm-text="task.task_branch">branch</strong>
|
|
|
+ <span class="muted" stm-if="task.branch_from.length > 0"> from <span stm-text="task.branch_from">base</span></span></p>
|
|
|
+ <p stm-if="task.working_branch.length > 0" class="muted">Working branch: <span stm-text="task.working_branch">branch</span></p>
|
|
|
+ <p stm-if="task.status == 'suspended' && task.subtask_draft > 0" class="muted">
|
|
|
+ Parked — <span stm-text="task.subtask_draft">0</span> subtask(s) still in draft:
|
|
|
+ enqueue them so this task's work can finish.</p>
|
|
|
+ <p stm-if="task.status == 'suspended' && task.subtask_draft == 0" class="muted">Parked — waiting on
|
|
|
+ subtasks (<span stm-text="task.subtask_open">0</span> open). The task
|
|
|
+ resumes with a status report whenever one finishes.</p>
|
|
|
+ <form class="inline">
|
|
|
+ <input type="hidden" name="task_id" stm-attribute.value="task.id">
|
|
|
+ <button type="button" stm-if="task.draft" class="primary"
|
|
|
+ stm-action="task.enqueue">Enqueue task</button>
|
|
|
+ <button type="button" stm-if="task.draft"
|
|
|
+ stm-action="task.delete"
|
|
|
+ stm-confirm="Delete this draft task? This cannot be undone.">Delete</button>
|
|
|
+ <button type="button" stm-if="task.status == 'failed'" class="primary"
|
|
|
+ stm-action="task.retry">Retry task</button>
|
|
|
+ <button type="button" stm-if="task.resume_available"
|
|
|
+ stm-action="task.resume"
|
|
|
+ stm-confirm="Requeue this task? The daemon restores its workspace context on the next dispatch.">Requeue to resume</button>
|
|
|
+ <button type="button" stm-if="!task.draft && !task.terminal"
|
|
|
+ stm-action="task.cancel" stm-confirm="Cancel this task?">Cancel task</button>
|
|
|
+ </form>
|
|
|
+ </section>
|
|
|
+
|
|
|
<section class="card">
|
|
|
<h3>Description</h3>
|
|
|
<div stm-if="task.description.length > 0" class="md" stm-markdown="task.description">description</div>
|
|
|
@@ -309,12 +311,12 @@
|
|
|
</section>
|
|
|
</div>
|
|
|
|
|
|
- <!-- The edit expander (plan 11): draft tasks edit every
|
|
|
- field except status; non-draft non-terminal tasks edit
|
|
|
- priority only; terminal tasks edit nothing. The
|
|
|
- description arrives pre-filled whenever it is
|
|
|
- editable. -->
|
|
|
- <details stm-if="task.editable_all || task.editable_priority">
|
|
|
+ <!-- The edit expander sits UNDER the "Show history" expander
|
|
|
+ (plan 11 task D): draft tasks edit every field except
|
|
|
+ status; non-draft non-terminal tasks edit priority
|
|
|
+ only; terminal tasks edit nothing. The description
|
|
|
+ arrives pre-filled whenever it is editable. -->
|
|
|
+ <details class="edit-expander" stm-if="task.editable_all || task.editable_priority">
|
|
|
<summary><strong>Edit task</strong>
|
|
|
<span class="muted" stm-if="task.editable_all">— every field except status while in draft</span>
|
|
|
<span class="muted" stm-if="!task.editable_all && task.editable_priority">— priority only once work has begun</span></summary>
|
|
|
@@ -357,19 +359,25 @@
|
|
|
</form>
|
|
|
</details>
|
|
|
|
|
|
- <h3>Plan</h3>
|
|
|
- <div stm-if="task.plan.length > 0" class="card md" stm-markdown="task.plan">plan</div>
|
|
|
- <details stm-if="task.plan.length > 0">
|
|
|
- <summary>Edit plan</summary>
|
|
|
- <form stm-action="task.save_plan">
|
|
|
- <input type="hidden" name="task_id" stm-attribute.value="task.id">
|
|
|
- <div class="form-row"><label for="plan-editor">Plan (markdown)</label>
|
|
|
- <textarea id="plan-editor" name="plan" rows="12" stm-attribute.value="task.plan"></textarea></div>
|
|
|
- <button type="submit" class="primary">Save plan</button>
|
|
|
- </form>
|
|
|
+ <!-- Plan detail behind an expander (plan 11 task D): the
|
|
|
+ pending plan review still renders the markdown in its
|
|
|
+ block section below — this expander is the reference
|
|
|
+ copy plus the editor. -->
|
|
|
+ <details class="plan-expander" stm-if="task.plan.length > 0">
|
|
|
+ <summary><strong>Plan</strong></summary>
|
|
|
+ <div class="card md" stm-markdown="task.plan">plan</div>
|
|
|
+ <details>
|
|
|
+ <summary>Edit plan</summary>
|
|
|
+ <form stm-action="task.save_plan">
|
|
|
+ <input type="hidden" name="task_id" stm-attribute.value="task.id">
|
|
|
+ <div class="form-row"><label for="plan-editor">Plan (markdown)</label>
|
|
|
+ <textarea id="plan-editor" name="plan" rows="12" stm-attribute.value="task.plan"></textarea></div>
|
|
|
+ <button type="submit" class="primary">Save plan</button>
|
|
|
+ </form>
|
|
|
+ </details>
|
|
|
</details>
|
|
|
- <details stm-if="task.plan.length == 0">
|
|
|
- <summary>Write a plan</summary>
|
|
|
+ <details class="plan-expander" stm-if="task.plan.length == 0">
|
|
|
+ <summary><strong>Plan</strong> — none yet</summary>
|
|
|
<form stm-action="task.save_plan">
|
|
|
<input type="hidden" name="task_id" stm-attribute.value="task.id">
|
|
|
<div class="form-row"><label for="plan-editor">Plan (markdown)</label>
|
|
|
@@ -378,8 +386,10 @@
|
|
|
</form>
|
|
|
</details>
|
|
|
|
|
|
- <h3>Blocks <span class="muted" stm-if="task.blocks.length > 0">(<span stm-text="task.blocks.length">0</span>)</span></h3>
|
|
|
- <div stm-for-block-in="task.blocks" stm-key="block.id"
|
|
|
+ <!-- Current blocks render in full (plan 11 task D);
|
|
|
+ answered ones fold behind the history expander. -->
|
|
|
+ <h3>Blocks <span class="muted" stm-if="task.open_blocks.length > 0">(<span stm-text="task.open_blocks.length">0</span> open)</span></h3>
|
|
|
+ <div stm-for-block-in="task.open_blocks" stm-key="block.id"
|
|
|
stm-attribute.class="'block-card ' + block.block_type + (block.answered ? ' answered' : '')">
|
|
|
<div stm-if="!block.answered && block.block_type == 'review'" class="review-banner">
|
|
|
<h3>Review requested</h3>
|
|
|
@@ -451,7 +461,24 @@
|
|
|
<button type="submit" class="primary">Reply</button>
|
|
|
</form>
|
|
|
</div>
|
|
|
- <p stm-if="task.blocks.length == 0" class="muted">No blocks — the agent has no open questions.</p>
|
|
|
+ <p stm-if="task.open_blocks.length == 0 && task.answered_blocks.length == 0" class="muted">No blocks — the agent has no open questions.</p>
|
|
|
+
|
|
|
+ <!-- Historical (answered) blocks behind an expander, the
|
|
|
+ current ones in full above (plan 11 task D). -->
|
|
|
+ <details class="blocks-history" stm-if="task.answered_blocks.length > 0">
|
|
|
+ <summary>Answered blocks (<span stm-text="task.answered_blocks.length">0</span>)</summary>
|
|
|
+ <div stm-for-block-in="task.answered_blocks" stm-key="block.id"
|
|
|
+ stm-attribute.class="'block-card answered ' + block.block_type">
|
|
|
+ <p><span stm-attribute.class="'badge badge-' + block.block_type" stm-text="block.block_type">type</span>
|
|
|
+ <span stm-text="block.question">question</span>
|
|
|
+ <span class="muted" stm-text="block.created_display">when</span></p>
|
|
|
+ <div stm-if="block.show_body && block.body.length > 0" class="md rfc-body"
|
|
|
+ stm-markdown="block.body">body</div>
|
|
|
+ <p>Answer: <strong stm-text="block.answer">answer</strong>
|
|
|
+ <span class="muted" stm-text="block.answered_display">when</span>
|
|
|
+ <span class="badge" stm-if="block.answered_by == 'auto'">auto</span></p>
|
|
|
+ </div>
|
|
|
+ </details>
|
|
|
|
|
|
<h3>Comments</h3>
|
|
|
<div stm-for-comment-in="task.comments" stm-attribute.class="'comment' + (comment.from_bot ? ' bot' : '')">
|