@banzhe/dsh-workbench 0.2.0 → 0.3.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.
package/lib/client.js CHANGED
@@ -1821,114 +1821,6 @@ window.__ModuleLoader__.load({
1821
1821
  if (leftPinned !== rightPinned) return leftPinned - rightPinned;
1822
1822
  return right.updatedAt - left.updatedAt;
1823
1823
  }
1824
- function childIndexOf(byId) {
1825
- const byParent = /* @__PURE__ */ new Map();
1826
- for (const id of idsOf(byId)) {
1827
- const row = byId[id];
1828
- if (row?.parentId === void 0) continue;
1829
- const siblings = byParent.get(row.parentId);
1830
- if (siblings === void 0) byParent.set(row.parentId, [row]);
1831
- else siblings.push(row);
1832
- }
1833
- return {
1834
- byId,
1835
- byParent
1836
- };
1837
- }
1838
- /**
1839
- * The direct subagent children of one node: the node's own `subagentCatalog`
1840
- * projection order first, then indexed `byId` rows the catalog has not caught up
1841
- * with. A catalog entry with no row here, another `parentId`, or a non-subagent
1842
- * origin is ignored, exactly like a foreign row in the index.
1843
- */
1844
- function directChildrenOf(parent, ctx) {
1845
- const seen = /* @__PURE__ */ new Set();
1846
- const ordered = [];
1847
- for (const entry of ctx.list.projectionsBySession[parent]?.values.subagentCatalog ?? []) {
1848
- const row = ctx.index.byId[entry.id];
1849
- if (row === void 0 || row.parentId !== parent || seen.has(entry.id)) continue;
1850
- seen.add(entry.id);
1851
- ordered.push(row);
1852
- }
1853
- for (const row of ctx.index.byParent.get(parent) ?? []) {
1854
- if (seen.has(row.id)) continue;
1855
- seen.add(row.id);
1856
- ordered.push(row);
1857
- }
1858
- return ordered.filter((row) => row.origin === "subagent");
1859
- }
1860
- /**
1861
- * The node one row contributes, from its own run and its already-assembled
1862
- * children: a running row keeps its title and children, an idle row over running
1863
- * work becomes a container, and a row with neither is not part of the subtree.
1864
- */
1865
- function subtreeNode(row, running, children) {
1866
- if (!running) return children.length === 0 ? void 0 : {
1867
- id: row.id,
1868
- title: row.displayTitle,
1869
- container: true,
1870
- children
1871
- };
1872
- return {
1873
- id: row.id,
1874
- title: row.displayTitle,
1875
- ...children.length === 0 ? {} : { children }
1876
- };
1877
- }
1878
- /**
1879
- * The mounted subtree of one listed Session: every descendant running, or
1880
- * carrying running work below it, nested one level per delegation hop.
1881
- *
1882
- * Two lineage facts make this walk terminate without a visited set. A row carries
1883
- * at most one `parentId`, so the child edges — built once in `byParent` for the
1884
- * whole fold — form a functional graph; and only a row whose `origin` is
1885
- * `subagent` is ever a child. Every node of a cycle would therefore have to be
1886
- * `subagent` (each one is somebody's child) while taking its parent from inside
1887
- * the cycle, so no listed root — which is non-subagent by construction — can be
1888
- * an ancestor of one. An endless dataset would have to break the unique-parent
1889
- * rule to reach this fold.
1890
- *
1891
- * The walk is an explicit stack rather than recursion for the reason
1892
- * `runningDescendantCounts` in tree.ts is: a delegation chain of a few thousand
1893
- * hops is legal input, and the JavaScript call stack is not that deep. Frames are
1894
- * assembled post-order, so a parent is built only after every child below it,
1895
- * and children keep `directChildrenOf` order.
1896
- * @param root - the listed Session whose subtree to expand.
1897
- * @param ctx - this fold's list, child index and status map.
1898
- * @returns the nested node, or `undefined` when neither `root` nor anything below it runs.
1899
- */
1900
- function runningSubtreeOf(root, ctx) {
1901
- const built = /* @__PURE__ */ new Map();
1902
- const frames = [{
1903
- row: root,
1904
- kids: directChildrenOf(root.id, ctx),
1905
- next: 0
1906
- }];
1907
- while (frames.length > 0) {
1908
- const frame = frames[frames.length - 1];
1909
- if (frame.next < frame.kids.length) {
1910
- const kid = frame.kids[frame.next];
1911
- frame.next += 1;
1912
- frames.push({
1913
- row: kid,
1914
- kids: directChildrenOf(kid.id, ctx),
1915
- next: 0
1916
- });
1917
- continue;
1918
- }
1919
- frames.pop();
1920
- const children = [];
1921
- for (const kid of frame.kids) {
1922
- const node = built.get(kid.id);
1923
- if (node !== void 0) children.push(node);
1924
- }
1925
- built.set(frame.row.id, subtreeNode(frame.row, sessionIsRunning(ctx.list, ctx.status, frame.row.id), children));
1926
- }
1927
- return built.get(root.id);
1928
- }
1929
- function idsOf(byId) {
1930
- return Object.keys(byId);
1931
- }
1932
1824
  /**
1933
1825
  * Fold one list snapshot, one status snapshot, and the archive and pin sets into
1934
1826
  * the region's content.
@@ -1942,25 +1834,21 @@ window.__ModuleLoader__.load({
1942
1834
  const running = [];
1943
1835
  const unread = [];
1944
1836
  const blocked = /* @__PURE__ */ new Set();
1945
- const ctx = {
1946
- list,
1947
- index: childIndexOf(list.byId),
1948
- status
1949
- };
1837
+ const descendants = runningDescendantCounts(list, status);
1950
1838
  list.ids.forEach((id) => {
1951
1839
  const row = list.byId[id];
1952
1840
  if (row === void 0) return;
1953
1841
  if (row.origin === "subagent" || row.blank || archived.has(id)) return;
1954
1842
  const entry = status.get(id);
1955
1843
  const isPinned = pinned.has(id);
1956
- const node = runningSubtreeOf(row, ctx);
1957
- if (node !== void 0) {
1844
+ if (sessionIsRunning(list, status, id) || (descendants.get(id) ?? 0) > 0) {
1958
1845
  running.push({
1959
1846
  updatedAt: row.updatedAt,
1960
- row: isPinned ? {
1961
- ...node,
1962
- pinned: true
1963
- } : node
1847
+ row: {
1848
+ id,
1849
+ title: row.displayTitle,
1850
+ ...isPinned ? { pinned: true } : {}
1851
+ }
1964
1852
  });
1965
1853
  if (entry?.pendingInteraction !== void 0) blocked.add(id);
1966
1854
  return;
@@ -1999,17 +1887,16 @@ window.__ModuleLoader__.load({
1999
1887
  };
2000
1888
  }
2001
1889
  /**
2002
- * One row's comparable identity: everything the row renders plus its subtree, in
2003
- * order. Two models with equal keys draw the same pixels, which is what lets the
2004
- * store publish a fold only when something visible changed.
1890
+ * One row's comparable identity: everything the row renders. Two models with equal
1891
+ * keys draw the same pixels, which is what lets the store publish a fold only when
1892
+ * something visible changed.
2005
1893
  */
2006
1894
  function rowKey(row) {
2007
1895
  return [
2008
1896
  row.id,
2009
1897
  row.title,
2010
1898
  row.container ? "c" : "",
2011
- row.pinned ? "p" : "",
2012
- row.children === void 0 ? "" : row.children.map(rowKey).join("")
1899
+ row.pinned ? "p" : ""
2013
1900
  ].join("");
2014
1901
  }
2015
1902
  function rowsKey(rows) {
@@ -2067,6 +1954,71 @@ window.__ModuleLoader__.load({
2067
1954
  };
2068
1955
  }
2069
1956
  //#endregion
1957
+ //#region src/client/attention/taskbar.ts
1958
+ /** Progress value Electron treats as the Windows indeterminate pulse. */
1959
+ const PULSE = 2;
1960
+ /** Progress value that removes the taskbar indicator. */
1961
+ const CLEAR = -1;
1962
+ /**
1963
+ * Read the shell's taskbar-progress write, or undefined when this page cannot use
1964
+ * it. Absence is the version probe, so the plugin never compares protocol
1965
+ * versions; the caller swallows the rejection a refused IPC produces.
1966
+ * @returns the bridge's write, or undefined when this page has none.
1967
+ */
1968
+ function desktopWindowProgress() {
1969
+ const setProgressBar = globalThis.dshDesktop?.window?.setProgressBar;
1970
+ return typeof setProgressBar === "function" ? setProgressBar : void 0;
1971
+ }
1972
+ /**
1973
+ * Whether the current content earns the taskbar pulse: work is in flight, and
1974
+ * nothing is blocked on the user or finished-unread. A Session listed only
1975
+ * because it is pinned sits in the unread group at rest, so it never pulses on
1976
+ * its own.
1977
+ * @param model - the current In work content.
1978
+ * @returns true when the Windows progress bar should run indeterminate.
1979
+ */
1980
+ function shouldPulseTaskbar(model) {
1981
+ return model.running.length > 0 && model.waiting.length === 0 && model.unread.length === 0;
1982
+ }
1983
+ /**
1984
+ * One write per pulse/clear transition. A repeated state is a no-op, so an
1985
+ * unrelated list update does not re-issue the same platform call.
1986
+ */
1987
+ var TaskbarProgressPresenter = class {
1988
+ write;
1989
+ pulsing;
1990
+ constructor() {
1991
+ this.write = desktopWindowProgress();
1992
+ }
1993
+ /** The page can reach the shell's taskbar-progress write. */
1994
+ get viable() {
1995
+ return this.write !== void 0;
1996
+ }
1997
+ /**
1998
+ * Project one model onto the taskbar, writing only when the state changes.
1999
+ * @param model - the current In work content.
2000
+ */
2001
+ project(model) {
2002
+ const next = shouldPulseTaskbar(model);
2003
+ if (this.pulsing === next) return;
2004
+ this.pulsing = next;
2005
+ this.apply(next ? PULSE : CLEAR);
2006
+ }
2007
+ /** Retract the pulse so a disposed plugin leaves no stale indicator. */
2008
+ clear() {
2009
+ const wasPulsing = this.pulsing === true;
2010
+ this.pulsing = void 0;
2011
+ if (wasPulsing) this.apply(CLEAR);
2012
+ }
2013
+ apply(progress) {
2014
+ const write = this.write;
2015
+ if (write === void 0) return;
2016
+ write(progress).catch((error) => {
2017
+ console.warn("ui-workspace: the shell refused the taskbar progress", error);
2018
+ });
2019
+ }
2020
+ };
2021
+ //#endregion
2070
2022
  //#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
2071
2023
  function r(e) {
2072
2024
  var t, f, n = "";
@@ -2093,51 +2045,51 @@ window.__ModuleLoader__.load({
2093
2045
  document.head.appendChild(tag);
2094
2046
  }
2095
2047
  var WorkspaceBrowser_module_css_default = {
2096
- "listArea": "hlvKNa_listArea",
2097
- "treeBody": "hlvKNa_treeBody",
2098
- "flatList": "hlvKNa_flatList",
2099
- "searchButton": "hlvKNa_searchButton",
2100
- "searchTree": "hlvKNa_searchTree",
2101
- "wide-in": "hlvKNa_wide-in",
2102
- "skeletonBar": "hlvKNa_skeletonBar",
2103
2048
  "searchExpanded": "hlvKNa_searchExpanded",
2104
- "searchSlotExpanded": "hlvKNa_searchSlotExpanded",
2105
- "listTopDropActive": "hlvKNa_listTopDropActive",
2106
- "headerActionsHidden": "hlvKNa_headerActionsHidden",
2107
- "searchInput": "hlvKNa_searchInput",
2108
- "wide": "hlvKNa_wide",
2109
- "deleteStatus": "hlvKNa_deleteStatus",
2110
- "viewOptionsMenu": "hlvKNa_viewOptionsMenu",
2111
- "groupSection": "hlvKNa_groupSection",
2112
- "skeletonDot": "hlvKNa_skeletonDot",
2113
2049
  "root": "hlvKNa_root",
2114
- "skeletonBars": "hlvKNa_skeletonBars",
2115
- "archiveActivity": "hlvKNa_archiveActivity",
2116
- "renameError": "hlvKNa_renameError",
2117
- "sectionHeader": "hlvKNa_sectionHeader",
2118
- "searchSpacingMotion": "hlvKNa_searchSpacingMotion",
2119
- "headerActions": "hlvKNa_headerActions",
2120
2050
  "clearButton": "hlvKNa_clearButton",
2051
+ "searchSpacingMotion": "hlvKNa_searchSpacingMotion",
2052
+ "searchInput": "hlvKNa_searchInput",
2053
+ "workspaceDropBefore": "hlvKNa_workspaceDropBefore",
2121
2054
  "list": "hlvKNa_list",
2122
- "searchStatus": "hlvKNa_searchStatus",
2123
- "search": "hlvKNa_search",
2055
+ "iconButton": "hlvKNa_iconButton",
2056
+ "viewOptionsMenu": "hlvKNa_viewOptionsMenu",
2057
+ "wide": "hlvKNa_wide",
2058
+ "skeletonBar": "hlvKNa_skeletonBar",
2059
+ "rail": "hlvKNa_rail",
2124
2060
  "sectionLabelHidden": "hlvKNa_sectionLabelHidden",
2061
+ "skeletonBars": "hlvKNa_skeletonBars",
2062
+ "skeletonRow": "hlvKNa_skeletonRow",
2063
+ "wide-in": "hlvKNa_wide-in",
2064
+ "search-skeleton": "hlvKNa_search-skeleton",
2065
+ "empty": "hlvKNa_empty",
2066
+ "searchButton": "hlvKNa_searchButton",
2067
+ "sectionHeader": "hlvKNa_sectionHeader",
2068
+ "searchSlot": "hlvKNa_searchSlot",
2125
2069
  "skeletonBarWide": "hlvKNa_skeletonBarWide",
2126
- "emptyState": "hlvKNa_emptyState",
2127
2070
  "emptyAction": "hlvKNa_emptyAction",
2071
+ "skeletonDot": "hlvKNa_skeletonDot",
2072
+ "deleteStatus": "hlvKNa_deleteStatus",
2073
+ "listTopDropIndicator": "hlvKNa_listTopDropIndicator",
2074
+ "searchStatus": "hlvKNa_searchStatus",
2128
2075
  "renameInput": "hlvKNa_renameInput",
2129
- "deleteAction": "hlvKNa_deleteAction",
2130
2076
  "sectionLabel": "hlvKNa_sectionLabel",
2131
- "search-skeleton": "hlvKNa_search-skeleton",
2132
- "skeletonRow": "hlvKNa_skeletonRow",
2133
- "rail": "hlvKNa_rail",
2134
- "workspaceDropBefore": "hlvKNa_workspaceDropBefore",
2135
- "listTopDropIndicator": "hlvKNa_listTopDropIndicator",
2136
- "empty": "hlvKNa_empty",
2137
- "iconButton": "hlvKNa_iconButton",
2138
- "searchSlot": "hlvKNa_searchSlot",
2077
+ "flatList": "hlvKNa_flatList",
2078
+ "workspaceDropAfter": "hlvKNa_workspaceDropAfter",
2079
+ "headerActionsHidden": "hlvKNa_headerActionsHidden",
2080
+ "deleteAction": "hlvKNa_deleteAction",
2081
+ "groupSection": "hlvKNa_groupSection",
2082
+ "listArea": "hlvKNa_listArea",
2139
2083
  "sessionOverflowButton": "hlvKNa_sessionOverflowButton",
2140
- "workspaceDropAfter": "hlvKNa_workspaceDropAfter"
2084
+ "searchSlotExpanded": "hlvKNa_searchSlotExpanded",
2085
+ "listTopDropActive": "hlvKNa_listTopDropActive",
2086
+ "treeBody": "hlvKNa_treeBody",
2087
+ "renameError": "hlvKNa_renameError",
2088
+ "searchTree": "hlvKNa_searchTree",
2089
+ "headerActions": "hlvKNa_headerActions",
2090
+ "archiveActivity": "hlvKNa_archiveActivity",
2091
+ "search": "hlvKNa_search",
2092
+ "emptyState": "hlvKNa_emptyState"
2141
2093
  };
2142
2094
  //#endregion
2143
2095
  //#region src/client/rows/WorkspaceDialogs.tsx
@@ -2309,47 +2261,47 @@ window.__ModuleLoader__.load({
2309
2261
  document.head.appendChild(tag);
2310
2262
  }
2311
2263
  var Rows_module_css_default = {
2312
- "searchResultWorkspace": "Nlsn7q_searchResultWorkspace",
2313
- "archived": "Nlsn7q_archived",
2314
- "arrowOpen": "Nlsn7q_arrowOpen",
2315
- "hoverStatus": "Nlsn7q_hoverStatus",
2264
+ "hoverPath": "Nlsn7q_hoverPath",
2265
+ "sessionRow": "Nlsn7q_sessionRow",
2266
+ "menuOpen": "Nlsn7q_menuOpen",
2267
+ "hoverArchived": "Nlsn7q_hoverArchived",
2316
2268
  "rowQuickActions": "Nlsn7q_rowQuickActions",
2317
- "rowActions": "Nlsn7q_rowActions",
2318
2269
  "dragPreview": "Nlsn7q_dragPreview",
2319
- "rowResting": "Nlsn7q_rowResting",
2320
- "pinnedAction": "Nlsn7q_pinnedAction",
2321
- "renameInput": "Nlsn7q_renameInput",
2322
- "hoverArchived": "Nlsn7q_hoverArchived",
2323
- "searchResultHeading": "Nlsn7q_searchResultHeading",
2324
2270
  "arrow": "Nlsn7q_arrow",
2325
- "timestamp": "Nlsn7q_timestamp",
2326
- "searchResultSnippet": "Nlsn7q_searchResultSnippet",
2327
- "pinIndicator": "Nlsn7q_pinIndicator",
2328
- "visuallyHidden": "Nlsn7q_visuallyHidden",
2329
- "searchResultRow": "Nlsn7q_searchResultRow",
2271
+ "dropBefore": "Nlsn7q_dropBefore",
2272
+ "searchResultHeading": "Nlsn7q_searchResultHeading",
2330
2273
  "projectRow": "Nlsn7q_projectRow",
2274
+ "searchResultRow": "Nlsn7q_searchResultRow",
2331
2275
  "title": "Nlsn7q_title",
2332
- "chevron": "Nlsn7q_chevron",
2333
2276
  "folderActive": "Nlsn7q_folderActive",
2334
- "searchResultMeta": "Nlsn7q_searchResultMeta",
2335
- "hoverTime": "Nlsn7q_hoverTime",
2336
- "dropBefore": "Nlsn7q_dropBefore",
2337
- "searchResultTitle": "Nlsn7q_searchResultTitle",
2338
- "selected": "Nlsn7q_selected",
2339
- "folder": "Nlsn7q_folder",
2340
- "sessionRow": "Nlsn7q_sessionRow",
2341
2277
  "dot": "Nlsn7q_dot",
2342
- "slot": "Nlsn7q_slot",
2343
- "menuOpen": "Nlsn7q_menuOpen",
2344
- "hoverTitle": "Nlsn7q_hoverTitle",
2345
- "dropAfter": "Nlsn7q_dropAfter",
2346
- "time": "Nlsn7q_time",
2347
- "hoverPath": "Nlsn7q_hoverPath",
2348
2278
  "hoverContent": "Nlsn7q_hoverContent",
2279
+ "hoverStatus": "Nlsn7q_hoverStatus",
2280
+ "searchResultTitle": "Nlsn7q_searchResultTitle",
2281
+ "rowActions": "Nlsn7q_rowActions",
2282
+ "chevron": "Nlsn7q_chevron",
2283
+ "dropAfter": "Nlsn7q_dropAfter",
2284
+ "arrowOpen": "Nlsn7q_arrowOpen",
2285
+ "slot": "Nlsn7q_slot",
2286
+ "folder": "Nlsn7q_folder",
2287
+ "searchResultWorkspace": "Nlsn7q_searchResultWorkspace",
2288
+ "selected": "Nlsn7q_selected",
2289
+ "pinIndicator": "Nlsn7q_pinIndicator",
2349
2290
  "projectText": "Nlsn7q_projectText",
2350
2291
  "folderActivity": "Nlsn7q_folderActivity",
2292
+ "renameInput": "Nlsn7q_renameInput",
2293
+ "searchResultSnippet": "Nlsn7q_searchResultSnippet",
2294
+ "rowResting": "Nlsn7q_rowResting",
2295
+ "pinnedAction": "Nlsn7q_pinnedAction",
2296
+ "hoverTime": "Nlsn7q_hoverTime",
2297
+ "time": "Nlsn7q_time",
2298
+ "searchResultMeta": "Nlsn7q_searchResultMeta",
2299
+ "iconButton": "Nlsn7q_iconButton",
2300
+ "visuallyHidden": "Nlsn7q_visuallyHidden",
2351
2301
  "meta": "Nlsn7q_meta",
2352
- "iconButton": "Nlsn7q_iconButton"
2302
+ "timestamp": "Nlsn7q_timestamp",
2303
+ "archived": "Nlsn7q_archived",
2304
+ "hoverTitle": "Nlsn7q_hoverTitle"
2353
2305
  };
2354
2306
  //#endregion
2355
2307
  //#region src/client/rows/Rows.tsx
@@ -3078,11 +3030,11 @@ window.__ModuleLoader__.load({
3078
3030
  }
3079
3031
  var WorkspacePicker_module_css_default = {
3080
3032
  "menuStatus": "_i1QeG_menuStatus",
3033
+ "title": "_i1QeG_title",
3034
+ "modalAction": "_i1QeG_modalAction",
3081
3035
  "disambiguated": "_i1QeG_disambiguated",
3082
3036
  "modalError": "_i1QeG_modalError",
3083
- "modalAction": "_i1QeG_modalAction",
3084
- "pathSuffix": "_i1QeG_pathSuffix",
3085
- "title": "_i1QeG_title"
3037
+ "pathSuffix": "_i1QeG_pathSuffix"
3086
3038
  };
3087
3039
  //#endregion
3088
3040
  //#region src/client/WorkspacePicker.tsx
@@ -3275,7 +3227,7 @@ window.__ModuleLoader__.load({
3275
3227
  }
3276
3228
  //#endregion
3277
3229
  //#region \0dsh-css-module:/home/runner/work/dsh-plugins/dsh-plugins/plugins/workbench/src/client/attention/AttentionSection.module.css.mjs
3278
- const css = ".iFQc1W_section{border-bottom:.5px solid var(--dsw-alias-border-l4);flex-direction:column;gap:2px;margin-bottom:4px;padding:2px 0 6px;display:flex}.iFQc1W_groupHeader:focus-visible,.iFQc1W_row:focus-visible,.iFQc1W_unpin:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.iFQc1W_group{flex-direction:column;display:flex}.iFQc1W_groupHeader{border-radius:var(--dsw-radius-sm);width:100%;height:24px;color:var(--dsw-alias-label-tertiary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:0 6px;font-size:11px;font-weight:500;display:flex}.iFQc1W_groupHeader:hover{background:var(--dsw-alias-interactive-bg-hover)}.iFQc1W_chevron{color:var(--dsw-alias-label-tertiary);align-items:center;display:inline-flex}.iFQc1W_groupLabel{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.iFQc1W_groupCount{min-width:14px;color:var(--dsw-alias-label-tertiary);text-align:center;flex:none;font-size:10px}.iFQc1W_groupBody{flex-direction:column;gap:1px;display:flex}.iFQc1W_list{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex}.iFQc1W_item{flex-direction:column;display:flex}.iFQc1W_rowWrap{align-items:center;gap:2px;display:flex}.iFQc1W_row{border-radius:var(--dsw-radius-sm);min-width:0;height:26px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;gap:6px;padding:0 6px 0 24px;font-size:12px;display:flex}.iFQc1W_row:hover{background:var(--dsw-alias-interactive-bg-hover)}.iFQc1W_dot{flex:none;align-items:center;display:inline-flex}.iFQc1W_title{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.iFQc1W_unpin{border-radius:var(--dsw-radius-sm);width:20px;height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;margin-right:4px;padding:0;display:inline-flex}.iFQc1W_unpin:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}";
3230
+ const css = ".iFQc1W_section{border-bottom:.5px solid var(--dsw-alias-border-l4);flex-direction:column;gap:2px;margin-bottom:4px;padding:2px 0 6px;display:flex}.iFQc1W_group,.iFQc1W_groupBody{flex-direction:column;display:flex}.iFQc1W_list{flex-direction:column;gap:2px;margin:0;padding:0;list-style:none;display:flex}.iFQc1W_groupHeader{width:100%}.iFQc1W_groupHeader:focus-visible,.iFQc1W_rowButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.iFQc1W_groupHeader,.iFQc1W_rowButton{font:inherit;text-align:left;appearance:none;background-color:#0000}.iFQc1W_groupHeader{border-block:0}.iFQc1W_rowButton{color:inherit;min-width:0;cursor:inherit;border:0;flex:1;align-items:center;padding:0;display:flex}";
3279
3231
  const tagId = "@banzhe/dsh-workbench/AttentionSection.module.css";
3280
3232
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
3281
3233
  const tag = document.createElement("style");
@@ -3285,20 +3237,12 @@ window.__ModuleLoader__.load({
3285
3237
  document.head.appendChild(tag);
3286
3238
  }
3287
3239
  var AttentionSection_module_css_default = {
3288
- "list": "iFQc1W_list",
3289
- "item": "iFQc1W_item",
3290
- "rowWrap": "iFQc1W_rowWrap",
3240
+ "rowButton": "iFQc1W_rowButton",
3241
+ "section": "iFQc1W_section",
3291
3242
  "group": "iFQc1W_group",
3292
- "groupLabel": "iFQc1W_groupLabel",
3293
3243
  "groupBody": "iFQc1W_groupBody",
3294
- "section": "iFQc1W_section",
3295
- "dot": "iFQc1W_dot",
3296
- "title": "iFQc1W_title",
3297
- "chevron": "iFQc1W_chevron",
3298
- "groupHeader": "iFQc1W_groupHeader",
3299
- "row": "iFQc1W_row",
3300
- "unpin": "iFQc1W_unpin",
3301
- "groupCount": "iFQc1W_groupCount"
3244
+ "list": "iFQc1W_list",
3245
+ "groupHeader": "iFQc1W_groupHeader"
3302
3246
  };
3303
3247
  //#endregion
3304
3248
  //#region src/client/attention/AttentionSection.tsx
@@ -3313,11 +3257,17 @@ window.__ModuleLoader__.load({
3313
3257
  * make), which selects the Session as the main view and lets ui-session clear its
3314
3258
  * unread flag; releasing a pin is the same Host call the sidebar's row action
3315
3259
  * issues, behind the same access gate.
3260
+ *
3261
+ * Headers and rows are the browsing list's own boxes: their classes come from
3262
+ * rows/Rows.module.css, so a Session here measures, paints and aligns exactly like
3263
+ * the same Session in the list below — including the leading 16x20 cell, the
3264
+ * trailing resting cell that carries the pinned mark, and the hover action strip
3265
+ * that holds the release control.
3316
3266
  */
3317
3267
  /**
3318
- * The dot one row draws, or none. A container row stands for work below it, so it
3319
- * carries no state of its own; a turn blocked on the user outranks the group's own
3320
- * state; a running row spins and an unread row is done.
3268
+ * The dot one row draws, or none. A pinned Session at rest has no live work to
3269
+ * show; a turn blocked on the user outranks the group's own state; a running row
3270
+ * spins and an unread row is done.
3321
3271
  */
3322
3272
  function dotStateOf(group, row, waiting) {
3323
3273
  if (row.container === true) return void 0;
@@ -3325,83 +3275,95 @@ window.__ModuleLoader__.load({
3325
3275
  return group === "running" ? "ongoing" : "done";
3326
3276
  }
3327
3277
  /**
3328
- * The release control for one pinned row, rendered only where the Session's
3329
- * access snapshot allows the toggle — the same gate the row's pin button uses, so
3330
- * a refused Session never shows a button that can only fail.
3331
- * @param props - the Session, the Host action, the label, and the access Hook.
3332
- * @returns the button, or null when the toggle is not allowed here.
3278
+ * One row in a fold: the list's own row box, its click target, the resting mark a
3279
+ * pinned Session carries at rest, and the hover action strip that releases the
3280
+ * pin. The access gate is asked once per row — the same gate the list row's pin
3281
+ * button uses — so a refused Session keeps its resting mark and never renders an
3282
+ * empty action strip.
3283
+ * @param props - the Session, its group, the callbacks it needs, and the gate.
3284
+ * @returns the row item.
3333
3285
  */
3334
- function UnpinControl({ sessionId, unpin, label, useSessionAccess }) {
3335
- if (!useSessionAccess(sessionId, "workspace/unpinSession")) return null;
3336
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3337
- type: "button",
3338
- className: AttentionSection_module_css_default.unpin,
3339
- title: label,
3340
- "aria-label": label,
3341
- onClick: () => {
3342
- unpin(sessionId);
3343
- },
3344
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPinOutlineRegular, { size: 12 })
3345
- });
3286
+ function AttentionRowItem({ row, group, waiting, open, unpin, label, unpinLabel, unpinTitle, useSessionAccess }) {
3287
+ const canUnpin = useSessionAccess(row.id, "workspace/unpinSession");
3288
+ const pinned = row.pinned === true;
3289
+ const dot = dotStateOf(group, row, waiting);
3290
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3291
+ className: Rows_module_css_default.sessionRow,
3292
+ children: [
3293
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3294
+ type: "button",
3295
+ className: AttentionSection_module_css_default.rowButton,
3296
+ "aria-label": label(row.title, pinned),
3297
+ onClick: () => {
3298
+ open(row.id);
3299
+ },
3300
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3301
+ className: Rows_module_css_default.slot,
3302
+ children: dot !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
3303
+ state: dot,
3304
+ size: 7
3305
+ })
3306
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3307
+ className: Rows_module_css_default.title,
3308
+ children: row.title
3309
+ })]
3310
+ }),
3311
+ pinned && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3312
+ className: Rows_module_css_default.rowResting,
3313
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3314
+ className: Rows_module_css_default.pinIndicator,
3315
+ "aria-hidden": "true",
3316
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPinFillRegular, { size: 14 })
3317
+ })
3318
+ }),
3319
+ pinned && canUnpin && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3320
+ className: Rows_module_css_default.rowActions,
3321
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
3322
+ label: unpinTitle,
3323
+ side: "bottom",
3324
+ align: "end",
3325
+ delayMs: 500,
3326
+ portal: true,
3327
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3328
+ type: "button",
3329
+ className: clsx(Rows_module_css_default.iconButton, Rows_module_css_default.pinnedAction),
3330
+ "aria-label": unpinLabel,
3331
+ onClick: () => {
3332
+ unpin(row.id);
3333
+ },
3334
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPinFillRegular, { size: 14 })
3335
+ })
3336
+ })
3337
+ })
3338
+ ]
3339
+ }) });
3346
3340
  }
3347
3341
  /**
3348
- * Rows of one group, nested one level per delegation hop.
3342
+ * One group's rows, each a Session the fold listed.
3349
3343
  * @param props - the rows, the group they belong to, and the callbacks they need.
3350
3344
  * @returns the group's list.
3351
3345
  */
3352
- function Rows({ rows, group, waiting, open, unpin, label, unpinLabel, useSessionAccess }) {
3346
+ function Rows({ rows, group, waiting, open, unpin, label, unpinLabel, unpinTitle, useSessionAccess }) {
3353
3347
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
3354
3348
  className: AttentionSection_module_css_default.list,
3355
- children: rows.map((row) => {
3356
- const dot = dotStateOf(group, row, waiting);
3357
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
3358
- className: AttentionSection_module_css_default.item,
3359
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3360
- className: AttentionSection_module_css_default.rowWrap,
3361
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3362
- type: "button",
3363
- className: AttentionSection_module_css_default.row,
3364
- "aria-label": label(row.title, row.pinned === true),
3365
- onClick: () => {
3366
- open(row.id);
3367
- },
3368
- children: [dot !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3369
- className: AttentionSection_module_css_default.dot,
3370
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
3371
- state: dot,
3372
- size: 10
3373
- })
3374
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3375
- className: AttentionSection_module_css_default.title,
3376
- children: row.title
3377
- })]
3378
- }), row.pinned === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnpinControl, {
3379
- sessionId: row.id,
3380
- unpin,
3381
- label: unpinLabel,
3382
- useSessionAccess
3383
- })]
3384
- }), row.children !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3385
- className: AttentionSection_module_css_default.children,
3386
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Rows, {
3387
- rows: row.children,
3388
- group,
3389
- waiting,
3390
- open,
3391
- unpin,
3392
- label,
3393
- unpinLabel,
3394
- useSessionAccess
3395
- })
3396
- })]
3397
- }, row.id);
3398
- })
3349
+ children: rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AttentionRowItem, {
3350
+ row,
3351
+ group,
3352
+ waiting,
3353
+ open,
3354
+ unpin,
3355
+ label,
3356
+ unpinLabel,
3357
+ unpinTitle,
3358
+ useSessionAccess
3359
+ }, row.id))
3399
3360
  });
3400
3361
  }
3401
3362
  /**
3402
3363
  * One independent fold: a group header with its visible count, and its rows when
3403
3364
  * expanded. The count is part of the button's visible text, so it also names the
3404
- * count to a screen reader.
3365
+ * count to a screen reader. The header is the list's own row box with the fold
3366
+ * glyph in its leading cell, so header labels and row titles share an edge.
3405
3367
  */
3406
3368
  function GroupCollapse({ title, count, children }) {
3407
3369
  const [expanded, setExpanded] = (0, react.useState)(true);
@@ -3409,24 +3371,24 @@ window.__ModuleLoader__.load({
3409
3371
  className: AttentionSection_module_css_default.group,
3410
3372
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3411
3373
  type: "button",
3412
- className: AttentionSection_module_css_default.groupHeader,
3374
+ className: clsx(Rows_module_css_default.sessionRow, AttentionSection_module_css_default.groupHeader),
3413
3375
  "aria-expanded": expanded,
3414
3376
  onClick: () => {
3415
3377
  setExpanded((current) => !current);
3416
3378
  },
3417
3379
  children: [
3418
3380
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3419
- className: AttentionSection_module_css_default.chevron,
3381
+ className: clsx(Rows_module_css_default.slot, Rows_module_css_default.chevron),
3420
3382
  "aria-hidden": "true",
3421
3383
  children: expanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { size: 12 })
3422
3384
  }),
3423
3385
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3424
- className: AttentionSection_module_css_default.groupLabel,
3386
+ className: Rows_module_css_default.title,
3425
3387
  children: title
3426
3388
  }),
3427
3389
  " ",
3428
3390
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3429
- className: AttentionSection_module_css_default.groupCount,
3391
+ className: Rows_module_css_default.time,
3430
3392
  children: count
3431
3393
  })
3432
3394
  ]
@@ -3461,6 +3423,7 @@ window.__ModuleLoader__.load({
3461
3423
  unpin,
3462
3424
  label,
3463
3425
  unpinLabel: t("attention.row.unpin"),
3426
+ unpinTitle: t("actions.unpin"),
3464
3427
  useSessionAccess
3465
3428
  })
3466
3429
  }), model.unread.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupCollapse, {
@@ -3474,6 +3437,7 @@ window.__ModuleLoader__.load({
3474
3437
  unpin,
3475
3438
  label,
3476
3439
  unpinLabel: t("attention.row.unpin"),
3440
+ unpinTitle: t("actions.unpin"),
3477
3441
  useSessionAccess
3478
3442
  })
3479
3443
  })]
@@ -6423,6 +6387,19 @@ window.__ModuleLoader__.load({
6423
6387
  ctx.effect(() => () => {
6424
6388
  attention.dispose();
6425
6389
  }, "ui-workspace: attention model");
6390
+ ctx.effect(() => {
6391
+ const presenter = new TaskbarProgressPresenter();
6392
+ if (!presenter.viable) return () => {};
6393
+ const sync = () => {
6394
+ presenter.project(attention.getSnapshot());
6395
+ };
6396
+ sync();
6397
+ const unsubscribe = attention.subscribe(sync);
6398
+ return () => {
6399
+ unsubscribe();
6400
+ presenter.clear();
6401
+ };
6402
+ }, "ui-workspace: windows taskbar progress");
6426
6403
  const renameRequest = derive(shortcutControls.state, (state) => state.renameTarget);
6427
6404
  const archiveRequest = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(null);
6428
6405
  const requestSessionRename = shortcutControls.rename;