@dungsil/dsh-plugin-ui-sidebar-inbox 0.2.1 → 0.2.2

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.
package/README.md CHANGED
@@ -4,9 +4,19 @@ DSH의 기존 사이드바 모양을 유지하면서, 프로젝트별 목록을
4
4
 
5
5
  기존 `@dungsil/dsh-plugin-sidebar-inbox`를 대체하는 패키지이며, 새 이름의 첫 버전은 `0.1.0`입니다. 기존 패키지의 모든 버전은 사용 중단(deprecated) 대상입니다. 기존 패키지를 비활성화하고 새 패키지를 설치·활성화합니다. 두 패키지를 동시에 활성화하지 마세요. 기존 정렬 선택과 이전 정렬 복원 설정은 유지됩니다.
6
6
 
7
- <img src="./assets/sidebar-preview.webp" alt="Sidebar Inbox 적용 예시: 상단의 고정·확인할 세션과 하단 Working 목록, 왼쪽은 Archived 접힘, 오른쪽은 펼침 상태" width="560" />
7
+ ### 미리보기
8
8
 
9
- DSH `0.2.2-alpha.2`의 영어 UI에서 예시 세션으로 촬영한 화면입니다. 왼쪽은 Archived가 접힌 기본 상태이고, 오른쪽은 펼친 상태입니다.
9
+ **라이트 · 영어** — 왼쪽은 Archived 접힘, 오른쪽은 펼침 상태입니다.
10
+
11
+ <img src="./assets/sidebar-preview.webp" alt="라이트 테마의 Sidebar Inbox: 상단의 고정·수신함 세션과 하단 Working 목록, 왼쪽 Archived 접힘과 오른쪽 펼침 비교" width="720" />
12
+
13
+ **다크 · 한국어** — 같은 예시 세션에서 보관됨의 접힘·펼침을 비교합니다.
14
+
15
+ <img src="./assets/sidebar-preview-dark.webp" alt="다크 테마의 한국어 Sidebar Inbox: 상단의 고정·수신함 세션과 하단 작업 중 목록, 왼쪽 보관됨 접힘과 오른쪽 펼침 비교" width="720" />
16
+
17
+ DSH `0.2.1-rc.5`의 별도 검증용 `web` 프로필에 최신 빌드한 플러그인을 활성화하고, 실제 DSH 웹 화면의 사이드바를 DPR 2로 캡처해 테마별로 나란히 배치했습니다. 한국어 화면에는 저장소의 `@dungsil/dsh-plugin-locale-ko`를 함께 활성화했습니다. 세션 제목은 두 언어 화면에서 동일한 영어 예시 데이터입니다.
18
+
19
+ 캡처 전용 서버 fixture로 예시 세션 7개를 생성했습니다. 고정 1개와 보관 2개는 DSH의 실제 고정·보관 API로 설정하고, Working 2개는 세션 목록의 실행 상태를 fixture로 제공했습니다. 실제 모델 작업을 실행한 기록은 아닙니다. 세션 필터는 `모든 대화 (보관된 세션 포함)`이며, 행·상태 아이콘·테마·접힘과 펼침은 실제 DSH 및 이 플러그인의 렌더링입니다. Pinned와 Inbox에는 별도 제목이 없는 원래 배치를 그대로 보여줍니다.
10
20
 
11
21
  ## 배치 규칙
12
22
 
Binary file
Binary file
package/dist/client.js CHANGED
@@ -123,6 +123,7 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
123
123
  archiveAnimations.get(tree)?.();
124
124
  const pane = panes.get(tree);
125
125
  if (!pane) return;
126
+ pane.stopScrolling();
126
127
  const slot = document.createElement("slot");
127
128
  slot.dataset.dshInboxNative = "";
128
129
  pane.root.replaceChildren(slot);
@@ -151,7 +152,14 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
151
152
  ::-webkit-scrollbar-thumb:hover { background-color: var(--dsh-scrollbar-thumb-hover); }
152
153
  ::-webkit-scrollbar-corner { background: transparent; }
153
154
  .main { flex: 1; }
154
- .footer { flex: none; max-block-size: 50%; }
155
+ .footer {
156
+ flex: none; max-block-size: 50%;
157
+ --dsh-scrollbar-thumb: transparent; --dsh-scrollbar-thumb-hover: transparent;
158
+ }
159
+ .footer[data-scrolling] {
160
+ --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
161
+ --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
162
+ }
155
163
  @media (prefers-reduced-motion: reduce) { .footer { transition: none !important; } }
156
164
  ::slotted(*) { display: block; }
157
165
  `;
@@ -165,12 +173,23 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
165
173
  slot.name = "dsh-inbox-footer";
166
174
  footer.append(slot);
167
175
  const notifyScroll = () => tree.dispatchEvent(new Event("scroll"));
176
+ let scrollTimeout;
177
+ const stopScrolling = () => {
178
+ clearTimeout(scrollTimeout);
179
+ delete footer.dataset.scrolling;
180
+ };
168
181
  main.addEventListener("scroll", notifyScroll);
169
- footer.addEventListener("scroll", notifyScroll);
182
+ footer.addEventListener("scroll", () => {
183
+ clearTimeout(scrollTimeout);
184
+ footer.dataset.scrolling = "";
185
+ scrollTimeout = setTimeout(stopScrolling, 150);
186
+ notifyScroll();
187
+ });
170
188
  root.replaceChildren(sheet, main, footer);
171
189
  panes.set(tree, {
172
190
  root,
173
- footer
191
+ footer,
192
+ stopScrolling
174
193
  });
175
194
  };
176
195
  const sizeFooters = () => {
@@ -352,33 +371,33 @@ function installHeadings(placements, labels, archivedCollapsible, active = () =>
352
371
  }
353
372
  };
354
373
  }
374
+ // ../../tools/ui/src/icons/activity.svg
375
+ var activity_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M3 12h4l3-8 4 16 3-8h4\"/>\n</svg>\n";
376
+ // ../../tools/ui/src/icons/check.svg
377
+ var check_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m4 13 5 5L20 6\"/>\n</svg>\n";
378
+ // ../../tools/ui/src/icons-dom.ts
379
+ /** Accepts only trusted SVG assets bundled at build time. */
380
+ function createIconGlyph(svg) {
381
+ const template = document.createElement("template");
382
+ template.innerHTML = svg;
383
+ return template.content.querySelector("svg");
384
+ }
355
385
  // src/menu.ts
386
+ /**
387
+ * Add one row to the native View Options menu without forking ui-workspace.
388
+ *
389
+ * DSH 0.2.x renders that menu from a hardcoded item list and exposes no slot,
390
+ * so the row is injected into the portaled menu DOM. The menu primitive walks
391
+ * `button[role="menuitem"]` nodes for its keyboard order, so an injected row
392
+ * joins the arrow/Tab walk for free; activation closes the menu through the
393
+ * same Escape path the primitive already handles, which also returns focus to
394
+ * the trigger. Only classes and spans are read from the native rows, so the
395
+ * injected row keeps the shipped styling without naming any hashed class.
396
+ */
356
397
  /** ui-workspace passes this CSS-module class to the View Options menu only. */
357
398
  const MENU_SELECTOR = "[role=\"menu\"][class*=\"viewOptionsMenu\"]";
358
399
  /** Marker on the injected wrapper so refreshes recognize their own node. */
359
400
  const ROW_ATTRIBUTE = "data-dsh-inbox-sort-item";
360
- const SVG_NS = "http://www.w3.org/2000/svg";
361
- /** Stroke glyph for "agent activity": a pulse line in the shipped icon grid. */
362
- const ACTIVITY_PATH = "M2.25 8.5h2.9l1.55-4.5 2.55 8 1.55-4.5h2.95";
363
- /** Fallback check glyph, used only when no selected native row exists to copy. */
364
- const CHECK_PATH = "M2.25 8.5L5.5 11.75C5.9 12.15 6.57 12.13 6.95 11.7L13.75 4";
365
- function createGlyph(path) {
366
- const svg = document.createElementNS(SVG_NS, "svg");
367
- svg.setAttribute("width", "16");
368
- svg.setAttribute("height", "16");
369
- svg.setAttribute("viewBox", "0 0 16 16");
370
- svg.setAttribute("fill", "none");
371
- svg.setAttribute("xmlns", SVG_NS);
372
- svg.setAttribute("aria-hidden", "true");
373
- const line = document.createElementNS(SVG_NS, "path");
374
- line.setAttribute("d", path);
375
- line.setAttribute("stroke", "currentColor");
376
- line.setAttribute("stroke-width", "1");
377
- line.setAttribute("stroke-linecap", "round");
378
- line.setAttribute("stroke-linejoin", "round");
379
- svg.append(line);
380
- return svg;
381
- }
382
401
  /** A native row wraps one `role="menuitem"` button, optionally after a group separator. */
383
402
  function isMenuRow(node) {
384
403
  return node.tagName === "DIV" && [...node.children].some((child) => child.tagName === "BUTTON" && child.getAttribute("role") === "menuitem");
@@ -423,7 +442,7 @@ function buildRow(anchor, options) {
423
442
  if (iconTemplate !== void 0) {
424
443
  const icon = document.createElement("span");
425
444
  icon.className = iconTemplate.className;
426
- icon.append(createGlyph(ACTIVITY_PATH));
445
+ icon.append(createIconGlyph(activity_default));
427
446
  button.append(icon);
428
447
  }
429
448
  const labelTemplate = [...template.children].find((child) => child.tagName === "SPAN" && child.querySelector("svg") === null && !child.hasAttribute("aria-hidden"));
@@ -456,7 +475,7 @@ function closeMenu() {
456
475
  }
457
476
  function syncCheck(button, active, check) {
458
477
  const existing = [...button.children].find((child) => child.tagName === "svg");
459
- if (active && existing === void 0) button.append(check === null ? createGlyph(CHECK_PATH) : check.cloneNode(true));
478
+ if (active && existing === void 0) button.append(check === null ? createIconGlyph(check_default) : check.cloneNode(true));
460
479
  else if (!active && existing !== void 0) existing.remove();
461
480
  if (active) button.setAttribute("aria-current", "true");
462
481
  else button.removeAttribute("aria-current");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dungsil/dsh-plugin-ui-sidebar-inbox",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "State-based Inbox, Working and Archived sidebar ordering for DeepSeek Harness, selected from a native Agent activity sort option.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "locale",
13
+ "assets",
13
14
  "cordis.patch.yml"
14
15
  ],
15
16
  "type": "module",
@@ -28,7 +29,6 @@
28
29
  "@deepseek-ai/dsh-api-workspace-controller": "0.2.1-rc.5",
29
30
  "@deepseek-ai/dsh-client-locale": "0.2.1-rc.5",
30
31
  "@deepseek-ai/dsh-client-store": "0.2.1-rc.5",
31
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.5",
32
32
  "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.5",
33
33
  "@deepseek-ai/dsh-client-ui-session": "0.2.1-rc.5",
34
34
  "@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-rc.5",
@@ -36,9 +36,10 @@
36
36
  "@deepseek-ai/dsh-client-ui-workspace": "0.2.1-rc.5",
37
37
  "@deepseek-ai/dsh-session": "0.2.1-rc.5",
38
38
  "@dungsil/dsh-tsconfig": "0.0.0",
39
+ "@dungsil/dsh-tsdown": "0.0.0",
40
+ "@dungsil/dsh-ui": "0.0.0",
39
41
  "@types/react": "18.3.18",
40
42
  "@types/react-dom": "18.3.7",
41
- "happy-dom": "21.0.4",
42
43
  "react": "18.3.1",
43
44
  "react-dom": "18.3.1",
44
45
  "tsdown": "0.23.4"
@@ -84,7 +85,6 @@
84
85
  },
85
86
  "scripts": {
86
87
  "build": "tsdown",
87
- "typecheck": "tsc --noEmit",
88
- "test": "node --test test/*.test.mjs"
88
+ "typecheck": "tsc --noEmit"
89
89
  }
90
90
  }