@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
@@ -76,6 +76,11 @@ type TListItem =
76
76
  resource: IHarnessResourceMeta;
77
77
  };
78
78
 
79
+ /** Resource kinds the catalog has words for; any other kind reads as resources. */
80
+ const wordedResourceKinds = ['terminal', 'browser', 'workspace'] as const;
81
+ type TWordedResourceKind = typeof wordedResourceKinds[number];
82
+ type TResourceWordKind = TWordedResourceKind | 'resource';
83
+
79
84
  const itemKey = (refArg: IHarnessSessionListItemRef): string => `${refArg.kind}:${refArg.id}`;
80
85
 
81
86
  const itemRef = (itemArg: IHarnessSessionListItemRef): IHarnessSessionListItemRef => ({
@@ -210,6 +215,14 @@ export class DeesHarnessResourceList extends DeesElement {
210
215
  @property({ reflect: true })
211
216
  accessor selectedResourceId = '';
212
217
 
218
+ /**
219
+ * The kind of resource the list shows, for its search field, loading, empty and no-match
220
+ * words: `terminal`, `browser` and `workspace` have words of their own, any other kind reads
221
+ * as resources. Unset, a list without conversations takes the kind its resources share.
222
+ */
223
+ @property({ reflect: true })
224
+ accessor resourceKind = '';
225
+
213
226
  /**
214
227
  * Serializable association targets, honoured by host menus and by the drop
215
228
  * affordance alike: an ineligible row offers no attachment and commits
@@ -738,11 +751,15 @@ export class DeesHarnessResourceList extends DeesElement {
738
751
  font-weight: 600;
739
752
  }
740
753
 
741
- .resourceAttachment {
742
- display: flex;
754
+ /*
755
+ * The names run as one line of text with a single ellipsis at its end, so each comma
756
+ * follows the visible end of its name.
757
+ */
758
+ .resourceAttachmentNames {
743
759
  min-width: 0;
744
- align-items: center;
745
- gap: var(--dees-spacing-2xs);
760
+ overflow: hidden;
761
+ text-overflow: ellipsis;
762
+ white-space: nowrap;
746
763
  }
747
764
 
748
765
  /* Past two names the row keeps one line and the title carries the full list. */
@@ -781,13 +798,6 @@ export class DeesHarnessResourceList extends DeesElement {
781
798
  pointer-events: none;
782
799
  }
783
800
 
784
- .resourceAttachmentName {
785
- min-width: 0;
786
- overflow: hidden;
787
- text-overflow: ellipsis;
788
- white-space: nowrap;
789
- }
790
-
791
801
  .resourceActions {
792
802
  display: grid;
793
803
  place-items: center;
@@ -1386,12 +1396,39 @@ export class DeesHarnessResourceList extends DeesElement {
1386
1396
  await super.disconnectedCallback();
1387
1397
  }
1388
1398
 
1389
- /** What the search field searches: conversations, resources, or both. */
1390
- private get searchPlaceholderKey(): 'resourcelist.searchAll' | 'resourcelist.searchResources' | 'picker.search' {
1391
- if (this.sessions.length) return this.acceptedResources.length ? 'resourcelist.searchAll' : 'picker.search';
1392
- return this.acceptedResources.length || this.attachableSessions.length
1393
- ? 'resourcelist.searchResources'
1394
- : 'picker.search';
1399
+ /** Whether the list can tell it shows resources: the host names their kind, or it has some. */
1400
+ private get showsResources(): boolean {
1401
+ return !!(this.resourceKind || this.acceptedResources.length || this.attachableSessions.length);
1402
+ }
1403
+
1404
+ /** The resources' kind in the list's words: one the catalog names, else plain resources. */
1405
+ private get resourceWordKind(): TResourceWordKind {
1406
+ const kinds = new Set(this.acceptedResources.map((resource) => resource.kind));
1407
+ const kind = this.resourceKind || (kinds.size === 1 ? [...kinds][0] : '');
1408
+ return wordedResourceKinds.includes(kind as TWordedResourceKind) ? kind as TWordedResourceKind : 'resource';
1409
+ }
1410
+
1411
+ /** What the search field searches: conversations, resources of a kind, both, or anything. */
1412
+ private get searchPlaceholder(): string {
1413
+ if (this.sessions.length) {
1414
+ return this.t(this.acceptedResources.length || this.resourceKind ? 'resourcelist.searchAll' : 'picker.search');
1415
+ }
1416
+ return this.showsResources
1417
+ ? this.t('resourcelist.searchResources', { kind: this.resourceWordKind })
1418
+ : this.t('resourcelist.search');
1419
+ }
1420
+
1421
+ /** Said while the list loads, in the words of what it shows, when it can tell. */
1422
+ private get loadingText(): string {
1423
+ const kind = this.sessions.length
1424
+ ? this.acceptedResources.length || this.resourceKind ? 'none' : 'conversation'
1425
+ : this.showsResources ? this.resourceWordKind : 'none';
1426
+ return this.t('resourcelist.loading', { kind });
1427
+ }
1428
+
1429
+ /** Said by an empty list the host names nothing for. */
1430
+ private get emptyWords(): string {
1431
+ return this.emptyText || this.t('resourcelist.empty', { kind: this.showsResources ? this.resourceWordKind : 'none' });
1395
1432
  }
1396
1433
 
1397
1434
  public render(): TemplateResult {
@@ -1400,8 +1437,8 @@ export class DeesHarnessResourceList extends DeesElement {
1400
1437
  <div class="searchField">
1401
1438
  <dees-icon class="searchIcon" icon="lucide:Search" iconSize="13"></dees-icon>
1402
1439
  <input
1403
- placeholder=${this.t(this.searchPlaceholderKey)}
1404
- aria-label=${this.t(this.searchPlaceholderKey)}
1440
+ placeholder=${this.searchPlaceholder}
1441
+ aria-label=${this.searchPlaceholder}
1405
1442
  .value=${this.search}
1406
1443
  @input=${(event: Event) => {
1407
1444
  this.search = (event.currentTarget as HTMLInputElement).value;
@@ -1429,7 +1466,7 @@ export class DeesHarnessResourceList extends DeesElement {
1429
1466
  <div class="list ${this.draggingItem ? 'dragActive' : ''}">
1430
1467
  <div class="listContent">
1431
1468
  ${this.loading
1432
- ? html`<div class="emptyNote">${this.t('resourcelist.loading')}</div>`
1469
+ ? html`<div class="emptyNote">${this.loadingText}</div>`
1433
1470
  : this.searchActive
1434
1471
  ? this.renderSearchList()
1435
1472
  : this.renderOrderedList()}
@@ -1444,10 +1481,12 @@ export class DeesHarnessResourceList extends DeesElement {
1444
1481
  private renderEmptyNote(): TemplateResult {
1445
1482
  return html`<div class="emptyNote">
1446
1483
  ${this.acceptedResources.length
1447
- ? this.t(this.sessions.length ? 'resourcelist.noMatchAll' : 'resourcelist.noMatchResources')
1484
+ ? this.sessions.length
1485
+ ? this.t('resourcelist.noMatchAll')
1486
+ : this.t('resourcelist.noMatchResources', { kind: this.resourceWordKind })
1448
1487
  : this.sessions.length
1449
1488
  ? this.t('resourcelist.noMatch')
1450
- : this.emptyText || this.t('resourcelist.empty')}
1489
+ : this.emptyWords}
1451
1490
  </div>`;
1452
1491
  }
1453
1492
 
@@ -1461,7 +1500,7 @@ export class DeesHarnessResourceList extends DeesElement {
1461
1500
  const groups = this.effectiveGroups;
1462
1501
  const ungrouped = this.ungroupedItems;
1463
1502
  if (!this.acceptedItems.length && !groups.length) {
1464
- return html`<div class="emptyNote">${this.emptyText || this.t('resourcelist.empty')}</div>`;
1503
+ return html`<div class="emptyNote">${this.emptyWords}</div>`;
1465
1504
  }
1466
1505
  return html`
1467
1506
  ${groups.map((group) => this.renderGroup(group))}
@@ -1889,18 +1928,14 @@ export class DeesHarnessResourceList extends DeesElement {
1889
1928
  <span class="resourceAttachments" title=${this.t('resourcelist.attachedTo', { titles: this.t.format.list(attachedTitles, 'unit') })}>
1890
1929
  <dees-icon aria-hidden="true" icon="lucide:Link" iconSize="10"></dees-icon>
1891
1930
  <span class="visuallyHidden">${this.t('resourcelist.attachedToPrefix')} </span>
1892
- ${repeat(
1931
+ <span class="resourceAttachmentNames">${repeat(
1893
1932
  visibleAttachments,
1894
1933
  (target) => itemKey(target),
1895
- (target, index) => html`
1896
- <span class="resourceAttachment">
1897
- <span class="resourceAttachmentName">${this.itemTitleFor(target)}</span>
1898
- ${index < visibleAttachments.length - 1 || overflowAttachments > 0
1899
- ? html`<span aria-hidden="true">,</span>`
1900
- : ''}
1901
- </span>
1902
- `,
1903
- )}
1934
+ // One line: whitespace between these spans would render as text.
1935
+ (target, index) => html`<span class="resourceAttachment"><span class="resourceAttachmentName">${this.itemTitleFor(target)}</span>${index < visibleAttachments.length - 1 || overflowAttachments > 0
1936
+ ? html`<span aria-hidden="true">, </span>`
1937
+ : ''}</span>`,
1938
+ )}</span>
1904
1939
  ${overflowAttachments > 0
1905
1940
  ? html`<span class="resourceAttachmentOverflow">+${overflowAttachments}</span>`
1906
1941
  : ''}
@@ -33,6 +33,9 @@ const demoRows = (): IHarnessSessionRow[] => {
33
33
  { id: 'kanban', harness: 'codex', state: 'working', name: 'Kanban columns reach the bottom edge', updatedAt: now - 14 * minute,
34
34
  excerpt: 'Moving the breathing room inside each column, after its last card.',
35
35
  tickets: [ticket('AGL-141', 'Kanban gap'), ticket('AGL-83', 'Scroll-only scrollbars'), ticket('AGL-135', 'One list of all sessions')] },
36
+ { id: 'pipeline', harness: 'claude', state: 'working', name: 'Find out why the nightly release pipeline stalls after pushing the Docker image', updatedAt: now - 17 * minute,
37
+ excerpt: 'The push finishes in 40 s; the stall is the registry webhook, which retries for ten minutes.',
38
+ tickets: [ticket('OPS-19', 'Nightly pipeline stalls')] },
36
39
  { id: 'readme', harness: 'aider', state: 'working', name: 'Tidy the readme tables', updatedAt: now - 22 * minute,
37
40
  excerpt: 'Aligning the component table with the source tree.' },
38
41
  { id: 'tsbundle', harness: 'codex', state: 'failed', name: 'Upgrade tsbundle to 3.1', updatedAt: now - 41 * minute,
@@ -86,6 +89,10 @@ class DeesDemoSessionOverview extends DeesElement {
86
89
  @state() private accessor step = 0;
87
90
  @state() private accessor still = false;
88
91
  @state() private accessor notice = 'Select a session or a ticket chip.';
92
+ @state() private accessor loadRows: IHarnessSessionRow[] = [];
93
+ @state() private accessor loadOn = true;
94
+ @state() private accessor loadNotice = 'Loading until turned off. Placeholders after 200 ms; after 10 s the list says it is still loading.';
95
+ private loadTimer: ReturnType<typeof setTimeout> | undefined;
89
96
 
90
97
  public static styles = [themeDefaultStyles, demoStyles, css`
91
98
  :host { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
@@ -129,6 +136,29 @@ class DeesDemoSessionOverview extends DeesElement {
129
136
  }
130
137
  }
131
138
 
139
+ /** A first load: no rows while loading, the rows once the feed answers after `msArg`, or never. */
140
+ private load(msArg: number | undefined): void {
141
+ clearTimeout(this.loadTimer);
142
+ this.loadRows = [];
143
+ this.loadOn = true;
144
+ this.loadNotice = msArg === undefined
145
+ ? 'Loading until turned off. Placeholders after 200 ms; after 10 s the list says it is still loading.'
146
+ : `The feed answers after ${msArg} ms.${msArg < 200 ? ' Too quick for placeholders to show.' : ''}`;
147
+ if (msArg === undefined) return;
148
+ this.loadTimer = setTimeout(() => this.finishLoad(), msArg);
149
+ }
150
+
151
+ private finishLoad(): void {
152
+ clearTimeout(this.loadTimer);
153
+ this.loadRows = demoRows();
154
+ this.loadOn = false;
155
+ }
156
+
157
+ public async disconnectedCallback(): Promise<void> {
158
+ clearTimeout(this.loadTimer);
159
+ await super.disconnectedCallback();
160
+ }
161
+
132
162
  private list(rowsArg: IHarnessSessionRow[] = this.rows): unknown {
133
163
  return html`<dees-harness-session-list
134
164
  .rows=${rowsArg}
@@ -157,7 +187,7 @@ class DeesDemoSessionOverview extends DeesElement {
157
187
  <div class="frame sidebar">${this.list()}</div>
158
188
  ${demoOutput(this.notice)}
159
189
  `)}
160
- ${demoSection('Wide', 'The same list in a wide container. The latest message joins each line once the list itself is at least 720 px wide: the list measures its own container, not the window.', html`
190
+ ${demoSection('Wide', 'The same list in a wide container. The latest message joins each line once the list itself is at least 720 px wide: the list measures its own container, not the window. Every row of every group shares its columns, so all excerpts start on one edge; the name column is as wide as the longest name up to --dees-harness-session-name-max (20rem), and a longer name ends in an ellipsis with the full name in its tooltip.', html`
161
191
  <div class="frame wide">${this.list()}</div>
162
192
  `)}
163
193
  ${demoSection('Every harness in every state', 'The harness glyph is the status mark. Needs input blinks in the attention colour, working pulses slowly, failed is red, completed is muted and still. Each mark is named for assistive technology, for example “Codex · working”.', html`
@@ -167,7 +197,16 @@ class DeesDemoSessionOverview extends DeesElement {
167
197
  <div class="frame sidebar"><dees-harness-session-list data-motion .rows=${oneOfEach} .completedLimit=${4}></dees-harness-session-list></div>
168
198
  <p class="dees-demo-caption">With reduced motion set in the system, the marks keep their colours and stop moving; the button applies the same rule to this example.</p>
169
199
  `)}
170
- ${demoSection('Empty and loading', 'The list before its feed arrives, and with nothing to show.', html`
200
+ ${demoSection('Loading', 'The first load draws placeholder rows on the columns and heights of the rows that replace them, so nothing moves when the feed answers. They appear only after 200 ms, so a quick load never flashes them; after 10 s the list says it is still loading and the placeholders hold still. Rows already on show stay while more load. Assistive technology hears one loading status; the placeholders are hidden from it.', html`
201
+ <div class="toolbar">
202
+ <dees-button size="sm" .pressed=${this.loadOn} @clicked=${() => this.loadOn ? this.finishLoad() : this.load(undefined)}>Loading</dees-button>
203
+ <dees-button size="sm" type="ghost" @clicked=${() => this.load(150)}>Quick load (150 ms)</dees-button>
204
+ <dees-button size="sm" type="ghost" @clicked=${() => this.load(2000)}>Slow load (2 s)</dees-button>
205
+ </div>
206
+ <div class="frame wide"><dees-harness-session-list .rows=${this.loadRows} .loading=${this.loadOn}></dees-harness-session-list></div>
207
+ ${demoOutput(this.loadNotice)}
208
+ `)}
209
+ ${demoSection('Empty and loading', 'The list before its feed arrives, and with nothing to show. This first load never ends: after 10 s it says it is still loading.', html`
171
210
  <div class="pair">
172
211
  <div class="frame short"><dees-harness-session-list loading></dees-harness-session-list></div>
173
212
  <div class="frame short"><dees-harness-session-list></dees-harness-session-list></div>