dsh-up-session 1.0.2 → 1.0.3

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/CHANGELOG.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # 更新日志
2
2
 
3
+ ## 1.0.3 - 2026-10-26
4
+
5
+ ### 变更
6
+
7
+ - 置顶区和最近区并入「工作区」列表顶部,成为工作区列表的前两个分组,随列表一起滚动;使用工作区搜索时暂时让位给搜索结果。
8
+
3
9
  ## 1.0.2 - 2026-10-26
4
10
 
5
11
  ### 修复
6
12
 
7
- - 调整兼容范围:>=DSH 0.2.1-rc.2
13
+ - DSH 兼容版本改为 `>=0.2.1-rc.2`。
8
14
 
9
15
  ## 1.0.1 - 2026-10-24
10
16
 
package/README.en.md CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
  [简体中文](./README.md) | English
8
8
 
9
- A simple DeepSeek Harness sidebar plugin: it inserts two sections, "Pinned" and "Recent", above the "Workspaces" list, gathering pinned sessions from all workspaces into one place and collecting your latest sessions into another.
9
+ A simple DeepSeek Harness sidebar plugin: it inserts two groups, "Pinned" and "Recent", at the top of the "Workspaces" list, gathering pinned sessions from all workspaces into one place and collecting your latest sessions into another.
10
10
 
11
11
  <p align="center">
12
- <img src="./assets/screenshot.png" width="32%" alt="The sidebar showing the Pinned and Recent sections above the Workspaces list">
12
+ <img src="./assets/screenshot.png" width="32%" alt="The sidebar showing the Pinned and Recent groups at the top of the Workspaces list">
13
13
  <img src="./assets/settings.png" width="64%" alt="The plugin settings popup with toggles for Show Pinned, Show Recent, and Reveal the session in its workspace">
14
14
  </p>
15
15
 
@@ -33,9 +33,11 @@ Open **Plugins** in the sidebar, click **Add plugin**, enter `dsh-up-session`, a
33
33
 
34
34
  Gathers the pinned sessions of every workspace, newest activity first, and collapses like the host's own sections. Hovering a row reveals its archive and unpin buttons.
35
35
 
36
+ Both Pinned and Recent sit at the top of the workspaces list as its first two groups and scroll together with the workspace groups below. While the workspace search is open, they step aside so the list can show the results.
37
+
36
38
  ## Recent section
37
39
 
38
- Sits between the pinned section and the workspaces, lists the sessions that are not pinned, newest activity first, and shows the latest five by default. It looks and collapses exactly like the pinned section. Once there are more than five sessions, a "Show more" button appears at the bottom of the list:
40
+ Sits between the pinned section and the workspace rows, lists the sessions that are not pinned, newest activity first, and shows the latest five by default. It looks and collapses exactly like the pinned section. Once there are more than five sessions, a "Show more" button appears at the bottom of the list:
39
41
 
40
42
  - each click reveals five more sessions,
41
43
  - once every session is on screen the button reads "Show less",
package/README.md CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
  简体中文 | [English](./README.en.md)
8
8
 
9
- 一个简单的 DeepSeek Harness 侧边栏插件:在「工作区」列表上方插入「置顶」和「最近」两个区,把分散在各个工作区里的置顶会话汇总到一处,也把最近的会话收拢到一处。
9
+ 一个简单的 DeepSeek Harness 侧边栏插件:在「工作区」列表顶部插入「置顶」和「最近」两个分组,把分散在各个工作区里的置顶会话汇总到一处,也把最近的会话收拢到一处。
10
10
 
11
11
  <p align="center">
12
- <img src="./assets/screenshot.png" width="32%" alt="侧边栏「工作区」列表上方依次显示置顶区与最近区">
12
+ <img src="./assets/screenshot.png" width="32%" alt="侧边栏「工作区」列表顶部依次显示置顶区与最近区">
13
13
  <img src="./assets/settings.png" width="64%" alt="插件设置弹窗,包含显示置顶、显示最近和展开工作区中的原会话三个开关">
14
14
  </p>
15
15
 
@@ -33,9 +33,11 @@ dsh plugin --profile web add dsh-up-session
33
33
 
34
34
  汇总所有工作区里被置顶的会话,按最近更新时间排序,可展开收起。每行悬停时出现归档和取消置顶两个按钮。
35
35
 
36
+ 置顶区和最近区都位于「工作区」列表顶部,是该列表的前两个分组,会和下方的工作区分组一起滚动;使用「工作区」的搜索功能时,两个区暂时隐藏,把列表让给搜索结果。
37
+
36
38
  ## 最近区
37
39
 
38
- 位于置顶区与工作区之间,按最近更新时间排序显示尚未置顶的会话,默认显示最新的 5 条,样式与置顶区一致,同样可以展开收起。会话超过 5 条时,列表底部出现「展开更多」:
40
+ 位于置顶区与工作区列表之间,按最近更新时间排序显示尚未置顶的会话,默认显示最新的 5 条,样式与置顶区一致,同样可以展开收起。会话超过 5 条时,列表底部出现「展开更多」:
39
41
 
40
42
  - 每点一次「展开更多」再显示 5 条;
41
43
  - 全部会话都显示完后,按钮变为「收起」;
package/client.js CHANGED
@@ -150,7 +150,7 @@ window.__ModuleLoader__.load({
150
150
  // twice, so the section copies the real geometry instead of predicting it.
151
151
  '.dshUS-mount{box-sizing:border-box;flex:none;display:flex;flex-direction:column;gap:4px;',
152
152
  'padding-left:4px;margin:0 0 4px -4px}',
153
- '.dshUS-mount[data-rail="true"]{display:none}',
153
+ '.dshUS-mount[data-rail="true"],.dshUS-mount[data-searching="true"]{display:none}',
154
154
  '.dshUS-root{box-sizing:border-box;display:flex;flex-direction:column;gap:2px}',
155
155
  // The header copies the host's "Workspaces" section header: same box, same
156
156
  // 14px/20px label, same tertiary label colour. The whole row is the toggle,
@@ -1009,8 +1009,8 @@ window.__ModuleLoader__.load({
1009
1009
  /**
1010
1010
  * The root of the plugin's sidebar surface: the pinned section, the recent
1011
1011
  * section, and the one archive confirmation both sections can raise. It is
1012
- * rendered through a portal into the host node the plugin keeps just above
1013
- * the workspace slot's anchor.
1012
+ * rendered through a portal into the host node the plugin keeps at the top
1013
+ * of the workspace list, inside the "Workspaces" section.
1014
1014
  * @param props - composed slot props plus the injected host and actions.
1015
1015
  * @returns the portal, or null when there is nowhere to portal into.
1016
1016
  */
@@ -1838,11 +1838,32 @@ window.__ModuleLoader__.load({
1838
1838
  }
1839
1839
 
1840
1840
  /**
1841
- * Keep the host node immediately before the workspace slot's anchor. The
1842
- * workspaces seat lives in the sidebar's column flex container, so a sibling
1843
- * inserted there takes its own space and pushes the browser down instead of
1844
- * covering it. Both sections share that node and stack inside it. Hiding in
1845
- * the collapsed rail mirrors the shell's own rule.
1841
+ * The scroll box holding the workspace list. In the grouped and flat views
1842
+ * the `role="tree"` box scrolls itself; while searching, the results tree
1843
+ * sits one level inside that same box, so the nearest scrolling ancestor is
1844
+ * the seat either way. The sections live at the top of this box, inside the
1845
+ * "Workspaces" section, and scroll away with the workspace rows instead of
1846
+ * taking a fixed slice of the sidebar above them.
1847
+ * @param anchor - the Workspaces slot anchor.
1848
+ * @returns the scroll box, or null while the sidebar renders no list.
1849
+ */
1850
+ function workspaceScrollBox(anchor) {
1851
+ const tree = anchor.querySelector('[role="tree"]');
1852
+ if (!(tree instanceof Element)) return null;
1853
+ for (let node = tree; node !== null && node !== anchor; node = node.parentElement) {
1854
+ const { overflowY } = getComputedStyle(node);
1855
+ if (overflowY === 'auto' || overflowY === 'scroll') return node;
1856
+ }
1857
+ return null;
1858
+ }
1859
+
1860
+ /**
1861
+ * Keep the host node at the top of the workspace list. Both sections share
1862
+ * that node and stack inside it, so they read as the first two groups of
1863
+ * the "Workspaces" section rather than as sections of their own. Hiding in
1864
+ * the collapsed rail mirrors the shell's own rule, and the list cannot hold
1865
+ * the sections while the user is searching its rows, so they step aside for
1866
+ * the results.
1846
1867
  * @param host - the container the portal renders into.
1847
1868
  * @returns the disposer that detaches the node and its observers.
1848
1869
  */
@@ -1852,12 +1873,25 @@ window.__ModuleLoader__.load({
1852
1873
 
1853
1874
  const place = () => {
1854
1875
  const anchor = document.querySelector('[data-slot="sidebar.workspaces"]');
1855
- if (!(anchor instanceof Element)) return;
1876
+ if (!(anchor instanceof Element)) {
1877
+ host.remove();
1878
+ return;
1879
+ }
1856
1880
  const parent = anchor.parentElement;
1857
1881
  if (parent === null) return;
1858
- if (host.parentElement !== parent || host.nextElementSibling !== anchor) {
1859
- parent.insertBefore(host, anchor);
1882
+ const seat = workspaceScrollBox(anchor);
1883
+ if (seat === null) {
1884
+ host.remove();
1885
+ return;
1886
+ }
1887
+ if (host.parentElement !== seat || seat.firstElementChild !== host) {
1888
+ seat.insertBefore(host, seat.firstChild);
1860
1889
  }
1890
+ // Search results replace the list's rows; the sections would otherwise
1891
+ // sit above those results as unrelated pinned and recent rows.
1892
+ const search = anchor.querySelector('input[type="text"]');
1893
+ host.dataset.searching =
1894
+ search instanceof HTMLInputElement && search.value.trim() !== '' ? 'true' : 'false';
1861
1895
  if (resize === undefined) {
1862
1896
  // The seat spans the sidebar's inner width, which is narrower than the
1863
1897
  // column by its inline padding; the rail seat is far narrower still.
@@ -1891,7 +1925,7 @@ window.__ModuleLoader__.load({
1891
1925
  };
1892
1926
  }
1893
1927
 
1894
- /** Contribute the pinned and recent sections above the workspace list. */
1928
+ /** Contribute the pinned and recent sections inside the workspace list. */
1895
1929
  function apply(ctx) {
1896
1930
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'up-session: dictionaries');
1897
1931
  const t = ctx.locale.bind(NS);
package/index.js CHANGED
@@ -2,7 +2,8 @@
2
2
  * Host half of the dsh-up-session bundle.
3
3
  *
4
4
  * The plugin is a pure sidebar decoration: it reads pin state through the
5
- * Client's workspace controller and renders above the workspace list. There is
6
- * no Host-side behavior, so this module only satisfies the bundle's Host row.
5
+ * Client's workspace controller and renders at the top of the workspace list.
6
+ * There is no Host-side behavior, so this module only satisfies the bundle's
7
+ * Host row.
7
8
  */
8
9
  export function apply() {}
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "dsh-up-session",
4
- "description": "Adds pinned and recent sections above the workspace list in the sidebar, gathering pinned and recent sessions, with a settings popup in each section header."
4
+ "description": "Adds pinned and recent groups at the top of the workspace list in the sidebar, gathering pinned and recent sessions, with a settings popup in each group header."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "dsh-up-session",
4
- "description": "在侧边栏工作区上方增加置顶区和最近区,汇总各工作区的置顶与最近会话,并在标题栏提供设置入口。"
4
+ "description": "在侧边栏工作区列表顶部增加置顶区和最近区,汇总各工作区的置顶与最近会话,并在标题栏提供设置入口。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dsh-up-session",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
- "description": "Adds pinned and recent session sections above the workspace list in the DSH sidebar, with a small settings popup.",
5
+ "description": "Adds pinned and recent session groups at the top of the workspace list in the DSH sidebar, with a small settings popup.",
6
6
  "license": "MIT",
7
7
  "author": "kyrsieger",
8
8
  "repository": {