agentchannel 0.7.24 → 0.7.25

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 (2) hide show
  1. package/package.json +1 -1
  2. package/ui/app.js +25 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentchannel",
3
- "version": "0.7.24",
3
+ "version": "0.7.25",
4
4
  "description": "Encrypted cross-network messaging for AI coding agents via MCP",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
package/ui/app.js CHANGED
@@ -207,6 +207,7 @@ function render() {
207
207
 
208
208
  var html = "";
209
209
  var lastSender = null;
210
+ var lastTimestamp = 0;
210
211
  var lastChannel = null;
211
212
 
212
213
  for (var i = 0; i < filtered.length; i++) {
@@ -230,28 +231,27 @@ function render() {
230
231
 
231
232
  var time = new Date(msg.timestamp).toLocaleTimeString([], {hour:"2-digit", minute:"2-digit"});
232
233
  var color = getColor(msg.sender);
233
- var isGrouped = lastSender === msg.sender && lastChannel === msg.channel;
234
+ // Don't group each message shows sender + time independently
235
+ // But reduce spacing if same sender within 5 minutes
236
+ var isCompact = lastSender === msg.sender && lastChannel === msg.channel && (msg.timestamp - lastTimestamp < 300000);
234
237
  var isMention = msg.content && msg.content.indexOf('@' + CONFIG.name) !== -1;
235
238
 
236
- if (!isGrouped) {
237
- if (lastSender !== null) html += '</div>'; // close previous conversation
238
- html += '<div class="conversation"' + (isMention ? ' style="background:var(--mention-bg);border-left:3px solid var(--mention-text);padding-left:12px;margin-left:-15px;border-radius:4px"' : '') + '>';
239
- html += '<div class="conversation__label">';
240
- var msgFp = msg.senderKey ? '(' + msg.senderKey.slice(0, 4) + ')' : '';
241
- html += '<span class="conversation__sender">' + esc(msg.sender) + '<span style="color:var(--text-muted);font-weight:400;font-size:0.65rem;margin-left:2px">' + msgFp + '</span></span>';
242
- if (activeChannel === "all") {
243
- var mlabel = msg.subchannel ? '#' + esc(msg.channel) + ' ##' + esc(msg.subchannel) : '#' + esc(msg.channel);
244
- html += '<span class="conversation__channel">' + mlabel + '</span>';
245
- }
246
- html += '<span class="conversation__time">' + time + '</span>';
247
- html += '</div>';
248
- html += '<button class="msg-copy" onclick="window.copyMsg(this)" data-msg="' + esc(msg.content).replace(/"/g, '&quot;') + '" title="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg></button>';
239
+ if (lastSender !== null) html += '</div>'; // close previous
240
+ html += '<div class="conversation" style="' + (isCompact ? 'margin-top:4px' : 'margin-top:16px') + (isMention ? ';background:var(--mention-bg);border-left:3px solid var(--mention-text);padding-left:12px;margin-left:-15px;border-radius:4px' : '') + '">';
241
+ html += '<div class="conversation__label">';
242
+ var msgFp = msg.senderKey ? '(' + msg.senderKey.slice(0, 4) + ')' : '';
243
+ html += '<span class="conversation__sender">' + esc(msg.sender) + '<span style="color:var(--text-muted);font-weight:400;font-size:0.65rem;margin-left:2px">' + msgFp + '</span></span>';
244
+ if (activeChannel === "@me") {
245
+ var mlabel = msg.subchannel ? '#' + esc(msg.channel) + ' ##' + esc(msg.subchannel) : '#' + esc(msg.channel);
246
+ html += '<span class="conversation__channel">' + mlabel + '</span>';
249
247
  }
250
-
251
- html += '<div class="conversation__text' + (isGrouped ? ' conversation__text--grouped' : '') + '">' + richText(msg.content) + '</div>';
248
+ html += '<span class="conversation__time">' + time + '</span>';
249
+ html += '</div>';
250
+ html += '<div class="conversation__text">' + richText(msg.content) + '</div>';
252
251
 
253
252
  lastSender = msg.sender;
254
253
  lastChannel = msg.channel;
254
+ lastTimestamp = msg.timestamp;
255
255
  }
256
256
  if (lastSender !== null) html += '</div>'; // close last conversation
257
257
 
@@ -290,10 +290,10 @@ function renderSidebar() {
290
290
  if (mentionCount > 0 || activeChannel === "@me") {
291
291
  var meDiv = document.createElement("div");
292
292
  meDiv.className = "sidebar__channel" + (activeChannel === "@me" ? " active" : "");
293
- meDiv.innerHTML = '<span style="color:var(--mention-text);margin-right:2px">@</span>Mentions' + (mentionCount ? '<span class="badge" style="background:var(--mention-text);color:#fff;opacity:1">' + mentionCount + '</span>' : "");
293
+ meDiv.innerHTML = '<span style="color:var(--mention-text);margin-right:2px">@</span>' + (CONFIG.name || 'Me') + (mentionCount ? '<span class="badge" style="background:var(--mention-text);color:#fff;opacity:1">' + mentionCount + '</span>' : "");
294
294
  meDiv.onclick = function() {
295
295
  activeChannel = "@me";
296
- headerName.textContent = "@Me";
296
+ headerName.textContent = "@" + (CONFIG.name || "Me");
297
297
  headerDesc.textContent = "Messages mentioning you";
298
298
  document.title = "AgentChannel — @Me";
299
299
  renderSidebar();
@@ -895,7 +895,7 @@ function openSettings() {
895
895
  var overlay = document.createElement('div');
896
896
  overlay.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:9999;display:flex;align-items:center;justify-content:center';
897
897
  overlay.onclick = function(e) { if (e.target === overlay) document.body.removeChild(overlay); };
898
- overlay.innerHTML = '<div style="background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:24px;width:360px;max-width:90%">' +
898
+ overlay.innerHTML = '<div style="background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:24px;width:360px;max-width:90%;box-shadow:0 8px 32px rgba(0,0,0,0.5)">' +
899
899
  '<h3 style="margin-bottom:16px;font-size:1rem;color:var(--text)">Settings</h3>' +
900
900
  '<label style="font-size:0.75rem;color:var(--text-muted);display:block;margin-bottom:4px">Display Name</label>' +
901
901
  '<input id="settings-name" value="' + (CONFIG.name || '') + '" style="width:100%;padding:8px 12px;border:1px solid var(--border);border-radius:6px;font-size:0.85rem;background:var(--bg-alt);color:var(--text);margin-bottom:16px;outline:none">' +
@@ -906,9 +906,14 @@ function openSettings() {
906
906
  '</div>' +
907
907
  '<label style="font-size:0.75rem;color:var(--text-muted);display:block;margin-bottom:4px">Version</label>' +
908
908
  '<div style="font-size:0.8rem;color:var(--text-muted);margin-bottom:20px">v' + (CONFIG.version || '?') + '</div>' +
909
+ '<div style="border-top:1px solid var(--border);padding-top:16px;margin-bottom:16px;font-size:0.7rem;color:var(--text-muted);line-height:1.6">' +
910
+ '<div style="margin-bottom:4px">&#128274; Messages are end-to-end encrypted (AES-256-GCM)</div>' +
911
+ '<div style="margin-bottom:4px">&#128273; Your private key never leaves this device</div>' +
912
+ '<div>&#128206; Fingerprint = your public identity (safe to share)</div>' +
913
+ '</div>' +
909
914
  '<div style="display:flex;gap:8px;justify-content:flex-end">' +
910
915
  '<button onclick="this.closest(\'div[style*=fixed]\').remove()" style="padding:8px 16px;border:1px solid var(--border);border-radius:6px;background:var(--bg-alt);color:var(--text);cursor:pointer;font-size:0.8rem">Cancel</button>' +
911
- '<button onclick="saveName()" style="padding:8px 16px;border:none;border-radius:6px;background:#00e676;color:#000;cursor:pointer;font-size:0.8rem;font-weight:600">Save</button>' +
916
+ '<button onclick="saveName()" style="padding:8px 16px;border:none;border-radius:6px;background:#1a1a1a;color:#fff;cursor:pointer;font-size:0.8rem;font-weight:600">Save</button>' +
912
917
  '</div></div>';
913
918
  document.body.appendChild(overlay);
914
919
  }