@design.estate/dees-catalog 22.0.0 → 22.2.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.
Files changed (36) hide show
  1. package/dist_bundle/bundle.js +2094 -1354
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-3SSZ4CDV.js → chunk-B6IKM3SA.js} +2 -2
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-VIN4YGID.js → chunk-IASP6M5U.js} +3 -3
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-6I3PIV5F.js → chunk-ZPJBKBPH.js} +8 -6
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-6I3PIV5F.js.map → chunk-ZPJBKBPH.js.map} +1 -1
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-STYNV6A3.js → de-3ZAD2XFI.js} +8 -6
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-STYNV6A3.js.map → de-3ZAD2XFI.js.map} +1 -1
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-PULP7K3X.js → dees-modal-CPEH77LV.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-KEQHBOYE.js → dees-workspace-terminal-65M4HBRK.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.d.ts +16 -2
  13. package/dist_ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.demo.js +458 -57
  14. package/dist_ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.js +67 -34
  15. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.d.ts +33 -4
  16. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.js +61 -7
  17. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.js +311 -29
  18. package/dist_ts_web/elements/00group-harness/interfaces.d.ts +13 -0
  19. package/dist_ts_web/i18n/de.d.ts +16 -8
  20. package/dist_ts_web/i18n/de.js +7 -5
  21. package/dist_ts_web/i18n/messages.d.ts +16 -8
  22. package/dist_ts_web/i18n/messages.js +7 -5
  23. package/package.json +1 -1
  24. package/readme.md +5 -3
  25. package/ts_web/00_commitinfo_data.ts +1 -1
  26. package/ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.demo.ts +504 -98
  27. package/ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.ts +68 -33
  28. package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.ts +41 -2
  29. package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.ts +310 -27
  30. package/ts_web/elements/00group-harness/interfaces.ts +14 -0
  31. package/ts_web/i18n/de.ts +6 -4
  32. package/ts_web/i18n/messages.ts +6 -4
  33. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-3SSZ4CDV.js.map → chunk-B6IKM3SA.js.map} +0 -0
  34. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-VIN4YGID.js.map → chunk-IASP6M5U.js.map} +0 -0
  35. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-PULP7K3X.js.map → dees-modal-CPEH77LV.js.map} +0 -0
  36. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-KEQHBOYE.js.map → dees-workspace-terminal-65M4HBRK.js.map} +0 -0
@@ -12,12 +12,14 @@ import {
12
12
  } from '@design.estate/dees-element';
13
13
  import { dcLocalize } from '../../../i18n/localize.js';
14
14
  import { themeDefaultStyles } from '../../00theme.js';
15
+ import { visuallyHidden } from '../../00visuallyhidden.js';
15
16
  import { ScrollEdgeShadowController, scrollEdgeShadowStyles } from '../../00scrolledges.js';
16
17
  import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
17
18
  import { harnessActivityStyles } from '../harness.styles.js';
18
19
  import { harnessFormatClockTime, harnessFormatRelativeTime } from '../harness.helpers.js';
19
20
  import type {
20
21
  IHarnessSessionRow,
22
+ IHarnessSessionRowContextDetail,
21
23
  IHarnessSessionRowEventDetail,
22
24
  IHarnessSessionTicketEventDetail,
23
25
  THarnessSessionRowState,
@@ -46,6 +48,15 @@ type TKnownHarness = keyof typeof harnessGlyphs;
46
48
  const isKnownHarness = (harnessArg: string): harnessArg is TKnownHarness => Object.hasOwn(harnessGlyphs, harnessArg);
47
49
  const unknownHarnessGlyph = 'lucide:Bot';
48
50
 
51
+ /** The skeleton's placeholder rows: name and excerpt widths, and whether a chip stands in the row. */
52
+ const skeletonRows: readonly { name: string; excerpt: string; chip: boolean }[] = [
53
+ { name: '11rem', excerpt: '72%', chip: true },
54
+ { name: '8rem', excerpt: '54%', chip: false },
55
+ { name: '13rem', excerpt: '64%', chip: true },
56
+ { name: '9.5rem', excerpt: '46%', chip: true },
57
+ { name: '7rem', excerpt: '58%', chip: false },
58
+ ];
59
+
49
60
  /** The roving-focus key of the Completed group's "more"/"fewer" button. */
50
61
  const moreStopKey = 'more:completed';
51
62
 
@@ -63,18 +74,29 @@ interface IFocusStop {
63
74
  * Each row is the harness glyph, which is also the status indicator (needs input: attention colour
64
75
  * and a blink; working: a slow pulse; failed: red; completed: muted and still), the name, the first
65
76
  * ticket as a chip ("+N" for more), and the age. The latest message excerpt joins the line only
66
- * while the list's own container is wide. Under reduced motion the indicator keeps its colour and
67
- * stops moving.
77
+ * while the list's own container is wide. Every row of every group shares one set of column tracks,
78
+ * so names, excerpts, chips and ages each start on one edge; the name column is as wide as the
79
+ * longest name up to `--dees-harness-session-name-max` (20rem), and longer names end in an
80
+ * ellipsis. Under reduced motion the indicator keeps its colour and stops moving.
81
+ *
82
+ * The first load, `loading` without rows, draws placeholder rows on the same columns once it has
83
+ * taken 200 ms, so a quick load never flashes them, and says it is still loading after
84
+ * `stillLoadingAfter`. Rows that are already there stay while more load.
68
85
  *
69
86
  * The list is fed, never arranged: there is no add, group or reorder. Click, Enter or Space on a
70
- * row emits `harness-session-row-select`; the chip emits `harness-session-ticket-select`. ArrowUp,
71
- * ArrowDown, Home and End move between rows, ArrowRight and ArrowLeft between a row and its chip.
87
+ * row emits `harness-session-row-select`; the chip emits `harness-session-ticket-select`. Right-click,
88
+ * or ContextMenu or Shift+F10 on a focused row, emits `harness-session-row-context` for the host's menu.
89
+ * ArrowUp, ArrowDown, Home and End move between rows, ArrowRight and ArrowLeft between a row and its
90
+ * chip. `focusList()` takes focus to the row last used, else the selected one, else the first.
72
91
  */
73
92
  @customElement('dees-harness-session-list')
74
93
  export class DeesHarnessSessionList extends DeesElement {
75
94
  public static demo = demoFunc;
76
95
  public static demoGroups = ['Agent Chat'];
77
96
 
97
+ /** How long a first load runs, in milliseconds, before the list says it is still loading. */
98
+ public static stillLoadingAfter = 10_000;
99
+
78
100
  private readonly t = dcLocalize(this);
79
101
 
80
102
  @property({ attribute: false })
@@ -97,6 +119,10 @@ export class DeesHarnessSessionList extends DeesElement {
97
119
  @state()
98
120
  accessor completedExpanded: boolean = false;
99
121
 
122
+ /** The first load has run past `stillLoadingAfter`. */
123
+ @state()
124
+ private accessor stillLoading: boolean = false;
125
+
100
126
  /** The keyboard stop that takes Tab into the list. */
101
127
  @state()
102
128
  private accessor activeKey: string = '';
@@ -105,6 +131,7 @@ export class DeesHarnessSessionList extends DeesElement {
105
131
  private readonly scrollbars = new OverlayScrollbarController(this, () => this.scrollContainer);
106
132
  /** The row focused before an update, focused again if the update moved it to another group. */
107
133
  private focusBeforeUpdate: { key: string; part: 'main' | 'ticket' } | undefined;
134
+ private stillLoadingTimer: ReturnType<typeof setTimeout> | undefined;
108
135
 
109
136
  public static styles = [
110
137
  themeDefaultStyles,
@@ -139,6 +166,28 @@ export class DeesHarnessSessionList extends DeesElement {
139
166
  box-sizing: border-box;
140
167
  }
141
168
 
169
+ /*
170
+ * One grid for every group: rows and their main buttons are subgrids, so each column (glyph,
171
+ * name, excerpt, chip, age) starts on one edge across all rows. The excerpt column exists only
172
+ * in the wide layout below.
173
+ */
174
+ .columns {
175
+ display: grid;
176
+ grid-template-columns:
177
+ [glyph] auto
178
+ [name] minmax(0, 1fr)
179
+ [ticket] fit-content(50%)
180
+ [age] auto;
181
+ column-gap: var(--dees-spacing-sm);
182
+ }
183
+
184
+ .groupHeader,
185
+ .rows,
186
+ .moreButton,
187
+ .emptyNote {
188
+ grid-column: 1 / -1;
189
+ }
190
+
142
191
  .groupHeader {
143
192
  display: flex;
144
193
  align-items: baseline;
@@ -162,7 +211,8 @@ export class DeesHarnessSessionList extends DeesElement {
162
211
 
163
212
  .rows {
164
213
  display: grid;
165
- gap: 1px;
214
+ grid-template-columns: subgrid;
215
+ row-gap: 1px;
166
216
  margin: 0;
167
217
  padding: 0;
168
218
  list-style: none;
@@ -170,9 +220,10 @@ export class DeesHarnessSessionList extends DeesElement {
170
220
 
171
221
  .row {
172
222
  position: relative;
173
- display: flex;
223
+ display: grid;
224
+ grid-column: 1 / -1;
225
+ grid-template-columns: subgrid;
174
226
  align-items: center;
175
- gap: var(--dees-spacing-sm);
176
227
  min-width: 0;
177
228
  min-height: var(--dees-control-height-lg);
178
229
  padding: 0 var(--dees-spacing-sm) 0 0;
@@ -189,10 +240,10 @@ export class DeesHarnessSessionList extends DeesElement {
189
240
 
190
241
  .rowMain {
191
242
  appearance: none;
192
- display: flex;
193
- flex: 1 1 auto;
243
+ display: grid;
244
+ grid-column: glyph / ticket;
245
+ grid-template-columns: subgrid;
194
246
  align-items: center;
195
- gap: var(--dees-spacing-sm);
196
247
  min-width: 0;
197
248
  align-self: stretch;
198
249
  margin: 0;
@@ -207,6 +258,15 @@ export class DeesHarnessSessionList extends DeesElement {
207
258
  cursor: inherit;
208
259
  }
209
260
 
261
+ /* A row without a chip lends the chip's cell to its last text, as the line did before columns. */
262
+ .row:not(:has(.ticket)) .rowMain {
263
+ grid-column: glyph / age;
264
+ }
265
+
266
+ .row:not(:has(.ticket)) .name {
267
+ grid-column: name / age;
268
+ }
269
+
210
270
  .rowMain:focus-visible {
211
271
  outline: none;
212
272
  }
@@ -218,7 +278,6 @@ export class DeesHarnessSessionList extends DeesElement {
218
278
 
219
279
  .indicator {
220
280
  display: grid;
221
- flex: 0 0 auto;
222
281
  place-items: center;
223
282
  width: 22px;
224
283
  height: 22px;
@@ -254,7 +313,6 @@ export class DeesHarnessSessionList extends DeesElement {
254
313
  }
255
314
 
256
315
  .name {
257
- flex: 0 1 auto;
258
316
  min-width: 0;
259
317
  overflow: hidden;
260
318
  text-overflow: ellipsis;
@@ -267,7 +325,6 @@ export class DeesHarnessSessionList extends DeesElement {
267
325
 
268
326
  .excerpt {
269
327
  display: none;
270
- flex: 1 1 0;
271
328
  min-width: 0;
272
329
  overflow: hidden;
273
330
  color: var(--dees-color-text-muted);
@@ -278,10 +335,12 @@ export class DeesHarnessSessionList extends DeesElement {
278
335
  .ticket {
279
336
  appearance: none;
280
337
  display: inline-flex;
281
- flex: 0 0 auto;
338
+ grid-column: ticket;
339
+ justify-self: end;
282
340
  align-items: center;
283
341
  gap: var(--dees-spacing-xs);
284
- max-width: 50%;
342
+ min-width: 0;
343
+ max-width: 100%;
285
344
  height: 20px;
286
345
  margin: 0;
287
346
  padding: 0 var(--dees-spacing-xs);
@@ -312,7 +371,7 @@ export class DeesHarnessSessionList extends DeesElement {
312
371
  }
313
372
 
314
373
  .age {
315
- flex: 0 0 auto;
374
+ grid-column: age;
316
375
  min-width: 3ch;
317
376
  color: var(--dees-color-text-muted);
318
377
  font-size: var(--dees-font-caption1-size, 12px);
@@ -345,6 +404,110 @@ export class DeesHarnessSessionList extends DeesElement {
345
404
  outline-offset: calc(-1 * var(--dees-line-width-focus-ring));
346
405
  }
347
406
 
407
+ .loadingStatus {
408
+ ${visuallyHidden}
409
+ }
410
+
411
+ /*
412
+ * The first load: placeholder rows on the rows' own columns and heights, so the real rows take
413
+ * their place without a shift. They stay invisible for 200 ms, so a quick load never flashes.
414
+ */
415
+ .skeleton,
416
+ .skeletonRows,
417
+ .skeletonRow,
418
+ .skeletonMain {
419
+ display: grid;
420
+ grid-template-columns: subgrid;
421
+ align-items: center;
422
+ }
423
+
424
+ .skeleton {
425
+ grid-column: 1 / -1;
426
+ animation: harness-session-skeleton-reveal 1ms linear 200ms both;
427
+ --skeleton-base: var(--dees-color-fill-secondary);
428
+ --skeleton-glint: color-mix(in srgb, var(--dees-color-fill-secondary), var(--dees-color-text-primary) 12%);
429
+ }
430
+
431
+ @keyframes harness-session-skeleton-reveal {
432
+ from { visibility: hidden; }
433
+ to { visibility: visible; }
434
+ }
435
+
436
+ .skeleton .groupHeader {
437
+ align-items: center;
438
+ }
439
+
440
+ /* A line of header text, unseen, so the placeholder header is as tall as a real one. */
441
+ .skeleton .groupHeader::before {
442
+ content: '\\200b';
443
+ }
444
+
445
+ .skeletonRows {
446
+ grid-column: 1 / -1;
447
+ row-gap: 1px;
448
+ }
449
+
450
+ .skeletonRow {
451
+ grid-column: 1 / -1;
452
+ min-height: var(--dees-control-height-lg);
453
+ padding: 0 var(--dees-spacing-sm) 0 0;
454
+ }
455
+
456
+ .skeletonMain {
457
+ grid-column: glyph / ticket;
458
+ padding: 0 0 0 var(--dees-spacing-xs);
459
+ }
460
+
461
+ .skeletonBar {
462
+ display: block;
463
+ max-width: 100%;
464
+ height: 10px;
465
+ border-radius: var(--dees-radius-full);
466
+ background: linear-gradient(
467
+ 90deg,
468
+ var(--skeleton-base) 35%,
469
+ var(--skeleton-glint) 50%,
470
+ var(--skeleton-base) 65%
471
+ ) 100% 0 / 300% 100%;
472
+ animation: harness-session-shimmer 1.6s linear infinite;
473
+ }
474
+
475
+ .skeletonGlyph {
476
+ width: 22px;
477
+ height: 22px;
478
+ border-radius: var(--dees-radius-sm);
479
+ corner-shape: var(--dees-corner-shape);
480
+ }
481
+
482
+ .skeletonExcerpt {
483
+ display: none;
484
+ }
485
+
486
+ .skeletonChip {
487
+ grid-column: ticket;
488
+ justify-self: end;
489
+ width: 3.5rem;
490
+ height: 20px;
491
+ border-radius: var(--dees-radius-xs);
492
+ corner-shape: var(--dees-corner-shape);
493
+ }
494
+
495
+ .skeletonAge {
496
+ grid-column: age;
497
+ justify-self: end;
498
+ width: 4ch;
499
+ }
500
+
501
+ /* A first load that takes long says so, and the placeholders hold still. */
502
+ .skeleton.stalled .skeletonBar {
503
+ animation: none;
504
+ }
505
+
506
+ @keyframes harness-session-shimmer {
507
+ from { background-position: 100% 0; }
508
+ to { background-position: 0 0; }
509
+ }
510
+
348
511
  .emptyNote {
349
512
  padding: var(--dees-spacing-lg);
350
513
  color: var(--dees-color-text-secondary);
@@ -352,16 +515,32 @@ export class DeesHarnessSessionList extends DeesElement {
352
515
  text-align: center;
353
516
  }
354
517
 
355
- /* Wide enough to read a line of the conversation beside its name. */
518
+ /*
519
+ * Wide enough to read a line of the conversation beside its name: the name column is as wide
520
+ * as the longest name, up to the maximum, and every excerpt starts on the edge after it.
521
+ */
356
522
  @container harness-session-list (min-width: 720px) {
357
- .name {
358
- flex: 0 1 auto;
359
- max-width: 40%;
523
+ .columns {
524
+ grid-template-columns:
525
+ [glyph] auto
526
+ [name] fit-content(var(--dees-harness-session-name-max, 20rem))
527
+ [excerpt] minmax(0, 1fr)
528
+ [ticket] fit-content(50%)
529
+ [age] auto;
360
530
  }
361
531
 
362
- .excerpt {
532
+ .excerpt,
533
+ .skeletonExcerpt {
363
534
  display: block;
364
535
  }
536
+
537
+ .row:not(:has(.ticket)) .name {
538
+ grid-column: name;
539
+ }
540
+
541
+ .row:not(:has(.ticket)) .excerpt {
542
+ grid-column: excerpt / age;
543
+ }
365
544
  }
366
545
 
367
546
  @media (hover: hover) {
@@ -400,7 +579,8 @@ export class DeesHarnessSessionList extends DeesElement {
400
579
 
401
580
  @media (prefers-reduced-motion: reduce) {
402
581
  .indicator,
403
- .row {
582
+ .row,
583
+ .skeletonBar {
404
584
  animation: none;
405
585
  transition: none;
406
586
  }
@@ -451,25 +631,62 @@ export class DeesHarnessSessionList extends DeesElement {
451
631
  public render(): TemplateResult {
452
632
  const stops = this.focusStops();
453
633
  const activeKey = this.resolveActiveKey(stops);
634
+ const firstLoad = this.isFirstLoad();
454
635
  return html`
455
636
  <div class="listFrame">
456
637
  <div
457
638
  class="list"
458
639
  role="region"
459
640
  aria-label=${this.t('sessionlist.label')}
641
+ aria-busy=${this.loading ? 'true' : 'false'}
460
642
  @keydown=${this.handleKeydown}
461
643
  >
462
- ${this.loading
463
- ? html`<div class="emptyNote">${this.t('sessionlist.loading')}</div>`
464
- : this.rows.length
644
+ <div class="columns">
645
+ ${this.rows.length
465
646
  ? [...this.groupedRows].map(([stateArg, rows]) => this.renderGroup(stateArg, rows, activeKey))
466
- : html`<div class="emptyNote">${this.emptyText || this.t('sessionlist.empty')}</div>`}
647
+ : firstLoad
648
+ ? this.renderSkeleton()
649
+ : html`<div class="emptyNote">${this.emptyText || this.t('sessionlist.empty')}</div>`}
650
+ </div>
651
+ </div>
652
+ <div class="loadingStatus" role="status">
653
+ ${firstLoad ? this.t(this.stillLoading ? 'sessionlist.stillLoading' : 'sessionlist.loading') : ''}
467
654
  </div>
468
655
  ${this.scrollEdges.renderShadows()}
469
656
  </div>
470
657
  `;
471
658
  }
472
659
 
660
+ /** The first load: loading, with no rows to show yet. Rows already there stay while more load. */
661
+ private isFirstLoad(): boolean {
662
+ return this.loading && this.rows.length === 0;
663
+ }
664
+
665
+ /** Placeholder rows, hidden from assistive technology, which hears the loading status instead. */
666
+ private renderSkeleton(): TemplateResult {
667
+ return html`
668
+ ${this.stillLoading
669
+ ? html`<div class="emptyNote" aria-hidden="true">${this.t('sessionlist.stillLoading')}</div>`
670
+ : ''}
671
+ <div class="skeleton ${this.stillLoading ? 'stalled' : ''}" aria-hidden="true">
672
+ <div class="groupHeader"><span class="skeletonBar" style="width: 5rem"></span></div>
673
+ <div class="skeletonRows">
674
+ ${skeletonRows.map((row) => html`
675
+ <div class="skeletonRow">
676
+ <div class="skeletonMain">
677
+ <span class="skeletonBar skeletonGlyph"></span>
678
+ <span class="skeletonBar" style=${`width: ${row.name}`}></span>
679
+ <span class="skeletonBar skeletonExcerpt" style=${`width: ${row.excerpt}`}></span>
680
+ </div>
681
+ ${row.chip ? html`<span class="skeletonBar skeletonChip"></span>` : ''}
682
+ <span class="skeletonBar skeletonAge"></span>
683
+ </div>
684
+ `)}
685
+ </div>
686
+ </div>
687
+ `;
688
+ }
689
+
473
690
  private renderGroup(
474
691
  stateArg: THarnessSessionRowState,
475
692
  rowsArg: IHarnessSessionRow[],
@@ -524,6 +741,7 @@ export class DeesHarnessSessionList extends DeesElement {
524
741
  class="row state-${rowArg.state} ${selected ? 'selected' : ''}"
525
742
  data-row-id=${rowArg.id}
526
743
  @click=${() => this.select(rowArg)}
744
+ @contextmenu=${(event: MouseEvent) => this.emitContext(event, rowArg, 'pointer')}
527
745
  >
528
746
  <button
529
747
  class="rowMain"
@@ -532,6 +750,7 @@ export class DeesHarnessSessionList extends DeesElement {
532
750
  tabindex=${activeArg ? '0' : '-1'}
533
751
  aria-current=${selected ? 'true' : 'false'}
534
752
  aria-describedby=${ageId}
753
+ aria-keyshortcuts="ContextMenu Shift+F10"
535
754
  @focus=${() => { this.activeKey = rowArg.id; }}
536
755
  >
537
756
  <span
@@ -542,7 +761,7 @@ export class DeesHarnessSessionList extends DeesElement {
542
761
  >
543
762
  <dees-icon icon=${glyph} iconSize="14" aria-hidden="true"></dees-icon>
544
763
  </span>
545
- <span class="name">${rowArg.name}</span>
764
+ <span class="name" title=${rowArg.name}>${rowArg.name}</span>
546
765
  ${rowArg.excerpt ? html`<span class="excerpt">${rowArg.excerpt}</span>` : ''}
547
766
  </button>
548
767
  ${firstTicket
@@ -590,6 +809,33 @@ export class DeesHarnessSessionList extends DeesElement {
590
809
  this.dispatchEvent(new CustomEvent('harness-session-ticket-select', { detail, bubbles: true, composed: true }));
591
810
  }
592
811
 
812
+ /**
813
+ * Asks the host for a row's menu. The host owns the menu; the list only says which row, and where: at the pointer,
814
+ * or under the row for the keyboard.
815
+ */
816
+ private emitContext(eventArg: MouseEvent | KeyboardEvent, rowArg: IHarnessSessionRow, sourceArg: 'pointer' | 'keyboard'): void {
817
+ eventArg.preventDefault();
818
+ eventArg.stopPropagation();
819
+ this.activeKey = rowArg.id;
820
+ const anchor = (eventArg.target as HTMLElement | null)?.closest<HTMLElement>('.row');
821
+ const rect = anchor?.getBoundingClientRect();
822
+ const pointer = sourceArg === 'pointer' && eventArg instanceof MouseEvent;
823
+ const detail: IHarnessSessionRowContextDetail = {
824
+ row: rowArg,
825
+ clientX: pointer ? eventArg.clientX : (rect ? rect.left + Math.min(rect.width / 2, 24) : 0),
826
+ clientY: pointer ? eventArg.clientY : (rect?.bottom ?? 0),
827
+ source: sourceArg,
828
+ originalEvent: eventArg,
829
+ };
830
+ this.dispatchEvent(new CustomEvent('harness-session-row-context', { detail, bubbles: true, composed: true }));
831
+ }
832
+
833
+ /** Focuses the list's keyboard stop: the row last used, else the selected row, else the first. */
834
+ public focusList(): void {
835
+ const key = this.resolveActiveKey(this.focusStops());
836
+ if (key) this.focusStop(key);
837
+ }
838
+
593
839
  private handleKeydown = (eventArg: KeyboardEvent): void => {
594
840
  if (eventArg.altKey || eventArg.ctrlKey || eventArg.metaKey) return;
595
841
  const target = eventArg.target as HTMLElement | null;
@@ -597,6 +843,11 @@ export class DeesHarnessSessionList extends DeesElement {
597
843
  if (!stopElement) return;
598
844
  const row = target?.closest<HTMLElement>('.row');
599
845
  const currentKey = row?.dataset.rowId ?? stopElement.dataset.stop ?? '';
846
+ if (eventArg.key === 'ContextMenu' || (eventArg.key === 'F10' && eventArg.shiftKey)) {
847
+ const contextRow = row ? this.rows.find((rowArg) => rowArg.id === row.dataset.rowId) : undefined;
848
+ if (contextRow) this.emitContext(eventArg, contextRow, 'keyboard');
849
+ return;
850
+ }
600
851
  if (eventArg.key === 'ArrowRight' || eventArg.key === 'ArrowLeft') {
601
852
  if (!row) return;
602
853
  const part = eventArg.key === 'ArrowRight' ? '.ticket' : '.rowMain';
@@ -636,8 +887,40 @@ export class DeesHarnessSessionList extends DeesElement {
636
887
  return stop;
637
888
  }
638
889
 
890
+ public async connectedCallback(): Promise<void> {
891
+ await super.connectedCallback();
892
+ // A first load under way when the list left the page counts again from now.
893
+ if (this.isFirstLoad()) this.requestUpdate();
894
+ }
895
+
896
+ public async disconnectedCallback(): Promise<void> {
897
+ this.clearStillLoadingTimer();
898
+ this.stillLoading = false;
899
+ await super.disconnectedCallback();
900
+ }
901
+
902
+ /** Counts a first load towards `stillLoadingAfter`, and forgets it once rows arrive or loading ends. */
903
+ private syncStillLoading(): void {
904
+ if (!this.isConnected || !this.isFirstLoad()) {
905
+ this.clearStillLoadingTimer();
906
+ this.stillLoading = false;
907
+ return;
908
+ }
909
+ if (this.stillLoading || this.stillLoadingTimer) return;
910
+ this.stillLoadingTimer = setTimeout(() => {
911
+ this.stillLoadingTimer = undefined;
912
+ this.stillLoading = true;
913
+ }, DeesHarnessSessionList.stillLoadingAfter);
914
+ }
915
+
916
+ private clearStillLoadingTimer(): void {
917
+ if (this.stillLoadingTimer) clearTimeout(this.stillLoadingTimer);
918
+ this.stillLoadingTimer = undefined;
919
+ }
920
+
639
921
  public willUpdate(changedArg: Map<PropertyKey, unknown>): void {
640
922
  super.willUpdate(changedArg);
923
+ this.syncStillLoading();
641
924
  const focused = this.shadowRoot?.activeElement as HTMLElement | null | undefined;
642
925
  if (!focused) {
643
926
  this.focusBeforeUpdate = undefined;
@@ -951,6 +951,20 @@ export interface IHarnessSessionRowEventDetail {
951
951
  row: IHarnessSessionRow;
952
952
  }
953
953
 
954
+ /**
955
+ * Detail of `harness-session-row-context`, fired by right-click on a row, or ContextMenu/Shift+F10 on a focused one.
956
+ * The host owns the menu.
957
+ */
958
+ export interface IHarnessSessionRowContextDetail {
959
+ row: IHarnessSessionRow;
960
+ /** The pointer's position, or for the keyboard a point under the row; viewport coordinates. */
961
+ clientX: number;
962
+ clientY: number;
963
+ source: 'pointer' | 'keyboard';
964
+ /** The triggering event; the list has already prevented its default. */
965
+ originalEvent: MouseEvent | KeyboardEvent;
966
+ }
967
+
954
968
  /** Detail of `harness-session-ticket-select`, fired by a row's ticket chip. */
955
969
  export interface IHarnessSessionTicketEventDetail {
956
970
  row: IHarnessSessionRow;
package/ts_web/i18n/de.ts CHANGED
@@ -1367,14 +1367,15 @@ export default dcMessages.translation('de', {
1367
1367
  'usage.compact': '<total>{count}</total> Tokens',
1368
1368
  'usage.in': '{count} ein',
1369
1369
  'usage.out': '{count} aus',
1370
- 'resourcelist.empty': 'Noch keine Unterhaltungen.',
1370
+ 'resourcelist.empty': '{kind, select, terminal {Noch keine Terminals.} browser {Noch keine Browser.} workspace {Noch keine Arbeitsbereiche.} resource {Noch keine Ressourcen.} none {Noch keine Unterhaltungen.} other {Noch keine Unterhaltungen.}}',
1371
1371
  'resourcelist.dropHere': 'Hier ablegen',
1372
1372
  'resourcelist.searchAll': 'Unterhaltungen und Ressourcen durchsuchen',
1373
- 'resourcelist.searchResources': 'Ressourcen durchsuchen',
1373
+ 'resourcelist.searchResources': '{kind, select, terminal {Terminals durchsuchen} browser {Browser durchsuchen} workspace {Arbeitsbereiche durchsuchen} resource {Ressourcen durchsuchen} other {Ressourcen durchsuchen}}',
1374
+ 'resourcelist.search': 'Suchen …',
1374
1375
  'resourcelist.newGroup': 'Neue Gruppe',
1375
- 'resourcelist.loading': 'Unterhaltungen werden geladen …',
1376
+ 'resourcelist.loading': '{kind, select, conversation {Unterhaltungen werden geladen …} terminal {Terminals werden geladen …} browser {Browser werden geladen …} workspace {Arbeitsbereiche werden geladen …} resource {Ressourcen werden geladen …} none {Wird geladen …} other {Wird geladen …}}',
1376
1377
  'resourcelist.noMatchAll': 'Keine Unterhaltungen oder Ressourcen passen zu dieser Suche.',
1377
- 'resourcelist.noMatchResources': 'Keine Ressourcen passen zu dieser Suche.',
1378
+ 'resourcelist.noMatchResources': '{kind, select, terminal {Keine Terminals passen zu dieser Suche.} browser {Keine Browser passen zu dieser Suche.} workspace {Keine Arbeitsbereiche passen zu dieser Suche.} resource {Keine Ressourcen passen zu dieser Suche.} other {Keine Ressourcen passen zu dieser Suche.}}',
1378
1379
  'resourcelist.noMatch': 'Keine Unterhaltungen passen zu dieser Suche.',
1379
1380
  'resourcelist.ungrouped': 'Ohne Gruppe',
1380
1381
  'resourcelist.attention': '{count, number} erfordern Aufmerksamkeit',
@@ -1409,6 +1410,7 @@ export default dcMessages.translation('de', {
1409
1410
  'sessionlist.label': 'Sitzungen',
1410
1411
  'sessionlist.empty': 'Noch keine Sitzungen.',
1411
1412
  'sessionlist.loading': 'Sitzungen werden geladen …',
1413
+ 'sessionlist.stillLoading': 'Sitzungen werden noch geladen …',
1412
1414
  'sessionlist.group': '{state, select, needs_input {Wartet auf Eingabe} working {In Arbeit} failed {Fehlgeschlagen} completed {Abgeschlossen} other {Sitzungen}}',
1413
1415
  'sessionlist.harness': '{harness, select, claude {Claude Code} codex {Codex} flex {FlexHarness} opencode {OpenCode} other {Agent}}',
1414
1416
  'sessionlist.indicator': '{harness} · {state, select, needs_input {wartet auf Eingabe} working {in Arbeit} failed {fehlgeschlagen} completed {abgeschlossen} other {aktiv}}',
@@ -1441,14 +1441,15 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
1441
1441
  'usage.out': { message: '{count} out', description: 'The usage chip: tokens written; {count} is formatted.' },
1442
1442
 
1443
1443
  // dees-harness-resource-list
1444
- 'resourcelist.empty': { message: 'No conversations yet.', description: 'Said by an empty list, while the host names nothing.' },
1444
+ 'resourcelist.empty': { message: '{kind, select, terminal {No terminals yet.} browser {No browsers yet.} workspace {No workspaces yet.} resource {No resources yet.} none {No conversations yet.} other {No conversations yet.}}', description: 'Said by an empty list, while the host names nothing; {kind} is what the list shows.' },
1445
1445
  'resourcelist.dropHere': { message: 'Drop here', description: 'The gap where a dragged row will land.' },
1446
1446
  'resourcelist.searchAll': { message: 'Search conversations and resources', description: 'The search field while the list shows resources too.' },
1447
- 'resourcelist.searchResources': { message: 'Search resources', description: 'The search field while the list shows resources only.' },
1447
+ 'resourcelist.searchResources': { message: '{kind, select, terminal {Search terminals} browser {Search browsers} workspace {Search workspaces} resource {Search resources} other {Search resources}}', description: 'The search field while the list shows resources only; {kind} is their kind.' },
1448
+ 'resourcelist.search': { message: 'Search…', description: 'The search field while the list cannot tell what it shows.' },
1448
1449
  'resourcelist.newGroup': { message: 'New group', description: 'The button that creates a group.' },
1449
- 'resourcelist.loading': { message: 'Loading conversations…', description: 'Said while the list loads.' },
1450
+ 'resourcelist.loading': { message: '{kind, select, conversation {Loading conversations…} terminal {Loading terminals…} browser {Loading browsers…} workspace {Loading workspaces…} resource {Loading resources…} none {Loading…} other {Loading…}}', description: 'Said while the list loads; {kind} is what the list shows, when it can tell.' },
1450
1451
  'resourcelist.noMatchAll': { message: 'No conversations or resources match this search.', description: 'Said when nothing matches the search.' },
1451
- 'resourcelist.noMatchResources': { message: 'No resources match this search.', description: 'Said when no resource matches the search and there are no conversations.' },
1452
+ 'resourcelist.noMatchResources': { message: '{kind, select, terminal {No terminals match this search.} browser {No browsers match this search.} workspace {No workspaces match this search.} resource {No resources match this search.} other {No resources match this search.}}', description: 'Said when no resource matches the search and there are no conversations; {kind} is their kind.' },
1452
1453
  'resourcelist.noMatch': { message: 'No conversations match this search.', description: 'Said when no conversation matches the search.' },
1453
1454
  'resourcelist.ungrouped': { message: 'Ungrouped', description: 'The section of rows in no group.' },
1454
1455
  'resourcelist.attention': { message: '{count, number} need attention', description: 'A group\'s badge (its name): rows that need attention.' },
@@ -1484,6 +1485,7 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
1484
1485
  'sessionlist.label': { message: 'Sessions', description: 'The list of every session (its name).' },
1485
1486
  'sessionlist.empty': { message: 'No sessions yet.', description: 'Said by an empty list, while the host names nothing.' },
1486
1487
  'sessionlist.loading': { message: 'Loading sessions…', description: 'Said while the list loads.' },
1488
+ 'sessionlist.stillLoading': { message: 'Still loading sessions…', description: 'Said when the first load of the list takes long.' },
1487
1489
  'sessionlist.group': { message: '{state, select, needs_input {Needs input} working {Working} failed {Failed} completed {Completed} other {Sessions}}', description: 'A group heading: the state its sessions share.' },
1488
1490
  'sessionlist.harness': { message: '{harness, select, claude {Claude Code} codex {Codex} flex {FlexHarness} opencode {OpenCode} other {Agent}}', description: 'The product a session runs in; product names stay as they are.' },
1489
1491
  'sessionlist.indicator': { message: '{harness} · {state, select, needs_input {needs input} working {working} failed {failed} completed {completed} other {active}}', description: 'A row\'s status mark (its name): the harness, then the session\'s state.' },