@clagentic/console 1.5.0-beta.2 → 1.5.0-beta.4
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 +18 -14
- package/bin/cli.js +1 -0
- package/lib/cli-sessions.js +71 -18
- package/lib/config.js +80 -6
- package/lib/daemon-projects.js +1 -1
- package/lib/daemon.js +142 -26
- package/lib/pages.js +1 -42
- package/lib/project-connection.js +4 -8
- package/lib/project-external-trigger.js +62 -7
- package/lib/project-http.js +17 -1
- package/lib/project-loop.js +3 -2
- package/lib/project-notifications.js +3 -18
- package/lib/project-sessions.js +68 -27
- package/lib/project-team.js +417 -0
- package/lib/project-user-message.js +5 -10
- package/lib/project.js +53 -53
- package/lib/public/app.js +7 -15
- package/lib/public/css/home-hub.css +36 -0
- package/lib/public/css/icon-strip.css +28 -126
- package/lib/public/css/menus.css +2 -2
- package/lib/public/css/team-panel.css +149 -0
- package/lib/public/index.html +72 -15
- package/lib/public/modules/admin.js +1 -52
- package/lib/public/modules/agent-picker.js +11 -3
- package/lib/public/modules/app-cursors.js +43 -47
- package/lib/public/modules/app-home-hub.js +12 -0
- package/lib/public/modules/app-messages.js +18 -12
- package/lib/public/modules/app-rendering.js +1 -2
- package/lib/public/modules/server-settings.js +74 -5
- package/lib/public/modules/sidebar-mobile.js +9 -88
- package/lib/public/modules/sidebar-projects.js +1 -1
- package/lib/public/modules/sidebar-sessions.js +6 -2
- package/lib/public/modules/sidebar-users.js +37 -307
- package/lib/public/modules/team-panel.js +331 -0
- package/lib/public/modules/tools.js +3 -0
- package/lib/public/modules/user-settings.js +0 -3
- package/lib/public/style.css +1 -0
- package/lib/sdk-bridge.js +121 -8
- package/lib/sdk-message-processor.js +39 -4
- package/lib/sdk-worker.js +2 -2
- package/lib/server-admin.js +1 -86
- package/lib/server-auth.js +13 -124
- package/lib/server-dm.js +2 -7
- package/lib/server-palette.js +9 -20
- package/lib/server-settings.js +41 -243
- package/lib/server-skills.js +11 -13
- package/lib/server.js +37 -60
- package/lib/sessions.js +16 -50
- package/lib/terminal-manager.js +13 -15
- package/lib/users-auth.js +0 -38
- package/lib/users.js +14 -11
- package/lib/ws-schema.js +12 -0
- package/lib/yoke/adapters/claude.js +5 -0
- package/package.json +1 -1
|
@@ -3,13 +3,9 @@
|
|
|
3
3
|
// Contains only human-user functionality; all mate-specific rendering is removed.
|
|
4
4
|
|
|
5
5
|
import { userAvatarUrl } from './avatar.js';
|
|
6
|
-
import { escapeHtml } from './utils.js';
|
|
7
|
-
import { iconHtml, refreshIcons } from './icons.js';
|
|
8
6
|
import { store } from './store.js';
|
|
9
7
|
import { getWs } from './ws-ref.js';
|
|
10
|
-
import {
|
|
11
|
-
import { spawnDustParticles } from './sidebar.js';
|
|
12
|
-
import { openDm } from './app-dm.js';
|
|
8
|
+
import { toggleTeamPanel } from './team-panel.js';
|
|
13
9
|
|
|
14
10
|
function sendWs(msg) {
|
|
15
11
|
var ws = getWs();
|
|
@@ -18,7 +14,6 @@ function sendWs(msg) {
|
|
|
18
14
|
|
|
19
15
|
// --- User strip state ---
|
|
20
16
|
var cachedAllUsers = [];
|
|
21
|
-
var cachedOnlineUserIds = [];
|
|
22
17
|
var cachedDmFavorites = [];
|
|
23
18
|
var cachedDmConversations = [];
|
|
24
19
|
var cachedDmUnread = {};
|
|
@@ -27,34 +22,46 @@ var currentDmUserId = null;
|
|
|
27
22
|
var dmPickerOpen = false;
|
|
28
23
|
var cachedDmRemovedUsers = {};
|
|
29
24
|
|
|
25
|
+
|
|
30
26
|
// setMentionActive / clearAllMentionActive kept as no-ops for call-site
|
|
31
27
|
// compatibility — mentions were a mates-only feature.
|
|
32
28
|
export function setMentionActive(mateId, active) { /* no-op: mates removed */ }
|
|
33
29
|
export function clearAllMentionActive() { /* no-op: mates removed */ }
|
|
34
30
|
|
|
35
|
-
var _lastUserStripJson = "";
|
|
36
|
-
|
|
37
31
|
// --- Icon strip tooltip ---
|
|
38
32
|
var iconStripTooltip = null;
|
|
39
33
|
|
|
40
|
-
// --- DM user context menu ---
|
|
41
|
-
var userCtxMenu = null;
|
|
42
|
-
|
|
43
34
|
export function initSidebarUsers() {
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
// Wire the permanent Teams button in the icon strip.
|
|
36
|
+
var teamBtn = document.getElementById("icon-strip-team-btn");
|
|
37
|
+
if (teamBtn) {
|
|
38
|
+
teamBtn.addEventListener("click", function () {
|
|
39
|
+
if (typeof toggleTeamPanel === "function") toggleTeamPanel();
|
|
40
|
+
});
|
|
41
|
+
teamBtn.addEventListener("mouseenter", function () { showIconTooltip(teamBtn, "Team"); });
|
|
42
|
+
teamBtn.addEventListener("mouseleave", hideIconTooltip);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Keep local caches in sync with the store so getCachedDm* accessors and
|
|
46
|
+
// the DM picker remain accurate even though nothing renders in the icon strip.
|
|
47
|
+
store.subscribe(['cachedAllUsers', 'cachedOnlineIds', 'cachedDmFavorites', 'cachedDmConversations', 'dmUnread', 'dmRemovedUsers', 'myUserId'], function (state) {
|
|
48
|
+
cachedAllUsers = state.cachedAllUsers || [];
|
|
49
|
+
cachedDmFavorites = state.cachedDmFavorites || [];
|
|
50
|
+
cachedDmConversations = state.cachedDmConversations || [];
|
|
51
|
+
cachedDmUnread = state.dmUnread || {};
|
|
52
|
+
cachedDmRemovedUsers = state.dmRemovedUsers || {};
|
|
53
|
+
cachedMyUserId = state.myUserId;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Request agent list on connect/reconnect so favorites are populated.
|
|
57
|
+
store.subscribe(['connected'], function (state, prev) {
|
|
58
|
+
if (state.connected && !prev.connected) {
|
|
59
|
+
sendWs({ type: "list_agents" });
|
|
54
60
|
}
|
|
55
61
|
});
|
|
56
62
|
}
|
|
57
63
|
|
|
64
|
+
|
|
58
65
|
export function showIconTooltip(el, text) {
|
|
59
66
|
hideIconTooltip();
|
|
60
67
|
var tip = document.createElement("div");
|
|
@@ -94,63 +101,10 @@ export function hideIconTooltip() {
|
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
103
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
document.removeEventListener("click", handleUserCtxOutsideClick, true);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function showUserCtxMenu(anchorEl, user) {
|
|
106
|
-
closeUserCtxMenu();
|
|
107
|
-
if (closeProjectCtxMenu) closeProjectCtxMenu();
|
|
108
|
-
|
|
109
|
-
var menu = document.createElement("div");
|
|
110
|
-
menu.className = "project-ctx-menu";
|
|
111
|
-
|
|
112
|
-
var removeItem = document.createElement("button");
|
|
113
|
-
removeItem.className = "project-ctx-item project-ctx-delete";
|
|
114
|
-
removeItem.innerHTML = iconHtml("user-minus") + " <span>Remove from favorites</span>";
|
|
115
|
-
removeItem.addEventListener("click", function (e) {
|
|
116
|
-
e.stopPropagation();
|
|
117
|
-
var iconRect = anchorEl.getBoundingClientRect();
|
|
118
|
-
if (spawnDustParticles) spawnDustParticles(iconRect.left + iconRect.width / 2, iconRect.top + iconRect.height / 2);
|
|
119
|
-
closeUserCtxMenu();
|
|
120
|
-
cachedDmRemovedUsers[user.id] = true;
|
|
121
|
-
var dr = Object.assign({}, store.get('dmRemovedUsers')); dr[user.id] = true; store.set({ dmRemovedUsers: dr });
|
|
122
|
-
sendWs({ type: "dm_remove_favorite", targetUserId: user.id });
|
|
123
|
-
});
|
|
124
|
-
menu.appendChild(removeItem);
|
|
125
|
-
|
|
126
|
-
document.body.appendChild(menu);
|
|
127
|
-
userCtxMenu = menu;
|
|
128
|
-
refreshIcons();
|
|
129
|
-
|
|
130
|
-
requestAnimationFrame(function () {
|
|
131
|
-
var rect = anchorEl.getBoundingClientRect();
|
|
132
|
-
menu.style.position = "fixed";
|
|
133
|
-
menu.style.left = (rect.right + 6) + "px";
|
|
134
|
-
menu.style.top = rect.top + "px";
|
|
135
|
-
var menuRect = menu.getBoundingClientRect();
|
|
136
|
-
if (menuRect.right > window.innerWidth - 8) {
|
|
137
|
-
menu.style.left = (rect.left - menuRect.width - 6) + "px";
|
|
138
|
-
}
|
|
139
|
-
if (menuRect.bottom > window.innerHeight - 8) {
|
|
140
|
-
menu.style.top = (window.innerHeight - menuRect.height - 8) + "px";
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
setTimeout(function () {
|
|
145
|
-
document.addEventListener("click", handleUserCtxOutsideClick, true);
|
|
146
|
-
}, 0);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function handleUserCtxOutsideClick(e) {
|
|
150
|
-
if (userCtxMenu && !userCtxMenu.contains(e.target)) {
|
|
151
|
-
closeUserCtxMenu();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
104
|
+
// closeUserCtxMenu: no-op stub retained for sidebar-projects.js and sidebar.js
|
|
105
|
+
// imports. The user context menu was attached to per-user icon-strip items that
|
|
106
|
+
// no longer exist; nothing can open it, so nothing needs to close it.
|
|
107
|
+
export function closeUserCtxMenu() { /* no-op: icon-strip user context menu removed */ }
|
|
154
108
|
|
|
155
109
|
var _lastSidebarPresenceIds = [];
|
|
156
110
|
export function renderSidebarPresence(onlineUsers) {
|
|
@@ -185,216 +139,7 @@ export function renderSidebarPresence(onlineUsers) {
|
|
|
185
139
|
}
|
|
186
140
|
}
|
|
187
141
|
|
|
188
|
-
// renderUserStrip: call with no args to read from store (subscriber pattern).
|
|
189
|
-
export function renderUserStrip(allUsers, onlineUserIds, myUserId, dmFavorites, dmConversations, dmUnread, dmRemovedUsers) {
|
|
190
|
-
if (arguments.length === 0) {
|
|
191
|
-
var s = store.snap();
|
|
192
|
-
allUsers = s.cachedAllUsers;
|
|
193
|
-
onlineUserIds = s.cachedOnlineIds;
|
|
194
|
-
myUserId = s.myUserId;
|
|
195
|
-
dmFavorites = s.cachedDmFavorites;
|
|
196
|
-
dmConversations = s.cachedDmConversations;
|
|
197
|
-
dmUnread = s.dmUnread;
|
|
198
|
-
dmRemovedUsers = s.dmRemovedUsers;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
var fingerprint = JSON.stringify([allUsers, onlineUserIds, dmFavorites, dmConversations, dmUnread, dmRemovedUsers]);
|
|
202
|
-
if (fingerprint === _lastUserStripJson) return;
|
|
203
|
-
_lastUserStripJson = fingerprint;
|
|
204
|
-
|
|
205
|
-
cachedAllUsers = allUsers || [];
|
|
206
|
-
cachedOnlineUserIds = onlineUserIds || [];
|
|
207
|
-
cachedDmFavorites = dmFavorites || [];
|
|
208
|
-
cachedDmConversations = dmConversations || [];
|
|
209
|
-
cachedDmUnread = dmUnread || {};
|
|
210
|
-
cachedDmRemovedUsers = dmRemovedUsers || {};
|
|
211
|
-
cachedMyUserId = myUserId;
|
|
212
|
-
|
|
213
|
-
var container = document.getElementById("icon-strip-users");
|
|
214
|
-
if (!container) return;
|
|
215
|
-
|
|
216
|
-
var allOthers = cachedAllUsers.filter(function (u) { return u.id !== myUserId; });
|
|
217
|
-
|
|
218
|
-
// Hide section if no other users
|
|
219
|
-
if (allOthers.length === 0) {
|
|
220
|
-
container.innerHTML = "";
|
|
221
|
-
container.classList.add("hidden");
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Show only favorites + users with unread + users with DM conversations
|
|
226
|
-
var others = allOthers.filter(function (u) {
|
|
227
|
-
if (cachedDmRemovedUsers[u.id]) return false;
|
|
228
|
-
if (cachedDmFavorites.indexOf(u.id) !== -1) return true;
|
|
229
|
-
if (cachedDmUnread[u.id] && cachedDmUnread[u.id] > 0) return true;
|
|
230
|
-
if (cachedDmConversations.indexOf(u.id) !== -1) return true;
|
|
231
|
-
return false;
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
container.classList.remove("hidden");
|
|
235
|
-
container.innerHTML = "";
|
|
236
|
-
|
|
237
|
-
for (var i = 0; i < others.length; i++) {
|
|
238
|
-
(function (u) {
|
|
239
|
-
var el = document.createElement("div");
|
|
240
|
-
el.className = "icon-strip-user";
|
|
241
|
-
el.dataset.userId = u.id;
|
|
242
|
-
if (u.id === currentDmUserId) el.classList.add("active");
|
|
243
|
-
if (onlineUserIds.indexOf(u.id) !== -1) el.classList.add("online");
|
|
244
|
-
|
|
245
|
-
var pill = document.createElement("span");
|
|
246
|
-
pill.className = "icon-strip-pill";
|
|
247
|
-
el.appendChild(pill);
|
|
248
|
-
|
|
249
|
-
var avatar = document.createElement("img");
|
|
250
|
-
avatar.className = "icon-strip-user-avatar";
|
|
251
|
-
avatar.src = userAvatarUrl(u, 34);
|
|
252
|
-
avatar.alt = u.displayName;
|
|
253
|
-
el.appendChild(avatar);
|
|
254
|
-
|
|
255
|
-
var onlineDot = document.createElement("span");
|
|
256
|
-
onlineDot.className = "icon-strip-user-online";
|
|
257
|
-
el.appendChild(onlineDot);
|
|
258
|
-
|
|
259
|
-
var badge = document.createElement("span");
|
|
260
|
-
badge.className = "icon-strip-user-badge";
|
|
261
|
-
badge.dataset.userId = u.id;
|
|
262
|
-
el.appendChild(badge);
|
|
263
|
-
|
|
264
|
-
var unreadCount = cachedDmUnread[u.id] || 0;
|
|
265
|
-
if (unreadCount > 0 && u.id !== currentDmUserId) {
|
|
266
|
-
badge.textContent = unreadCount > 99 ? "99+" : String(unreadCount);
|
|
267
|
-
badge.classList.add("has-unread");
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
el.addEventListener("mouseenter", function () { showIconTooltip(el, u.displayName); });
|
|
271
|
-
el.addEventListener("mouseleave", hideIconTooltip);
|
|
272
|
-
|
|
273
|
-
el.addEventListener("click", function () {
|
|
274
|
-
if (openDm) openDm(u.id);
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
el.addEventListener("contextmenu", function (e) {
|
|
278
|
-
e.preventDefault();
|
|
279
|
-
e.stopPropagation();
|
|
280
|
-
showUserCtxMenu(el, u);
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
container.appendChild(el);
|
|
284
|
-
})(others[i]);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// Add user (+) button — only shown in multi-user mode
|
|
288
|
-
if (store.get('isMultiUserMode')) {
|
|
289
|
-
var addBtn = document.createElement("button");
|
|
290
|
-
addBtn.className = "icon-strip-invite";
|
|
291
|
-
addBtn.innerHTML = iconHtml("user-plus");
|
|
292
|
-
addBtn.addEventListener("click", function (e) {
|
|
293
|
-
e.stopPropagation();
|
|
294
|
-
toggleDmUserPicker(addBtn);
|
|
295
|
-
});
|
|
296
|
-
addBtn.addEventListener("mouseenter", function () { showIconTooltip(addBtn, "Add user"); });
|
|
297
|
-
addBtn.addEventListener("mouseleave", hideIconTooltip);
|
|
298
|
-
container.appendChild(addBtn);
|
|
299
|
-
refreshIcons();
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
function toggleDmUserPicker(anchorEl) {
|
|
304
|
-
if (dmPickerOpen) {
|
|
305
|
-
closeDmUserPicker();
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
dmPickerOpen = true;
|
|
309
|
-
|
|
310
|
-
var picker = document.createElement("div");
|
|
311
|
-
picker.className = "dm-user-picker";
|
|
312
|
-
picker.id = "dm-user-picker";
|
|
313
|
-
|
|
314
|
-
var searchInput = document.createElement("input");
|
|
315
|
-
searchInput.className = "dm-user-picker-search";
|
|
316
|
-
searchInput.type = "text";
|
|
317
|
-
searchInput.placeholder = "Search users...";
|
|
318
|
-
picker.appendChild(searchInput);
|
|
319
|
-
|
|
320
|
-
var usersLabel = document.createElement("div");
|
|
321
|
-
usersLabel.className = "dm-user-picker-section";
|
|
322
|
-
usersLabel.textContent = "Users";
|
|
323
|
-
picker.appendChild(usersLabel);
|
|
324
|
-
|
|
325
|
-
var listEl = document.createElement("div");
|
|
326
|
-
listEl.className = "dm-user-picker-list";
|
|
327
|
-
picker.appendChild(listEl);
|
|
328
|
-
|
|
329
|
-
document.body.appendChild(picker);
|
|
330
|
-
var rect = anchorEl.getBoundingClientRect();
|
|
331
|
-
picker.style.left = (rect.right + 8) + "px";
|
|
332
|
-
picker.style.bottom = (window.innerHeight - rect.bottom) + "px";
|
|
333
142
|
|
|
334
|
-
function renderPickerList(filter) {
|
|
335
|
-
listEl.innerHTML = "";
|
|
336
|
-
var allOthers = cachedAllUsers.filter(function (u) { return u.id !== cachedMyUserId; });
|
|
337
|
-
var available = allOthers.filter(function (u) {
|
|
338
|
-
return cachedDmFavorites.indexOf(u.id) === -1;
|
|
339
|
-
});
|
|
340
|
-
if (filter) {
|
|
341
|
-
var lf = filter.toLowerCase();
|
|
342
|
-
available = available.filter(function (u) {
|
|
343
|
-
return (u.displayName && u.displayName.toLowerCase().indexOf(lf) !== -1) ||
|
|
344
|
-
(u.username && u.username.toLowerCase().indexOf(lf) !== -1);
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
if (available.length === 0) {
|
|
348
|
-
var emptyEl = document.createElement("div");
|
|
349
|
-
emptyEl.className = "dm-user-picker-empty";
|
|
350
|
-
emptyEl.textContent = filter ? "No users found" : "No more users to add";
|
|
351
|
-
listEl.appendChild(emptyEl);
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
for (var i = 0; i < available.length; i++) {
|
|
355
|
-
(function (u) {
|
|
356
|
-
var item = document.createElement("div");
|
|
357
|
-
item.className = "dm-user-picker-item";
|
|
358
|
-
|
|
359
|
-
var av = document.createElement("img");
|
|
360
|
-
av.className = "dm-user-picker-avatar";
|
|
361
|
-
av.src = userAvatarUrl(u, 28);
|
|
362
|
-
av.alt = u.displayName;
|
|
363
|
-
item.appendChild(av);
|
|
364
|
-
|
|
365
|
-
var name = document.createElement("span");
|
|
366
|
-
name.className = "dm-user-picker-name";
|
|
367
|
-
name.textContent = u.displayName;
|
|
368
|
-
item.appendChild(name);
|
|
369
|
-
|
|
370
|
-
item.addEventListener("click", function () {
|
|
371
|
-
sendWs({ type: "dm_add_favorite", targetUserId: u.id });
|
|
372
|
-
closeDmUserPicker();
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
listEl.appendChild(item);
|
|
376
|
-
})(available[i]);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
renderPickerList("");
|
|
381
|
-
searchInput.addEventListener("input", function () {
|
|
382
|
-
renderPickerList(searchInput.value);
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
setTimeout(function () { searchInput.focus(); }, 50);
|
|
386
|
-
|
|
387
|
-
function onDocClick(e) {
|
|
388
|
-
if (!picker.contains(e.target) && e.target !== anchorEl && !anchorEl.contains(e.target)) {
|
|
389
|
-
closeDmUserPicker();
|
|
390
|
-
document.removeEventListener("click", onDocClick, true);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
setTimeout(function () {
|
|
394
|
-
document.addEventListener("click", onDocClick, true);
|
|
395
|
-
}, 10);
|
|
396
|
-
picker._docClickHandler = onDocClick;
|
|
397
|
-
}
|
|
398
143
|
|
|
399
144
|
export function closeDmUserPicker() {
|
|
400
145
|
dmPickerOpen = false;
|
|
@@ -409,28 +154,13 @@ export function closeDmUserPicker() {
|
|
|
409
154
|
|
|
410
155
|
export function setCurrentDmUser(userId) {
|
|
411
156
|
currentDmUserId = userId;
|
|
412
|
-
//
|
|
413
|
-
|
|
414
|
-
for (var i = 0; i < items.length; i++) {
|
|
415
|
-
if (items[i].dataset.userId === userId) {
|
|
416
|
-
items[i].classList.add("active");
|
|
417
|
-
} else {
|
|
418
|
-
items[i].classList.remove("active");
|
|
419
|
-
}
|
|
420
|
-
}
|
|
157
|
+
// Icon-strip user avatars are gone; active DM state is tracked in currentDmUserId
|
|
158
|
+
// for use by the team panel and DM picker.
|
|
421
159
|
}
|
|
422
160
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
if (count && count > 0) {
|
|
427
|
-
badge.textContent = count > 99 ? "99+" : String(count);
|
|
428
|
-
badge.classList.add("has-unread");
|
|
429
|
-
} else {
|
|
430
|
-
badge.textContent = "";
|
|
431
|
-
badge.classList.remove("has-unread");
|
|
432
|
-
}
|
|
433
|
-
}
|
|
161
|
+
// updateDmBadge: no-op — DM unread counts are now shown only inside the team panel.
|
|
162
|
+
// Future: wire DM unread count to team panel badge. No-op until team panel supports per-user DM count display.
|
|
163
|
+
export function updateDmBadge(userId, count) { /* no-op: icon-strip user badges removed */ }
|
|
434
164
|
|
|
435
165
|
export function getCurrentDmUserId() {
|
|
436
166
|
return currentDmUserId;
|