clementine-agent 1.18.98 → 1.18.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24867,11 +24867,30 @@ function renderRunListBody(allRuns) {
24867
24867
  html += '<div class="empty-state" style="padding:36px 24px;text-align:center;color:var(--text-muted)"><div style="font-size:14px;margin-bottom:6px">No runs match the current filter.</div><div style="font-size:12px">Try widening the time window or clearing the task-name filter.</div></div>';
24868
24868
  return html;
24869
24869
  }
24870
+ // PRD §5.3 Phase 5.3c / 1.18.99: column sort. Apply the current
24871
+ // sortBy/sortDir AFTER filtering so users see the natural ordering of
24872
+ // their narrowed dataset. Stable: missing values sort to the end.
24873
+ filtered.sort(_runListComparator(_runListState.sortBy, _runListState.sortDir));
24870
24874
  // Table — same shape as the Recent History list on the Tasks page,
24871
- // but sortable and with a Trigger + Cost column.
24875
+ // but sortable and with a Trigger + Cost column. Helper renders an
24876
+ // active-state arrow when a column is the current sortBy target.
24877
+ function sortHdr(col, label, title) {
24878
+ var active = _runListState.sortBy === col;
24879
+ var arrow = active ? (_runListState.sortDir === 'asc' ? ' ↑' : ' ↓') : '';
24880
+ var titleAttr = title ? ' title="' + esc(title) + '"' : '';
24881
+ var color = active ? 'var(--text-primary)' : 'var(--text-muted)';
24882
+ return '<div' + titleAttr + ' onclick="setRunListSort(\\x27' + jsStr(col) + '\\x27)" style="cursor:pointer;color:' + color + ';user-select:none">' + esc(label) + esc(arrow) + '</div>';
24883
+ }
24872
24884
  html += '<div style="background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius)">';
24873
24885
  html += '<div style="display:grid;grid-template-columns:24px 24px minmax(180px,1.2fr) 80px minmax(160px,1fr) 70px 70px auto;gap:10px;padding:8px 14px;border-bottom:1px solid var(--border);font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.04em;font-weight:500">'
24874
- + '<div></div><div title="Goal verdict">Goal</div><div>Task</div><div>Trigger</div><div>Started</div><div>Duration</div><div title="Total cost in USD">Cost</div><div></div>'
24886
+ + '<div></div>'
24887
+ + '<div title="Goal verdict">Goal</div>'
24888
+ + sortHdr('jobName', 'Task', 'Click to sort by name')
24889
+ + '<div>Trigger</div>'
24890
+ + sortHdr('startedAt', 'Started', 'Click to sort by start time')
24891
+ + sortHdr('durationMs', 'Duration', 'Click to sort by duration')
24892
+ + sortHdr('totalCostUsd', 'Cost', 'Click to sort by cost')
24893
+ + '<div></div>'
24875
24894
  + '</div>';
24876
24895
  for (var i = 0; i < filtered.length; i++) {
24877
24896
  var entry = filtered[i] || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.18.98",
3
+ "version": "1.18.99",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",