@design.estate/dees-catalog 4.9.0 → 4.11.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.
@@ -193,6 +193,7 @@ export interface IHarnessPermissionResponseDetail {
193
193
  remember: boolean;
194
194
  request: IHarnessPermissionRequest;
195
195
  }
196
+ export type THarnessSessionCardState = 'normal' | 'working' | 'finished' | 'attention' | 'error';
196
197
  export interface IHarnessSessionMeta {
197
198
  id: string;
198
199
  title: string;
@@ -202,6 +203,12 @@ export interface IHarnessSessionMeta {
202
203
  preview?: string;
203
204
  /** Optional dees-icon name (e.g. 'lucide:Terminal') shown before the title. */
204
205
  icon?: string;
206
+ /** Visual card state. Defaults to `normal`. */
207
+ state?: THarnessSessionCardState;
208
+ /** Independent activity signal used for idle-to-working auto-expansion. */
209
+ working?: boolean;
210
+ /** Set false for pinned, non-sortable entries such as terminals. Defaults to true. */
211
+ draggable?: boolean;
205
212
  }
206
213
  /** Detail of `harness-session-context`, fired on right-click of a session item. */
207
214
  export interface IHarnessSessionContextDetail {
@@ -223,8 +230,10 @@ export interface IHarnessSessionMoveDetail {
223
230
  sessionId: string;
224
231
  /** Target group, or null for the ungrouped section. */
225
232
  groupId: string | null;
226
- /** Insertion index within the target section's current display order. */
233
+ /** Compatibility insertion index using the pre-drag order for same-section moves. */
227
234
  index: number;
235
+ /** Stable target anchor in the dragged-card-excluded order; absent means append. */
236
+ beforeSessionId?: string;
228
237
  }
229
238
  /** Detail of `harness-group-context`, fired on right-click of a group header. */
230
239
  export interface IHarnessGroupContextDetail {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "4.9.0",
3
+ "version": "4.11.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
@@ -46,17 +46,17 @@
46
46
  "devDependencies": {
47
47
  "@design.estate/dees-wcctools": "^3.9.2",
48
48
  "@git.zone/tsbuild": "^4.4.2",
49
- "@git.zone/tsbundle": "^2.11.3",
50
- "@git.zone/tstest": "^3.6.7",
49
+ "@git.zone/tsbundle": "^2.11.4",
50
+ "@git.zone/tstest": "^4.0.0",
51
51
  "@git.zone/tswatch": "^3.3.5",
52
52
  "@push.rocks/projectinfo": "^5.1.0",
53
- "@types/node": "^26.1.1"
53
+ "@types/node": "^26.1.2"
54
54
  },
55
55
  "files": [
56
56
  "ts/**/*",
57
57
  "ts_web/**/*",
58
58
  "dist/**/*",
59
- "dist_*/**/*",
59
+ "dist_bundle/**/*",
60
60
  "dist_ts/**/*",
61
61
  "dist_ts_web/**/*",
62
62
  "assets/**/*",
package/readme.md CHANGED
@@ -1861,7 +1861,9 @@ Token usage chip (`in · out · total`, `compact` shows the total only); cache r
1861
1861
 
1862
1862
  #### `DeesHarnessSessionList`
1863
1863
 
1864
- Searchable conversation list for sidebars or a `DeesModal` (`harness-session-select` on click, `harness-session-open` on double-click/Enter). Sorts by recency; filters over title, preview, and id.
1864
+ Searchable, card-based conversation column for sidebars or a `DeesModal` (`harness-session-select` on click, `harness-session-open` on double-click/Enter). Cards are collapsed by default, expose an independent accessible expansion control, and auto-expand only when an already-rendered session changes from not working to `working: true`. Selection does not affect expansion.
1865
+
1866
+ `IHarnessSessionMeta.state` accepts `normal`, `working`, `finished`, `attention`, or `error`; `working` remains an independent activity signal for expansion transitions. With `enableGrouping`, sortable cards can move within and between groups. Drag from a card's focusable grip, or use its ArrowUp, ArrowDown, Home, and End keys. Pointer dragging moves a full-card preview, opens a matching drop slot, and animates surrounding cards; `harness-session-move` includes both the compatibility `index` and a stable optional `beforeSessionId` anchor. Set `draggable: false` for pinned entries such as terminals. Pass `ungroupedSessionIds` to control the order outside groups; omitted or unknown entries fall back to recency order.
1865
1867
 
1866
1868
  ---
1867
1869
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '4.9.0',
6
+ version: '4.11.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -1,5 +1,9 @@
1
1
  import { html } from '@design.estate/dees-element';
2
- import type { IHarnessSessionMeta } from '../interfaces.js';
2
+ import type {
3
+ IHarnessSessionGroup,
4
+ IHarnessSessionMeta,
5
+ IHarnessSessionMoveDetail,
6
+ } from '../interfaces.js';
3
7
 
4
8
  const demoSessions: IHarnessSessionMeta[] = Array.from({ length: 24 }, (_, index) => ({
5
9
  id: `session-${index}`,
@@ -15,8 +19,38 @@ const demoSessions: IHarnessSessionMeta[] = Array.from({ length: 24 }, (_, index
15
19
  updatedAt: Date.now() - (index + 1) * 3_500_000,
16
20
  messageCount: 4 + (index % 9),
17
21
  preview: 'Latest: the regression test asserts the cache key stays stable across…',
22
+ state: (['normal', 'working', 'finished', 'attention', 'error'] as const)[index % 5],
23
+ working: index % 5 === 1,
18
24
  }));
19
25
 
26
+ const demoGroups: IHarnessSessionGroup[] = [
27
+ { id: 'active', name: 'Active work', sessionIds: ['session-0', 'session-1', 'session-2'] },
28
+ { id: 'review', name: 'Review', sessionIds: ['session-3', 'session-4'] },
29
+ ];
30
+
31
+ type TDemoSessionList = HTMLElement & {
32
+ groups: IHarnessSessionGroup[];
33
+ ungroupedSessionIds: string[];
34
+ };
35
+
36
+ const handleSessionMove = (event: CustomEvent<IHarnessSessionMoveDetail>): void => {
37
+ const list = event.currentTarget as TDemoSessionList;
38
+ const { sessionId, groupId, beforeSessionId } = event.detail;
39
+ const groups = list.groups.map((group) => ({
40
+ ...group,
41
+ sessionIds: group.sessionIds.filter((id) => id !== sessionId),
42
+ }));
43
+ const ungroupedSessionIds = list.ungroupedSessionIds.filter((id) => id !== sessionId);
44
+ const targetIds = groupId === null
45
+ ? ungroupedSessionIds
46
+ : groups.find((group) => group.id === groupId)?.sessionIds;
47
+ if (!targetIds) return;
48
+ const anchorIndex = beforeSessionId ? targetIds.indexOf(beforeSessionId) : -1;
49
+ targetIds.splice(anchorIndex >= 0 ? anchorIndex : targetIds.length, 0, sessionId);
50
+ list.groups = groups;
51
+ list.ungroupedSessionIds = ungroupedSessionIds;
52
+ };
53
+
20
54
  const openModal = async () => {
21
55
  const { DeesModal } = await import('../../00group-overlay/dees-modal/dees-modal.js');
22
56
  const content = document.createElement('dees-harness-session-list');
@@ -36,7 +70,7 @@ export const demoFunc = () => html`
36
70
  <style>
37
71
  .sessionDemo {
38
72
  display: grid;
39
- grid-template-rows: auto minmax(0, 1fr);
73
+ grid-template-rows: auto auto minmax(0, 1fr);
40
74
  gap: 12px;
41
75
  height: 480px;
42
76
  max-width: 420px;
@@ -46,14 +80,23 @@ export const demoFunc = () => html`
46
80
  border: 1px solid var(--dees-color-border-subtle);
47
81
  background: var(--dees-color-bg-secondary);
48
82
  }
83
+ .demoHint {
84
+ color: var(--dees-color-text-secondary);
85
+ font-size: var(--dees-font-caption1-size, 11px);
86
+ }
49
87
  .sessionDemo dees-harness-session-list { min-height: 0; }
50
88
  </style>
51
89
  <div class="sessionDemo">
52
90
  <dees-button @clicked=${openModal}>Open in a DeesModal</dees-button>
91
+ <div class="demoHint">Drag the grip to reorder conversations or move them between groups.</div>
53
92
  <dees-harness-session-list
54
93
  .sessions=${demoSessions}
94
+ .groups=${demoGroups}
95
+ .ungroupedSessionIds=${demoSessions.slice(5).map((session) => session.id)}
96
+ .enableGrouping=${true}
55
97
  selectedSessionId="session-2"
56
98
  @harness-session-select=${(event: CustomEvent) => console.log('select', event.detail.session)}
99
+ @harness-session-move=${handleSessionMove}
57
100
  ></dees-harness-session-list>
58
101
  </div>
59
102
  `;