dsh-workspace-status 0.3.1 → 0.3.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.js +56 -133
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,25 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.3] - 2026-12-05
10
+
11
+ ### Fixed
12
+
13
+ - The pinned section is visible again on DeepSeek Harness 0.2.2. The sidebar
14
+ scroll area became a four-row CSS grid whose panel list and workspaces region
15
+ claim explicit cells (2/2 and 4/2), so the injected section was auto-placed
16
+ into the 4px gutter and rendered as an invisible sliver — pins looked like
17
+ they did nothing and no notification could ever be raised. The host now
18
+ claims the spacer row and widens it to its own height.
19
+
20
+ ## [0.3.2] - 2026-10-28
21
+
22
+ ### Changed
23
+
24
+ - Replaced the timed, one-time "star the suite" overlay prompt with a quiet,
25
+ user-initiated star link in the plugin's own UI. It never interrupts or
26
+ auto-opens; it links to the Stijnus DSH plugin suite on GitHub.
27
+
9
28
  ## [0.3.1] - 2026-10-28
10
29
 
11
30
  ### Added
package/client.js CHANGED
@@ -36,6 +36,9 @@ window.__ModuleLoader__.load({
36
36
  const ReactDOM = require('react-dom')
37
37
  const h = React.createElement
38
38
 
39
+ /** Quiet, user-initiated suite star link. */
40
+ const STAR_SUITE_URL = 'https://github.com/Stijnus?tab=repositories&q=dsh'
41
+
39
42
  /** Additive seat beside Settings at the sidebar foot. */
40
43
  const SLOT = 'sidebar.footer.action'
41
44
  /** Stable list id; reusing it would shadow this entry rather than add one. */
@@ -131,6 +134,7 @@ window.__ModuleLoader__.load({
131
134
  'notify.finished.title': '{title} finished',
132
135
  'notify.finished.body': 'Finished and not opened yet · {workspace}',
133
136
  'notify.dismiss': 'Dismiss',
137
+ 'star.suite': 'Star the suite',
134
138
  },
135
139
  zh: {
136
140
  'activity.summary': '工作区状态:{clauses} — {names}',
@@ -168,6 +172,7 @@ window.__ModuleLoader__.load({
168
172
  'notify.finished.title': '{title} 已完成',
169
173
  'notify.finished.body': '已完成且尚未打开 · {workspace}',
170
174
  'notify.dismiss': '关闭',
175
+ 'star.suite': '为插件套件点星',
171
176
  },
172
177
  }
173
178
 
@@ -1013,6 +1018,20 @@ window.__ModuleLoader__.load({
1013
1018
  if (host.parentElement !== current.parentElement || host.nextElementSibling !== current) {
1014
1019
  current.parentElement.insertBefore(host, current)
1015
1020
  }
1021
+ // DSH 0.2.2 lays the sidebar scroll area out as a grid with fixed rows,
1022
+ // and the panel list (2/2) plus the workspaces region (4/2) claim their
1023
+ // cells explicitly. A bare sibling is auto-placed into the 4px gutter
1024
+ // and disappears, so claim the spacer row and let it size to content.
1025
+ const area = current.parentElement
1026
+ const laid = typeof window === 'undefined' ? undefined : window.getComputedStyle(area)
1027
+ if (laid !== undefined && laid.display === 'grid') {
1028
+ host.style.gridColumn = '2'
1029
+ host.style.gridRow = '3'
1030
+ const tracks = (laid.gridTemplateRows ?? '').split(' ').filter(Boolean)
1031
+ if (tracks.length === 4 && parseFloat(tracks[2]) < 6) {
1032
+ area.style.gridTemplateRows = `${tracks[0]} max-content max-content max-content`
1033
+ }
1034
+ }
1016
1035
  const collapsed = Array.from(current.parentElement.classList ?? [])
1017
1036
  .some((token) => token.endsWith('_collapsed'))
1018
1037
  if (host.getAttribute('data-rail') !== String(collapsed)) {
@@ -1466,10 +1485,22 @@ window.__ModuleLoader__.load({
1466
1485
  const markerRef = React.useRef(null)
1467
1486
  const [portalHost, setPortalHost] = React.useState(undefined)
1468
1487
  React.useEffect(() => {
1469
- const attached = attachPinnedHost(markerRef.current)
1470
- if (attached === null) return undefined
1471
- setPortalHost(attached.host)
1472
- return () => { attached.dispose() }
1488
+ // The shell may commit the sidebar region after this slot's subtree, so
1489
+ // keep looking for a few frames instead of giving up on the first pass.
1490
+ let attached = attachPinnedHost(markerRef.current)
1491
+ let frame = 0
1492
+ let raf = 0
1493
+ const retry = () => {
1494
+ attached = attachPinnedHost(markerRef.current)
1495
+ if (attached === null && ++frame < 120) raf = window.requestAnimationFrame(retry)
1496
+ else if (attached !== null) setPortalHost(attached.host)
1497
+ }
1498
+ if (attached !== null) setPortalHost(attached.host)
1499
+ else if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') raf = window.requestAnimationFrame(retry)
1500
+ return () => {
1501
+ if (raf !== 0) window.cancelAnimationFrame(raf)
1502
+ if (attached !== null) attached.dispose()
1503
+ }
1473
1504
  }, [])
1474
1505
 
1475
1506
 
@@ -1503,132 +1534,6 @@ window.__ModuleLoader__.load({
1503
1534
  }
1504
1535
 
1505
1536
 
1506
- // One-time "star the suite" prompt shared by every Stijnus plugin.
1507
- // Whichever plugin mounts first shows it; all of them consult the same
1508
- // localStorage marker so five installed plugins cannot stack five cards.
1509
- const STAR_CTA_KEY = 'dsh-stijnus-star-cta/v1'
1510
- const STAR_LINKS = [
1511
- ['Composer Predictions', 'https://github.com/Stijnus/dsh-composer-predictions'],
1512
- ['Moodboard', 'https://github.com/Stijnus/dsh-moodboard'],
1513
- ['Prompt Optimizer', 'https://github.com/Stijnus/dsh-prompt-optimizer'],
1514
- ['Move to Workspace', 'https://github.com/Stijnus/dsh-move-to-workspace'],
1515
- ['Workspace Status', 'https://github.com/Stijnus/dsh-workspace-status'],
1516
- ]
1517
-
1518
- function starCtaShown() {
1519
- try {
1520
- return window.localStorage.getItem(STAR_CTA_KEY) !== null
1521
- } catch {
1522
- return true
1523
- }
1524
- }
1525
-
1526
- function markStarCtaShown() {
1527
- try {
1528
- window.localStorage.setItem(STAR_CTA_KEY, String(Date.now()))
1529
- } catch {
1530
- // A blocked localStorage only means the prompt may reappear next launch.
1531
- }
1532
- }
1533
-
1534
- function StarSuiteCta() {
1535
- const [open, setOpen] = React.useState(false)
1536
- React.useEffect(() => {
1537
- if (starCtaShown()) return undefined
1538
- const timer = window.setTimeout(() => {
1539
- if (starCtaShown()) return
1540
- markStarCtaShown()
1541
- setOpen(true)
1542
- }, 25000)
1543
- return () => window.clearTimeout(timer)
1544
- }, [])
1545
- if (!open) return null
1546
- const close = () => setOpen(false)
1547
- return h(
1548
- 'div',
1549
- {
1550
- role: 'status',
1551
- 'aria-live': 'polite',
1552
- style: {
1553
- position: 'fixed',
1554
- left: '16px',
1555
- bottom: '72px',
1556
- zIndex: 2147483000,
1557
- width: '300px',
1558
- maxWidth: 'calc(100vw - 32px)',
1559
- boxSizing: 'border-box',
1560
- padding: '14px 14px 12px',
1561
- borderRadius: '12px',
1562
- border: '1px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.14))',
1563
- background: 'var(--dsw-alias-bg-layer-2, #1c1c1e)',
1564
- color: 'var(--dsw-alias-label-primary, #f2f2f2)',
1565
- boxShadow: '0 8px 28px rgba(0, 0, 0, 0.28)',
1566
- fontSize: '13px',
1567
- lineHeight: '18px',
1568
- },
1569
- },
1570
- h(
1571
- 'button',
1572
- {
1573
- type: 'button',
1574
- onClick: close,
1575
- 'aria-label': 'Dismiss',
1576
- style: {
1577
- position: 'absolute',
1578
- top: '8px',
1579
- right: '8px',
1580
- width: '24px',
1581
- height: '24px',
1582
- padding: '0',
1583
- border: '0',
1584
- borderRadius: '6px',
1585
- background: 'transparent',
1586
- cursor: 'pointer',
1587
- color: 'var(--dsw-alias-label-tertiary, #9a9a9a)',
1588
- fontSize: '16px',
1589
- lineHeight: '24px',
1590
- },
1591
- },
1592
- '\\u00d7',
1593
- ),
1594
- h('div', { style: { fontWeight: 600, paddingRight: '24px' } }, 'Enjoying these plugins?'),
1595
- h(
1596
- 'div',
1597
- {
1598
- style: {
1599
- marginTop: '4px',
1600
- color: 'var(--dsw-alias-label-secondary, #b8b8b8)',
1601
- fontSize: '12px',
1602
- lineHeight: '17px',
1603
- },
1604
- },
1605
- 'A star on GitHub helps them reach the DeepSeek Harness plugin market.',
1606
- ),
1607
- h(
1608
- 'div',
1609
- { style: { display: 'flex', flexDirection: 'column', gap: '5px', marginTop: '10px' } },
1610
- STAR_LINKS.map(([name, url]) =>
1611
- h(
1612
- 'a',
1613
- {
1614
- key: url,
1615
- href: url,
1616
- target: '_blank',
1617
- rel: 'noopener noreferrer',
1618
- onClick: close,
1619
- style: {
1620
- color: 'var(--dsw-alias-link, #6cb8ff)',
1621
- fontSize: '12px',
1622
- textDecoration: 'none',
1623
- },
1624
- },
1625
- '\\u2b50 ' + name,
1626
- ),
1627
- ),
1628
- ),
1629
- )
1630
- }
1631
-
1632
1537
  return {
1633
1538
  name: 'workspace-status',
1634
1539
  inject: ['slots'],
@@ -1665,9 +1570,27 @@ window.__ModuleLoader__.load({
1665
1570
  },
1666
1571
  WorkspaceStatus,
1667
1572
  ))
1668
- ctx.slots.inject('shell.overlay', () => ctx.slots.register(
1669
- { name: 'shell.overlay', id: 'workspace-status-star-cta' },
1670
- () => h(StarSuiteCta),
1573
+ /** Quiet, user-initiated suite star link: Settings → General only. */
1574
+ function StarSuiteSetting() {
1575
+ return h(
1576
+ 'div',
1577
+ { style: { padding: '16px 0', borderBottom: '0.5px solid var(--dsw-alias-border-l2)' } },
1578
+ h(
1579
+ 'a',
1580
+ {
1581
+ href: STAR_SUITE_URL,
1582
+ target: '_blank',
1583
+ rel: 'noopener noreferrer',
1584
+ style: { fontSize: '14px', lineHeight: '20px', color: 'var(--dsw-alias-link)', textDecoration: 'none' },
1585
+ },
1586
+ '\u2605 ' + message('star.suite'),
1587
+ ),
1588
+ )
1589
+ }
1590
+
1591
+ ctx.slots.inject('settings.general.item', () => ctx.slots.register(
1592
+ { name: 'settings.general.item', id: 'workspace-status-star', order: 60, label: () => message('star.suite') },
1593
+ StarSuiteSetting,
1671
1594
  ))
1672
1595
  },
1673
1596
  /** Exposed for the package's own tests; the Loader ignores it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workspace-status",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Workspace status marks, a pinned-conversation section and pinned-only notifications for the DeepSeek Harness sidebar.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -64,7 +64,7 @@
64
64
  "catalog": {
65
65
  "summary": {
66
66
  "en": "Workspace status marks, a pinned-conversation section above the sidebar list and pinned-only notifications: waiting for you, running, recently finished, grouped per workspace and persisted.",
67
- "zh": "\u4fa7\u8fb9\u680f\u5de5\u4f5c\u533a\u72b6\u6001\u6807\u8bb0\u3001\u5217\u8868\u4e0a\u65b9\u7684\u5df2\u7f6e\u9876\u4f1a\u8bdd\u533a\uff0c\u4ee5\u53ca\u4ec5\u9488\u5bf9\u7f6e\u9876\u4f1a\u8bdd\u7684\u901a\u77e5\uff1a\u7b49\u5f85\u4f60\u5904\u7406\u3001\u8fd0\u884c\u4e2d\u3001\u521a\u521a\u5b8c\u6210\uff1b\u7f6e\u9876\u6309\u5de5\u4f5c\u533a\u5206\u7ec4\u5e76\u6301\u4e45\u4fdd\u5b58\u3002"
67
+ "zh": "侧边栏工作区状态标记、列表上方的已置顶会话区,以及仅针对置顶会话的通知:等待你处理、运行中、刚刚完成;置顶按工作区分组并持久保存。"
68
68
  },
69
69
  "category": "ui"
70
70
  }