dsh-workspace-status 0.3.4 → 0.3.5

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
@@ -6,6 +6,26 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.5] - 2026-12-05
10
+
11
+ ### Added
12
+
13
+ - A status bar under the Pinned header: one line summarising how many pinned
14
+ conversations are waiting for you, running, or parked for later.
15
+ - "Work on later": park a conversation from its row with an optional one-line
16
+ note, e.g. "waiting for reboot". Parked conversations leave their workspace
17
+ group, collect under a **Later** heading in queue order, show their note, and
18
+ can be unparked from that row.
19
+ - A parked conversation raises no in-app notice, chime or system banner while
20
+ it stays parked, and unparking cannot replay the events it muted: the diff
21
+ still advances while the row is quiet.
22
+
23
+ ### Fixed
24
+
25
+ - The pinned group count referenced an invalid theme token
26
+ (`--dsws-alias-label-tertiary`) and inherited its colour instead of the
27
+ tertiary label colour.
28
+
9
29
  ## [0.3.4] - 2026-12-05
10
30
 
11
31
  ### Added
package/client.js CHANGED
@@ -75,6 +75,9 @@ window.__ModuleLoader__.load({
75
75
  /** Browser-local preference store for pinned-conversation notifications. */
76
76
  const NOTIFY_STORE_KEY = 'dsh-workspace-status/notifications/v1'
77
77
 
78
+ /** Browser-local "work on this later" marks, keyed by Session id. */
79
+ const LATER_STORE_KEY = 'dsh-workspace-status/later/v1'
80
+
78
81
  /** The renderer's Notification constructor, when the platform has one. */
79
82
  const NOTIFICATION_API = typeof Notification === 'undefined' ? undefined : Notification
80
83
 
@@ -103,6 +106,7 @@ window.__ModuleLoader__.load({
103
106
  'activity.waiting': '{n} waiting for you',
104
107
  'activity.running': '{n} running',
105
108
  'activity.done': '{n} recently finished',
109
+ 'activity.later': '{n} later',
106
110
  'activity.unnamed': 'Ungrouped',
107
111
  'activity.more': 'and {n} more',
108
112
  'activity.listSeparator': ', ',
@@ -134,6 +138,14 @@ window.__ModuleLoader__.load({
134
138
  'notify.finished.title': '{title} finished',
135
139
  'notify.finished.body': 'Finished and not opened yet · {workspace}',
136
140
  'notify.dismiss': 'Dismiss',
141
+ 'later.title': 'Later',
142
+ 'later.mark': 'Mark for later',
143
+ 'later.markAria': 'Mark {title} for later',
144
+ 'later.unmark': 'Stop deferring',
145
+ 'later.unmarkAria': 'Stop deferring {title}',
146
+ 'later.note': 'Why later? e.g. waiting for reboot',
147
+ 'later.groupAria': 'Conversations parked for later',
148
+ 'later.noteFallback': 'No note',
137
149
  'star.suite': 'Star the suite',
138
150
  },
139
151
  zh: {
@@ -141,6 +153,7 @@ window.__ModuleLoader__.load({
141
153
  'activity.waiting': '{n} 个等待你处理',
142
154
  'activity.running': '{n} 个运行中',
143
155
  'activity.done': '{n} 个刚刚完成',
156
+ 'activity.later': '{n} 个稍后处理',
144
157
  'activity.unnamed': '未分组',
145
158
  'activity.more': '等 {n} 个',
146
159
  'activity.listSeparator': '、',
@@ -172,6 +185,14 @@ window.__ModuleLoader__.load({
172
185
  'notify.finished.title': '{title} 已完成',
173
186
  'notify.finished.body': '已完成且尚未打开 · {workspace}',
174
187
  'notify.dismiss': '关闭',
188
+ 'later.title': '稍后处理',
189
+ 'later.mark': '标记为稍后处理',
190
+ 'later.markAria': '将 {title} 标记为稍后处理',
191
+ 'later.unmark': '取消稍后处理',
192
+ 'later.unmarkAria': '取消 {title} 的稍后处理',
193
+ 'later.note': '为什么稍后?例如:等待重启',
194
+ 'later.groupAria': '已推迟到稍后处理的会话',
195
+ 'later.noteFallback': '无备注',
175
196
  'star.suite': '为插件套件点星',
176
197
  },
177
198
  }
@@ -287,6 +308,19 @@ window.__ModuleLoader__.load({
287
308
  }, h('path', { d: BELL_PATH, fill: 'currentColor' }))
288
309
  }
289
310
 
311
+ /** Render the later bookmark; `filled` marks a parked Session. */
312
+ function bookmarkIcon(filled) {
313
+ return h('svg', {
314
+ width: 13, height: 13, viewBox: '0 0 24 24', 'aria-hidden': 'true', focusable: 'false',
315
+ }, h('path', {
316
+ d: 'M7 3.75h10a1.25 1.25 0 0 1 1.25 1.25v16.1a.4.4 0 0 1-.62.33L12 17.3l-5.63 4.13a.4.4 0 0 1-.62-.33V5A1.25 1.25 0 0 1 7 3.75Z',
317
+ fill: filled ? 'currentColor' : 'none',
318
+ stroke: 'currentColor',
319
+ 'stroke-width': filled ? 0 : 1.6,
320
+ 'stroke-linejoin': 'round',
321
+ }))
322
+ }
323
+
290
324
  /** Render the sound toggle glyph. */
291
325
  function volumeIcon() {
292
326
  return h('svg', {
@@ -806,7 +840,7 @@ window.__ModuleLoader__.load({
806
840
  '.dsws-pinned-group-head:hover .dsws-pinned-fileglyph,.dsws-pinned-group-head:focus-visible .dsws-pinned-fileglyph{display:none}',
807
841
  '.dsws-pinned-group-head:hover .dsws-pinned-arrow,.dsws-pinned-group-head:focus-visible .dsws-pinned-arrow{display:inline-flex}',
808
842
  '.dsws-pinned-group-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',
809
- '.dsws-pinned-group-count{flex:none;color:var(--dsws-alias-label-tertiary);font-size:12px;line-height:17px;',
843
+ '.dsws-pinned-group-count{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px;',
810
844
  'font-variant-numeric:tabular-nums}',
811
845
  '.dsws-pinned-row{display:flex;align-items:center;box-sizing:border-box;width:100%;height:32px;',
812
846
  'margin:0;padding:0 6px 0 28px;border:0;border-radius:var(--dsw-radius-md);background:none;',
@@ -831,6 +865,28 @@ window.__ModuleLoader__.load({
831
865
  'background:none;color:var(--dsw-alias-label-tertiary);cursor:pointer}',
832
866
  '.dsws-pinned-unpin:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}',
833
867
  '.dsws-pinned-unpin:disabled{opacity:.45;cursor:default}',
868
+ '.dsws-pinned-statusbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;',
869
+ 'padding:0 8px 6px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}',
870
+ '.dsws-statusbar-seg{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}',
871
+ '.dsws-statusbar-dot{flex:none;width:6px;height:6px;border-radius:50%;',
872
+ 'background:var(--dsw-alias-label-tertiary)}',
873
+ '.dsws-statusbar-dot[data-tone="wait"]{background:var(--dsw-alias-state-warn-primary)}',
874
+ '.dsws-statusbar-dot[data-tone="run"]{background:var(--dsw-static-deepseek-450)}',
875
+ '.dsws-statusbar-dot[data-tone="later"]{background:var(--dsw-alias-label-secondary)}',
876
+ '.dsws-pinned-latergroup{margin-top:2px}',
877
+ '.dsws-pinned-laterrow{align-items:flex-start;height:auto;min-height:32px;padding-top:3px;padding-bottom:3px}',
878
+ '.dsws-pinned-laterrow .dsws-pinned-dotslot{margin-top:2px}',
879
+ '.dsws-pinned-latertext{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}',
880
+ '.dsws-pinned-laternote{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:15px;',
881
+ 'overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',
882
+ '.dsws-pinned-bookmark{flex:none;width:22px;height:22px;margin-left:2px;display:inline-flex;',
883
+ 'align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--dsw-radius-sm);',
884
+ 'background:none;color:var(--dsw-alias-label-tertiary);cursor:pointer}',
885
+ '.dsws-pinned-bookmark:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}',
886
+ '.dsws-pinned-bookmark[data-on="true"]{color:var(--dsw-alias-label-secondary)}',
887
+ '.dsws-pinned-note{flex:1;min-width:0;height:22px;box-sizing:border-box;padding:0 6px;',
888
+ 'border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);',
889
+ 'background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:12px}',
834
890
  '@media (prefers-reduced-motion:reduce){',
835
891
  '.dsws-pinned-dot[data-state="ongoing"]{animation:none;opacity:.7}',
836
892
  '.dsws-pinned-chevron,.dsws-pinned-arrow{transition:none}}',
@@ -847,9 +903,11 @@ window.__ModuleLoader__.load({
847
903
  *
848
904
  * @param previous - previous per-session status map.
849
905
  * @param sessions - pinned sessions from the current model.
906
+ * @param muted - Sessions parked for later: their state still advances so
907
+ * unparking cannot replay history, but no event is emitted.
850
908
  * @returns the events to deliver plus the map for the next render.
851
909
  */
852
- function notificationEvents(previous, sessions) {
910
+ function notificationEvents(previous, sessions, muted) {
853
911
  const next = new Map()
854
912
  const events = []
855
913
  for (const session of Array.isArray(sessions) ? sessions : []) {
@@ -862,10 +920,11 @@ window.__ModuleLoader__.load({
862
920
  next.set(session.id, state)
863
921
  continue
864
922
  }
865
- if (pendingKind !== null && pendingKind !== prior.pendingKind) {
923
+ const parked = muted !== null && typeof muted?.has === 'function' && muted.has(session.id)
924
+ if (!parked && pendingKind !== null && pendingKind !== prior.pendingKind) {
866
925
  events.push({ type: 'waiting', session })
867
926
  }
868
- if (completionUnread && !running && (prior.running === true || prior.completionUnread !== true)) {
927
+ if (!parked && completionUnread && !running && (prior.running === true || prior.completionUnread !== true)) {
869
928
  events.push({ type: 'finished', session })
870
929
  }
871
930
  next.set(session.id, state)
@@ -930,6 +989,104 @@ window.__ModuleLoader__.load({
930
989
  return prefs
931
990
  }
932
991
 
992
+ /** Read the browser-local later marks without assuming storage access. */
993
+ function readLater() {
994
+ if (typeof localStorage === 'undefined') return {}
995
+ try {
996
+ const raw = localStorage.getItem(LATER_STORE_KEY)
997
+ if (typeof raw !== 'string' || raw === '') return {}
998
+ const parsed = JSON.parse(raw)
999
+ if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) return {}
1000
+ const later = {}
1001
+ for (const [sessionId, value] of Object.entries(parsed)) {
1002
+ if (typeof sessionId !== 'string' || sessionId === '') continue
1003
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) continue
1004
+ later[sessionId] = {
1005
+ note: typeof value.note === 'string' ? value.note.slice(0, 160) : '',
1006
+ at: typeof value.at === 'number' && Number.isFinite(value.at) ? value.at : 0,
1007
+ }
1008
+ }
1009
+ return later
1010
+ } catch {
1011
+ return {}
1012
+ }
1013
+ }
1014
+
1015
+ /** Persist the later marks and return the value for a state update. */
1016
+ function writeLater(later) {
1017
+ if (typeof localStorage !== 'undefined') {
1018
+ try {
1019
+ localStorage.setItem(LATER_STORE_KEY, JSON.stringify(later))
1020
+ } catch {
1021
+ // Storage may be unavailable; the in-memory marks still apply.
1022
+ }
1023
+ }
1024
+ return later
1025
+ }
1026
+
1027
+ /** Whether a Session is parked for later. */
1028
+ function hasLater(later, sessionId) {
1029
+ return later !== null && typeof later === 'object' && typeof sessionId === 'string'
1030
+ && Object.prototype.hasOwnProperty.call(later, sessionId)
1031
+ }
1032
+
1033
+ /** Park a Session with an optional note and return the next map. */
1034
+ function setLater(later, sessionId, note) {
1035
+ const next = { ...later }
1036
+ next[sessionId] = { note: String(note ?? '').slice(0, 160), at: Date.now() }
1037
+ return writeLater(next)
1038
+ }
1039
+
1040
+ /** Clear one Session's later mark and return the next map. */
1041
+ function clearLater(later, sessionId) {
1042
+ const next = { ...later }
1043
+ delete next[sessionId]
1044
+ return writeLater(next)
1045
+ }
1046
+
1047
+ /**
1048
+ * Parked Sessions, oldest park first, with the same live facts the pinned
1049
+ * rows carry. Archived, blank and subagent rows have no ordinary row to
1050
+ * lift, so they are skipped exactly like the pinned view does.
1051
+ * @param later - browser-local marks keyed by Session id.
1052
+ * @param sessions - Session summaries keyed by id.
1053
+ * @param statuses - Session UI status map.
1054
+ * @param archivedSessionIds - registry archive set.
1055
+ * @param now - render clock for the relative label.
1056
+ * @returns the entries in queue order plus their count.
1057
+ */
1058
+ function buildLaterView(later, sessions, statuses, archivedSessionIds, now) {
1059
+ const byId = sessions !== null && typeof sessions === 'object' ? sessions : {}
1060
+ const archived = new Set(Array.isArray(archivedSessionIds) ? archivedSessionIds : [])
1061
+ const statusMap = statuses !== null && typeof statuses?.get === 'function' ? statuses : undefined
1062
+ const children = childMap(byId)
1063
+ const entries = []
1064
+ for (const [sessionId, mark] of Object.entries(later ?? {})) {
1065
+ const row = byId[sessionId]
1066
+ if (row === null || row === undefined) continue
1067
+ if (archived.has(sessionId)) continue
1068
+ if (row.origin === 'subagent' || row.blank === true) continue
1069
+ const facts = sessionFacts(sessionId, row, statusMap, children, byId)
1070
+ entries.push({
1071
+ id: sessionId,
1072
+ title: typeof row.displayTitle === 'string' && row.displayTitle !== ''
1073
+ ? row.displayTitle
1074
+ : typeof row.title === 'string' && row.title !== ''
1075
+ ? row.title
1076
+ : message('pinned.untitled'),
1077
+ note: typeof mark?.note === 'string' ? mark.note : '',
1078
+ at: typeof mark?.at === 'number' ? mark.at : 0,
1079
+ time: relativeTime(row.updatedAt, now),
1080
+ mark: facts.mark,
1081
+ pendingKind: facts.pendingKind,
1082
+ running: facts.running,
1083
+ completionUnread: facts.completionUnread,
1084
+ })
1085
+ }
1086
+ entries.sort((left, right) => left.at - right.at)
1087
+ return { entries, count: entries.length }
1088
+ }
1089
+
933
1090
  /** Lazily created audio context for the optional chime. */
934
1091
  let audioContext
935
1092
 
@@ -1058,7 +1215,7 @@ window.__ModuleLoader__.load({
1058
1215
  * the Workspace feed, groups it per Workspace, and unpins through the
1059
1216
  * Workspace service so the official tree and this section update together.
1060
1217
  */
1061
- function PinnedSection({ model, openSession, unpinSession }) {
1218
+ function PinnedSection({ model, sessions, statuses, archived, openSession, unpinSession }) {
1062
1219
  const [view, setView] = React.useState(readViewState)
1063
1220
  const [pending, setPending] = React.useState(() => ({}))
1064
1221
  const [notifyPrefs, setNotifyPrefs] = React.useState(readNotificationPrefs)
@@ -1068,6 +1225,8 @@ window.__ModuleLoader__.load({
1068
1225
  const notifyStateRef = React.useRef(new Map())
1069
1226
  const [notices, setNotices] = React.useState([])
1070
1227
  const noticeTimers = React.useRef(new Map())
1228
+ const [later, setLaterState] = React.useState(readLater)
1229
+ const [editingLater, setEditingLater] = React.useState(null)
1071
1230
 
1072
1231
  const dismissNotice = (id) => {
1073
1232
  const timer = noticeTimers.current.get(id)
@@ -1104,8 +1263,9 @@ window.__ModuleLoader__.load({
1104
1263
  // advances even while notifications are off, so turning them on cannot
1105
1264
  // replay history.
1106
1265
  React.useEffect(() => {
1107
- const sessions = model.groups.flatMap((group) => group.sessions)
1108
- const { events, next } = notificationEvents(notifyStateRef.current, sessions)
1266
+ const pinnedSessions = model.groups.flatMap((group) => group.sessions)
1267
+ const muted = new Set(Object.keys(later))
1268
+ const { events, next } = notificationEvents(notifyStateRef.current, pinnedSessions, muted)
1109
1269
  notifyStateRef.current = next
1110
1270
  if (events.length === 0) return
1111
1271
  if (!notifyPrefs.enabled) return
@@ -1144,7 +1304,7 @@ window.__ModuleLoader__.load({
1144
1304
  }
1145
1305
  }
1146
1306
  if (delivered && notifyPrefs.sound) playChime()
1147
- }, [model, notifyPrefs.enabled, notifyPrefs.sound, permission, openSession])
1307
+ }, [model, later, notifyPrefs.enabled, notifyPrefs.sound, permission, openSession])
1148
1308
 
1149
1309
  const sendTestNotification = (osAllowed = permission === 'granted') => {
1150
1310
  const title = message('notify.enabled.title')
@@ -1234,6 +1394,31 @@ window.__ModuleLoader__.load({
1234
1394
  const sectionOpen = view.sectionCollapsed !== true
1235
1395
  const rows = []
1236
1396
 
1397
+ const laterModel = React.useMemo(
1398
+ () => buildLaterView(later, sessions, statuses, archived, Date.now()),
1399
+ [later, sessions, statuses, archived],
1400
+ )
1401
+ // Parked conversations leave their workspace group: they are lifted into
1402
+ // the Later group, so one row never appears twice.
1403
+ const visibleGroups = React.useMemo(
1404
+ () => model.groups
1405
+ .map((group) => ({
1406
+ ...group,
1407
+ sessions: group.sessions.filter((session) => !hasLater(later, session.id)),
1408
+ }))
1409
+ .map((group) => ({ ...group, count: group.sessions.length }))
1410
+ .filter((group) => group.count > 0),
1411
+ [model, later],
1412
+ )
1413
+ const waitingNow = visibleGroups.reduce(
1414
+ (total, group) => total + group.sessions.filter((session) => session.mark === 'warning').length,
1415
+ 0,
1416
+ )
1417
+ const runningNow = visibleGroups.reduce(
1418
+ (total, group) => total + group.sessions.filter((session) => session.mark === 'ongoing').length,
1419
+ 0,
1420
+ )
1421
+
1237
1422
  rows.push(h(
1238
1423
  'div',
1239
1424
  { key: 'header', className: 'dsws-pinned-headerrow' },
@@ -1337,8 +1522,102 @@ window.__ModuleLoader__.load({
1337
1522
  ))
1338
1523
  }
1339
1524
 
1525
+ const statusSegments = []
1526
+ if (waitingNow > 0) statusSegments.push(['wait', message('activity.waiting', { n: waitingNow })])
1527
+ if (runningNow > 0) statusSegments.push(['run', message('activity.running', { n: runningNow })])
1528
+ if (laterModel.count > 0) statusSegments.push(['later', message('activity.later', { n: laterModel.count })])
1529
+ if (statusSegments.length > 0) {
1530
+ rows.push(h(
1531
+ 'div',
1532
+ { key: 'statusbar', className: 'dsws-pinned-statusbar', role: 'status', 'aria-live': 'polite' },
1533
+ statusSegments.map(([tone, label]) => h(
1534
+ 'span',
1535
+ { key: tone, className: 'dsws-statusbar-seg' },
1536
+ h('span', { className: 'dsws-statusbar-dot', 'data-tone': tone }),
1537
+ label,
1538
+ )),
1539
+ ))
1540
+ }
1541
+
1542
+ if (laterModel.count > 0) {
1543
+ const laterOpen = view.groups['__later'] !== true
1544
+ const laterRows = [h(
1545
+ 'button',
1546
+ {
1547
+ key: 'later-head',
1548
+ type: 'button',
1549
+ className: 'dsws-pinned-group-head dsws-pinned-laterhead',
1550
+ 'aria-expanded': String(laterOpen),
1551
+ 'aria-label': message('later.groupAria'),
1552
+ onClick: () => toggleGroup('__later'),
1553
+ },
1554
+ h('span', { className: 'dsws-pinned-fileglyph' }, bookmarkIcon(false)),
1555
+ h('span', { className: 'dsws-pinned-arrow' }, chevronIcon()),
1556
+ h('span', { className: 'dsws-pinned-group-title' }, message('later.title')),
1557
+ h('span', { className: 'dsws-pinned-group-count' }, String(laterModel.count)),
1558
+ )]
1559
+ if (laterOpen) {
1560
+ for (const entry of laterModel.entries) {
1561
+ laterRows.push(h(
1562
+ 'div',
1563
+ {
1564
+ key: entry.id,
1565
+ className: 'dsws-pinned-row dsws-pinned-laterrow',
1566
+ role: 'treeitem',
1567
+ tabIndex: 0,
1568
+ title: entry.title,
1569
+ onClick: () => open(entry.id),
1570
+ onKeyDown: (event) => {
1571
+ if (event.key !== 'Enter' && event.key !== ' ') return
1572
+ event.preventDefault()
1573
+ open(entry.id)
1574
+ },
1575
+ },
1576
+ h(
1577
+ 'span',
1578
+ { className: 'dsws-pinned-dotslot' },
1579
+ entry.mark === undefined
1580
+ ? null
1581
+ : h('span', { className: 'dsws-pinned-dot', 'data-state': entry.mark }),
1582
+ ),
1583
+ h(
1584
+ 'span',
1585
+ { className: 'dsws-pinned-latertext' },
1586
+ h('span', { className: 'dsws-pinned-row-title' }, entry.title),
1587
+ h(
1588
+ 'span',
1589
+ { className: 'dsws-pinned-laternote' },
1590
+ entry.note !== '' ? entry.note : message('later.noteFallback'),
1591
+ ),
1592
+ ),
1593
+ entry.time === '' ? null : h('span', { className: 'dsws-pinned-time' }, entry.time),
1594
+ h(
1595
+ 'button',
1596
+ {
1597
+ type: 'button',
1598
+ className: 'dsws-pinned-bookmark',
1599
+ 'data-on': 'true',
1600
+ title: message('later.unmark'),
1601
+ 'aria-label': message('later.unmarkAria', { title: entry.title }),
1602
+ onClick: (event) => {
1603
+ event.stopPropagation()
1604
+ setLaterState(clearLater(later, entry.id))
1605
+ },
1606
+ },
1607
+ bookmarkIcon(true),
1608
+ ),
1609
+ ))
1610
+ }
1611
+ }
1612
+ rows.push(h(
1613
+ 'div',
1614
+ { key: 'later-group', className: 'dsws-pinned-group dsws-pinned-latergroup', role: 'group' },
1615
+ laterRows,
1616
+ ))
1617
+ }
1618
+
1340
1619
  if (sectionOpen) {
1341
- for (const group of model.groups) {
1620
+ for (const group of visibleGroups) {
1342
1621
  const expanded = view.groups[group.key] !== true
1343
1622
  const title = group.title !== '' ? group.title : message('activity.unnamed')
1344
1623
  const groupRows = []
@@ -1383,8 +1662,44 @@ window.__ModuleLoader__.load({
1383
1662
  ? null
1384
1663
  : h('span', { className: 'dsws-pinned-dot', 'data-state': session.mark }),
1385
1664
  ),
1386
- h('span', { className: 'dsws-pinned-row-title' }, session.title),
1665
+ editingLater === session.id
1666
+ ? h('input', {
1667
+ className: 'dsws-pinned-note',
1668
+ defaultValue: later[session.id] === undefined ? '' : later[session.id].note,
1669
+ placeholder: message('later.note'),
1670
+ onClick: (event) => event.stopPropagation(),
1671
+ onKeyDown: (event) => {
1672
+ event.stopPropagation()
1673
+ if (event.key === 'Enter') {
1674
+ event.preventDefault()
1675
+ setLaterState(setLater(later, session.id, event.currentTarget.value))
1676
+ setEditingLater(null)
1677
+ } else if (event.key === 'Escape') {
1678
+ event.preventDefault()
1679
+ setEditingLater(null)
1680
+ }
1681
+ },
1682
+ onBlur: (event) => {
1683
+ setLaterState(setLater(later, session.id, event.currentTarget.value))
1684
+ setEditingLater(null)
1685
+ },
1686
+ })
1687
+ : h('span', { className: 'dsws-pinned-row-title' }, session.title),
1387
1688
  session.time === '' ? null : h('span', { className: 'dsws-pinned-time' }, session.time),
1689
+ h(
1690
+ 'button',
1691
+ {
1692
+ type: 'button',
1693
+ className: 'dsws-pinned-bookmark',
1694
+ title: message('later.mark'),
1695
+ 'aria-label': message('later.markAria', { title: session.title }),
1696
+ onClick: (event) => {
1697
+ event.stopPropagation()
1698
+ setEditingLater(session.id)
1699
+ },
1700
+ },
1701
+ bookmarkIcon(false),
1702
+ ),
1388
1703
  h(
1389
1704
  'button',
1390
1705
  {
@@ -1534,6 +1849,9 @@ window.__ModuleLoader__.load({
1534
1849
  if (pinnedModel.total > 0) {
1535
1850
  const section = h(PinnedSection, {
1536
1851
  model: pinnedModel,
1852
+ sessions: byId,
1853
+ statuses,
1854
+ archived,
1537
1855
  openSession: typeof externalOpenSession === 'function' ? externalOpenSession : noop,
1538
1856
  unpinSession: typeof externalUnpinSession === 'function' ? externalUnpinSession : noopAsync,
1539
1857
  })
@@ -1627,7 +1945,13 @@ window.__ModuleLoader__.load({
1627
1945
  sessionFacts,
1628
1946
  notificationEvents,
1629
1947
  notificationContent,
1948
+ buildLaterView,
1949
+ readLater,
1950
+ setLater,
1951
+ clearLater,
1952
+ hasLater,
1630
1953
  WorkspaceStatus,
1954
+ PinnedSection,
1631
1955
  FINISHED_WINDOW_MS,
1632
1956
  },
1633
1957
  }
package/locale/en.json CHANGED
@@ -7,6 +7,7 @@
7
7
  "activity.waiting": "{n} waiting for you",
8
8
  "activity.running": "{n} running",
9
9
  "activity.done": "{n} recently finished",
10
+ "activity.later": "{n} later",
10
11
  "activity.unnamed": "Ungrouped",
11
12
  "activity.more": "and {n} more",
12
13
  "activity.listSeparator": ", ",
@@ -36,5 +37,13 @@
36
37
  "notify.waiting.title": "{title} needs you",
37
38
  "notify.waiting.body": "{reason} · {workspace}",
38
39
  "notify.finished.title": "{title} finished",
39
- "notify.finished.body": "Finished and not opened yet · {workspace}"
40
+ "notify.finished.body": "Finished and not opened yet · {workspace}",
41
+ "later.title": "Later",
42
+ "later.mark": "Mark for later",
43
+ "later.markAria": "Mark {title} for later",
44
+ "later.unmark": "Stop deferring",
45
+ "later.unmarkAria": "Stop deferring {title}",
46
+ "later.note": "Why later? e.g. waiting for reboot",
47
+ "later.groupAria": "Conversations parked for later",
48
+ "later.noteFallback": "No note"
40
49
  }
package/locale/zh.json CHANGED
@@ -7,6 +7,7 @@
7
7
  "activity.waiting": "{n} 个等待你处理",
8
8
  "activity.running": "{n} 个运行中",
9
9
  "activity.done": "{n} 个刚刚完成",
10
+ "activity.later": "{n} 个稍后处理",
10
11
  "activity.unnamed": "未分组",
11
12
  "activity.more": "等 {n} 个",
12
13
  "activity.listSeparator": "、",
@@ -36,5 +37,13 @@
36
37
  "notify.waiting.title": "{title} 需要你",
37
38
  "notify.waiting.body": "{reason} · {workspace}",
38
39
  "notify.finished.title": "{title} 已完成",
39
- "notify.finished.body": "已完成且尚未打开 · {workspace}"
40
+ "notify.finished.body": "已完成且尚未打开 · {workspace}",
41
+ "later.title": "稍后处理",
42
+ "later.mark": "标记为稍后处理",
43
+ "later.markAria": "将 {title} 标记为稍后处理",
44
+ "later.unmark": "取消稍后处理",
45
+ "later.unmarkAria": "取消 {title} 的稍后处理",
46
+ "later.note": "为什么稍后?例如:等待重启",
47
+ "later.groupAria": "已推迟到稍后处理的会话",
48
+ "later.noteFallback": "无备注"
40
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workspace-status",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
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",