clay-server 2.13.0-beta.1 → 2.13.0-beta.2

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/lib/public/app.js CHANGED
@@ -553,6 +553,37 @@ import { initMateWizard, openMateWizard, closeMateWizard, handleMateCreated } fr
553
553
  }
554
554
 
555
555
  function enterDmMode(key, targetUser, messages) {
556
+ // Clean up previous DM/mate state before entering new one
557
+ if (dmMode) {
558
+ disconnectMateWs();
559
+ hideMateSidebar();
560
+ hideKnowledge();
561
+ // Reset dm-header-bar
562
+ var prevHeader = document.getElementById("dm-header-bar");
563
+ if (prevHeader) {
564
+ prevHeader.style.display = "";
565
+ prevHeader.style.background = "";
566
+ var prevTag = prevHeader.querySelector(".dm-header-mate-tag");
567
+ if (prevTag) prevTag.remove();
568
+ }
569
+ // Restore terminal button
570
+ var prevTermBtn = document.getElementById("terminal-toggle-btn");
571
+ if (prevTermBtn) prevTermBtn.style.display = "";
572
+ // Remove dm-mode classes
573
+ var prevMain = document.getElementById("main-column");
574
+ if (prevMain) prevMain.classList.remove("dm-mode");
575
+ var prevSidebar = document.getElementById("sidebar-column");
576
+ if (prevSidebar) prevSidebar.classList.remove("dm-mode");
577
+ var prevResize = document.getElementById("sidebar-resize-handle");
578
+ if (prevResize) prevResize.classList.remove("dm-mode");
579
+ // Reset chat title bar
580
+ var prevTitleBar = document.querySelector(".title-bar-content");
581
+ if (prevTitleBar) {
582
+ prevTitleBar.style.background = "";
583
+ prevTitleBar.classList.remove("mate-dm-active");
584
+ }
585
+ }
586
+
556
587
  dmMode = true;
557
588
  dmKey = key;
558
589
  dmTargetUser = targetUser;
@@ -597,6 +628,13 @@ import { initMateWizard, openMateWizard, closeMateWizard, handleMateCreated } fr
597
628
  // Hide terminal button (not relevant for mate)
598
629
  var termBtn = document.getElementById("terminal-toggle-btn");
599
630
  if (termBtn) termBtn.style.display = "none";
631
+ // Apply mate color to chat title bar
632
+ var mateColor = (targetUser.profile && targetUser.profile.avatarColor) || targetUser.avatarColor || "#7c3aed";
633
+ var titleBarContent = document.querySelector(".title-bar-content");
634
+ if (titleBarContent) {
635
+ titleBarContent.style.background = mateColor;
636
+ titleBarContent.classList.add("mate-dm-active");
637
+ }
600
638
  }
601
639
 
602
640
  // Hide user-island (my avatar behind it becomes visible)
@@ -623,21 +661,21 @@ import { initMateWizard, openMateWizard, closeMateWizard, handleMateCreated } fr
623
661
  var dmHeaderBar = document.getElementById("dm-header-bar");
624
662
  var dmAvatar = document.getElementById("dm-header-avatar");
625
663
  var dmName = document.getElementById("dm-header-name");
626
- if (dmAvatar) {
627
- dmAvatar.src = "https://api.dicebear.com/9.x/" + (targetUser.avatarStyle || "thumbs") + "/svg?seed=" + encodeURIComponent(targetUser.avatarSeed || targetUser.username) + "&size=28";
628
- }
629
- if (dmName) dmName.textContent = targetUser.displayName;
630
- if (dmHeaderBar && targetUser.avatarColor) {
631
- dmHeaderBar.style.background = targetUser.avatarColor;
632
- }
633
- // Add mate tag if this is a mate
634
- var existingTag = dmHeaderBar ? dmHeaderBar.querySelector(".dm-header-mate-tag") : null;
635
- if (existingTag) existingTag.remove();
636
- if (targetUser.isMate && dmHeaderBar) {
637
- var mateTag = document.createElement("span");
638
- mateTag.className = "dm-header-mate-tag";
639
- mateTag.textContent = "MATE";
640
- dmHeaderBar.appendChild(mateTag);
664
+ if (isMate) {
665
+ // Mate uses project chat title bar, hide DM header
666
+ if (dmHeaderBar) dmHeaderBar.style.display = "none";
667
+ } else {
668
+ if (dmHeaderBar) dmHeaderBar.style.display = "";
669
+ if (dmAvatar) {
670
+ dmAvatar.src = "https://api.dicebear.com/9.x/" + (targetUser.avatarStyle || "thumbs") + "/svg?seed=" + encodeURIComponent(targetUser.avatarSeed || targetUser.username) + "&size=28";
671
+ }
672
+ if (dmName) dmName.textContent = targetUser.displayName;
673
+ if (dmHeaderBar && targetUser.avatarColor) {
674
+ dmHeaderBar.style.background = targetUser.avatarColor;
675
+ }
676
+ // Remove mate tag for regular DM
677
+ var existingTag = dmHeaderBar ? dmHeaderBar.querySelector(".dm-header-mate-tag") : null;
678
+ if (existingTag) existingTag.remove();
641
679
  }
642
680
  }
643
681
  }
@@ -669,10 +707,17 @@ import { initMateWizard, openMateWizard, closeMateWizard, handleMateCreated } fr
669
707
  // Reset DM header
670
708
  var dmHeaderBar = document.getElementById("dm-header-bar");
671
709
  if (dmHeaderBar) {
710
+ dmHeaderBar.style.display = "";
672
711
  dmHeaderBar.style.background = "";
673
712
  var mateTag = dmHeaderBar.querySelector(".dm-header-mate-tag");
674
713
  if (mateTag) mateTag.remove();
675
714
  }
715
+ // Reset chat title bar
716
+ var titleBarContent = document.querySelector(".title-bar-content");
717
+ if (titleBarContent) {
718
+ titleBarContent.style.background = "";
719
+ titleBarContent.classList.remove("mate-dm-active");
720
+ }
676
721
 
677
722
  // Restore user-island (covers my avatar again)
678
723
  var userIsland = document.getElementById("user-island");
@@ -1,3 +1,39 @@
1
+ /* === Mate Chat Title Bar === */
2
+
3
+ .title-bar-content.mate-dm-active {
4
+ border-bottom: none;
5
+ }
6
+
7
+ .title-bar-content.mate-dm-active #header-left,
8
+ .title-bar-content.mate-dm-active #header-left * {
9
+ color: #fff !important;
10
+ }
11
+
12
+ .title-bar-content.mate-dm-active .status,
13
+ .title-bar-content.mate-dm-active .status * {
14
+ color: rgba(255, 255, 255, 0.85) !important;
15
+ }
16
+
17
+ .title-bar-content.mate-dm-active .status svg,
18
+ .title-bar-content.mate-dm-active #header-left svg {
19
+ stroke: #fff !important;
20
+ opacity: 0.9;
21
+ }
22
+
23
+ .title-bar-content.mate-dm-active .status button,
24
+ .title-bar-content.mate-dm-active #header-left button {
25
+ color: #fff !important;
26
+ }
27
+
28
+ .title-bar-content.mate-dm-active .status button:hover {
29
+ background: rgba(255, 255, 255, 0.15);
30
+ }
31
+
32
+ /* Hide session info button in mate DM (white circle issue) */
33
+ .title-bar-content.mate-dm-active #header-info-btn {
34
+ display: none;
35
+ }
36
+
1
37
  /* === Mate Wizard === */
2
38
 
3
39
  #mate-wizard {
@@ -464,7 +500,7 @@
464
500
  min-width: 200px;
465
501
  max-width: 360px;
466
502
  background: var(--sidebar-bg, var(--bg-secondary, #1a1a2e));
467
- border-right: 1px solid var(--sidebar-border, var(--border, rgba(255,255,255,0.06)));
503
+ border-right: none;
468
504
  overflow: hidden;
469
505
  flex-shrink: 0;
470
506
  }
@@ -479,7 +515,7 @@
479
515
  gap: 10px;
480
516
  height: 48px;
481
517
  padding: 0 12px;
482
- border-bottom: 1px solid var(--border-subtle);
518
+ border-bottom: none;
483
519
  flex-shrink: 0;
484
520
  }
485
521
 
@@ -491,6 +527,8 @@
491
527
  color: #fff;
492
528
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
493
529
  flex: 1;
530
+ font-size: 15px;
531
+ font-weight: 600;
494
532
  }
495
533
 
496
534
  .mate-sidebar-header .mate-sidebar-avatar {
@@ -558,32 +596,35 @@
558
596
  100% { filter: brightness(1); }
559
597
  }
560
598
 
561
- .mate-sidebar-chevron {
562
- width: 14px;
563
- height: 14px;
564
- color: rgba(255,255,255,0.6);
565
- transition: transform 0.2s;
566
- flex-shrink: 0;
567
- }
568
-
569
- .mate-sidebar-header.expanded .mate-sidebar-chevron {
570
- transform: rotate(180deg);
571
- }
572
-
573
- /* Seed data panel */
574
- .mate-sidebar-seed {
599
+ /* Seed data hover tooltip */
600
+ .mate-seed-tooltip {
601
+ position: absolute;
602
+ top: 100%;
603
+ left: 12px;
604
+ right: 12px;
605
+ margin-top: 4px;
575
606
  padding: 10px 14px;
576
- border-bottom: 1px solid var(--border-subtle);
607
+ background: var(--bg-primary, #fff);
608
+ border: 1px solid var(--border-subtle);
609
+ border-radius: 8px;
610
+ box-shadow: 0 4px 16px rgba(0,0,0,0.15);
577
611
  font-size: 12px;
578
612
  color: var(--text-secondary);
579
613
  display: flex;
580
614
  flex-direction: column;
581
615
  gap: 6px;
582
- flex-shrink: 0;
616
+ z-index: 100;
617
+ pointer-events: none;
583
618
  }
584
- .mate-sidebar-seed.hidden {
619
+ .mate-seed-tooltip.hidden {
585
620
  display: none;
586
621
  }
622
+ .mate-sidebar-header {
623
+ position: relative;
624
+ }
625
+ .mate-sidebar-name {
626
+ cursor: default;
627
+ }
587
628
  .mate-sidebar-seed-row {
588
629
  display: flex;
589
630
  gap: 6px;
@@ -198,9 +198,8 @@
198
198
  <div class="mate-sidebar-header" id="mate-sidebar-header">
199
199
  <img id="mate-sidebar-avatar" class="mate-sidebar-avatar" alt="">
200
200
  <span id="mate-sidebar-name" class="mate-sidebar-name"></span>
201
- <i data-lucide="chevron-down" class="mate-sidebar-chevron"></i>
201
+ <div id="mate-sidebar-seed-tooltip" class="mate-seed-tooltip hidden"></div>
202
202
  </div>
203
- <div id="mate-sidebar-seed" class="mate-sidebar-seed hidden"></div>
204
203
  <div id="mate-sidebar-tools">
205
204
  <button id="mate-knowledge-btn"><i data-lucide="book-open"></i> <span>Knowledge</span><span id="mate-knowledge-count" class="sidebar-badge hidden"></span></button>
206
205
  <button id="mate-sticky-notes-btn"><i data-lucide="sticky-note"></i> <span>Sticky Notes</span></button>
@@ -30,20 +30,15 @@ export function initMateSidebar(mateWsGetter) {
30
30
  });
31
31
  }
32
32
 
33
- // Header click: toggle seed data panel
34
- var headerEl = document.getElementById("mate-sidebar-header");
35
- if (headerEl) {
36
- headerEl.addEventListener("click", function () {
37
- var seedPanel = document.getElementById("mate-sidebar-seed");
38
- if (!seedPanel) return;
39
- var expanded = !seedPanel.classList.contains("hidden");
40
- if (expanded) {
41
- seedPanel.classList.add("hidden");
42
- headerEl.classList.remove("expanded");
43
- } else {
44
- seedPanel.classList.remove("hidden");
45
- headerEl.classList.add("expanded");
46
- }
33
+ // Name hover: show seed data tooltip
34
+ if (nameEl) {
35
+ nameEl.addEventListener("mouseenter", function () {
36
+ var tooltip = document.getElementById("mate-sidebar-seed-tooltip");
37
+ if (tooltip && tooltip.innerHTML.trim()) tooltip.classList.remove("hidden");
38
+ });
39
+ nameEl.addEventListener("mouseleave", function () {
40
+ var tooltip = document.getElementById("mate-sidebar-seed-tooltip");
41
+ if (tooltip) tooltip.classList.add("hidden");
47
42
  });
48
43
  }
49
44
 
@@ -91,22 +86,20 @@ export function showMateSidebar(mateId, mateData) {
91
86
  if (headerEl) headerEl.style.background = mateColor;
92
87
  columnEl.style.background = mateColor + "0a";
93
88
 
94
- // Render seed data panel
95
- var seedPanel = document.getElementById("mate-sidebar-seed");
96
- var headerClickEl = document.getElementById("mate-sidebar-header");
97
- if (seedPanel) {
98
- seedPanel.innerHTML = "";
99
- seedPanel.classList.add("hidden");
100
- if (headerClickEl) headerClickEl.classList.remove("expanded");
89
+ // Render seed data tooltip
90
+ var seedTooltip = document.getElementById("mate-sidebar-seed-tooltip");
91
+ if (seedTooltip) {
92
+ seedTooltip.innerHTML = "";
93
+ seedTooltip.classList.add("hidden");
101
94
  var sd = mateData.seedData || {};
102
95
  if (sd.relationship) {
103
- seedPanel.appendChild(makeSeedRow("Role", sd.relationship.replace(/_/g, " ")));
96
+ seedTooltip.appendChild(makeSeedRow("Role", sd.relationship.replace(/_/g, " ")));
104
97
  }
105
98
  if (sd.activity && sd.activity.length > 0) {
106
- seedPanel.appendChild(makeSeedTags("Activities", sd.activity));
99
+ seedTooltip.appendChild(makeSeedTags("Activities", sd.activity));
107
100
  }
108
101
  if (sd.communicationStyle && sd.communicationStyle.length > 0) {
109
- seedPanel.appendChild(makeSeedTags("Style", sd.communicationStyle.map(function (s) { return s.replace(/_/g, " "); })));
102
+ seedTooltip.appendChild(makeSeedTags("Style", sd.communicationStyle.map(function (s) { return s.replace(/_/g, " "); })));
110
103
  }
111
104
  if (sd.autonomy) {
112
105
  var autonomyLabels = {
@@ -115,7 +108,7 @@ export function showMateSidebar(mateId, mateData) {
115
108
  mostly_autonomous: "Mostly free",
116
109
  fully_autonomous: "Full freedom",
117
110
  };
118
- seedPanel.appendChild(makeSeedRow("Autonomy", autonomyLabels[sd.autonomy] || sd.autonomy.replace(/_/g, " ")));
111
+ seedTooltip.appendChild(makeSeedRow("Autonomy", autonomyLabels[sd.autonomy] || sd.autonomy.replace(/_/g, " ")));
119
112
  }
120
113
  }
121
114
 
@@ -171,6 +164,9 @@ export function updateMateSidebarProfile(mateData) {
171
164
  var headerEl = columnEl.querySelector(".mate-sidebar-header");
172
165
  if (headerEl) headerEl.style.background = mateColor;
173
166
  columnEl.style.background = mateColor + "0a";
167
+ // Sync chat title bar color
168
+ var titleBarContent = document.querySelector(".title-bar-content.mate-dm-active");
169
+ if (titleBarContent) titleBarContent.style.background = mateColor;
174
170
  }
175
171
 
176
172
  // Ten Commandments engrave effect: letters appear one by one with spark particles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.13.0-beta.1",
3
+ "version": "2.13.0-beta.2",
4
4
  "description": "Web UI for Claude Code. Any device. Push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",