@lysyi3m/sidecar 1.9.0 → 1.10.0

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.
@@ -199,8 +199,8 @@ export function sideList(cases, activeCase, collapsed = DEFAULT_COLLAPSED) {
199
199
  }
200
200
  /* ---------------------------------------------------------------- index */
201
201
  /** The index's state filters, by the case state each shows, with the label the sidebar uses. */
202
- const FILTERS = ["open", "closed"];
203
- const FILTER_LABELS = { open: "active", closed: "closed" };
202
+ const FILTERS = ["all", "open", "closed"];
203
+ const FILTER_LABELS = { all: "all", open: "active", closed: "closed" };
204
204
  export function indexPage(cases, query, chrome = { collapsed: false }) {
205
205
  const filter = FILTERS.find((f) => f === query.state) ?? "open";
206
206
  const content = html `<div class="toolbar">
@@ -251,8 +251,8 @@ tbody tr:hover .case-title {
251
251
  .page {
252
252
  --page-gap: 22px;
253
253
  --page-end: 96px;
254
- --entry-end: 16px;
255
- --service-end: 10px;
254
+ --entry-end: 6px;
255
+ --service-end: 6px;
256
256
  max-width: 1080px;
257
257
  margin: 0 auto;
258
258
  padding: 26px 32px var(--page-end);
@@ -284,6 +284,18 @@ tbody tr:hover .case-title {
284
284
  }
285
285
  }
286
286
 
287
+ /*
288
+ * A case page stacks its header, brief and timeline 12px apart, as the header stacks its rows; the
289
+ * top bar keeps the page's usual distance above them.
290
+ */
291
+ .page:has(> .case-head) {
292
+ --page-gap: 12px;
293
+
294
+ & > .topbar {
295
+ margin-bottom: 10px;
296
+ }
297
+ }
298
+
287
299
  .topbar {
288
300
  display: flex;
289
301
  align-items: center;
@@ -612,6 +624,7 @@ tbody td:first-child {
612
624
 
613
625
  /* Why the case page stopped updating: its log could not be read. */
614
626
  .message.problem {
627
+ margin: 0;
615
628
  padding: 10px 14px;
616
629
  border: 1px solid var(--alert);
617
630
  border-radius: 10px;
@@ -626,11 +639,6 @@ tbody td:first-child {
626
639
  display: flex;
627
640
  flex-direction: column;
628
641
  gap: 12px;
629
-
630
- /* The brief reads as the header's last row: the same gap, not the page's. */
631
- & + .brief {
632
- margin-top: calc(12px - var(--page-gap));
633
- }
634
642
  }
635
643
 
636
644
  /* An agent's mark sits on the text baseline and takes the surrounding ink: its file is a mask over
@@ -872,9 +880,15 @@ tbody td:first-child {
872
880
  * reads top-down in one column — no left/right chat split — and says who posted it in its
873
881
  * header: the role, the agent, the kind.
874
882
  */
883
+ /*
884
+ * Every entry pads 6px above and below its content, so any two entries stand 12px apart, card or
885
+ * service line. The timeline takes back the first entry's top padding, so it starts 12px under the
886
+ * brief, as the brief starts under the header.
887
+ */
875
888
  .timeline {
876
889
  display: flex;
877
890
  flex-direction: column;
891
+ margin-top: -6px;
878
892
  }
879
893
 
880
894
  .entry {
@@ -1164,29 +1178,26 @@ tbody td:first-child {
1164
1178
 
1165
1179
  /* ---------------------------------------------------------------- service events */
1166
1180
 
1167
- /*
1168
- * Bookkeeping, not conversation: one quiet line on the rail. A card entry ends with 16px; a
1169
- * service line ends with 10px and starts flush, so the space above and below it matches.
1170
- */
1181
+ /* Bookkeeping, not conversation: one quiet line on the rail, padded as a card is. */
1171
1182
  .entry.service .entry-time {
1172
- padding-top: 1px;
1183
+ padding-top: 7px;
1173
1184
  }
1174
1185
 
1175
1186
  .entry.service .entry-body {
1176
- padding: 0 0 var(--service-end);
1187
+ padding: 6px 0 var(--service-end);
1177
1188
  }
1178
1189
 
1179
1190
  .entry.service .marker {
1180
- top: 5px;
1191
+ top: 11px;
1181
1192
  }
1182
1193
 
1183
1194
  /* The rail starts and ends at the marker's centre. */
1184
1195
  .entry.service:first-child .entry-rail::before {
1185
- top: 9px;
1196
+ top: 15px;
1186
1197
  }
1187
1198
 
1188
1199
  .entry.service:last-child .entry-rail::before {
1189
- bottom: calc(100% - 9px);
1200
+ bottom: calc(100% - 15px);
1190
1201
  }
1191
1202
 
1192
1203
  /* Always one line: a detail too long for it ends in an ellipsis, and the line's title holds it all. */
@@ -1248,10 +1259,11 @@ tbody td:first-child {
1248
1259
  grid-row: 1 / span 2;
1249
1260
  }
1250
1261
 
1262
+ /* The time row leads the entry: it takes the 6px a card's top would, so entries stay 12px apart. */
1251
1263
  .entry-time {
1252
1264
  grid-column: 2;
1253
1265
  grid-row: 1;
1254
- padding-top: 8px;
1266
+ padding-top: 6px;
1255
1267
  text-align: left;
1256
1268
  line-height: 1.4;
1257
1269
  }
@@ -1263,11 +1275,11 @@ tbody td:first-child {
1263
1275
  }
1264
1276
 
1265
1277
  .marker {
1266
- top: 10px;
1278
+ top: 8px;
1267
1279
  }
1268
1280
 
1269
1281
  .entry:first-child .entry-rail::before {
1270
- top: 12px;
1282
+ top: 10px;
1271
1283
  }
1272
1284
 
1273
1285
  /* A service line keeps its time on the same line, ahead of the text. */
@@ -347,20 +347,19 @@ let filter = document.querySelector("[data-cases]")?.dataset.filterState ?? "ope
347
347
  function filterCases() {
348
348
  if (!search) return;
349
349
  const rows = [...document.querySelectorAll("#case-rows tr")];
350
- const inState = rows.filter((r) => r.dataset.state === filter);
350
+ const inFilter = (row, name) => name === "all" || row.dataset.state === name;
351
+ const inState = rows.filter((r) => inFilter(r, filter));
351
352
  const needle = search.value.trim().toLowerCase();
352
353
  let shown = 0;
353
354
  for (const row of rows) {
354
- row.hidden = !(row.dataset.state === filter && row.dataset.haystack.includes(needle));
355
+ row.hidden = !(inFilter(row, filter) && row.dataset.haystack.includes(needle));
355
356
  if (!row.hidden) shown++;
356
357
  }
357
358
  document.querySelector("[data-cases]").dataset.filterState = filter;
358
359
  for (const button of document.querySelectorAll("[data-filter]")) {
359
360
  const name = button.dataset.filter;
360
361
  button.setAttribute("aria-pressed", String(name === filter));
361
- button.querySelector("[data-count]").textContent = rows.filter(
362
- (r) => r.dataset.state === name,
363
- ).length;
362
+ button.querySelector("[data-count]").textContent = rows.filter((r) => inFilter(r, name)).length;
364
363
  }
365
364
  document.querySelector("[data-result-count]").textContent = `${shown} / ${inState.length}`;
366
365
  const message = document.querySelector("[data-message]");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lysyi3m/sidecar",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Lets one coding agent consult another mid-task: a driver asks, a read-only navigator answers",
5
5
  "license": "MIT",
6
6
  "repository": {