clay-server 2.13.0-beta.6 → 2.13.0-beta.7

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
@@ -71,6 +71,7 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
71
71
  // --- Mate WS (separate connection to mate project) ---
72
72
  var mateWs = null;
73
73
  var mateProjectSlug = null;
74
+ var savedActiveSessionId = null; // main project session ID saved during mate DM
74
75
 
75
76
  // --- Home Hub ---
76
77
  var homeHub = $("home-hub");
@@ -629,8 +630,10 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
629
630
  // Hide terminal button (not relevant for mate)
630
631
  var termBtn = document.getElementById("terminal-toggle-btn");
631
632
  if (termBtn) termBtn.style.display = "none";
632
- // Apply mate color to chat title bar
633
+ // Apply mate color to chat title bar and panels
633
634
  var mateColor = (targetUser.profile && targetUser.profile.avatarColor) || targetUser.avatarColor || "#7c3aed";
635
+ document.body.style.setProperty("--mate-color", mateColor);
636
+ document.body.classList.add("mate-dm-active");
634
637
  var titleBarContent = document.querySelector(".title-bar-content");
635
638
  if (titleBarContent) {
636
639
  titleBarContent.style.background = mateColor;
@@ -696,6 +699,7 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
696
699
  if (resizeHandle) resizeHandle.classList.remove("dm-mode");
697
700
  hideMateSidebar();
698
701
  hideKnowledge();
702
+ if (isSchedulerOpen()) closeScheduler();
699
703
  disconnectMateWs();
700
704
  // Restore terminal button
701
705
  var termBtn = document.getElementById("terminal-toggle-btn");
@@ -713,7 +717,9 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
713
717
  var mateTag = dmHeaderBar.querySelector(".dm-header-mate-tag");
714
718
  if (mateTag) mateTag.remove();
715
719
  }
716
- // Reset chat title bar
720
+ // Reset chat title bar and mate color
721
+ document.body.style.removeProperty("--mate-color");
722
+ document.body.classList.remove("mate-dm-active");
717
723
  var titleBarContent = document.querySelector(".title-bar-content");
718
724
  if (titleBarContent) {
719
725
  titleBarContent.style.background = "";
@@ -779,6 +785,7 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
779
785
  mateWs.onopen = function () {
780
786
  // Swap main ws to mateWs so all UI (input, model selector, etc.) routes through mate project
781
787
  savedMainWs = ws;
788
+ savedActiveSessionId = activeSessionId;
782
789
  ws = mateWs;
783
790
  connected = true;
784
791
  };
@@ -858,6 +865,11 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
858
865
  mateWs.close();
859
866
  mateWs = null;
860
867
  }
868
+ // Restore main project's active session ID
869
+ if (savedActiveSessionId) {
870
+ activeSessionId = savedActiveSessionId;
871
+ savedActiveSessionId = null;
872
+ }
861
873
  mateProjectSlug = null;
862
874
  // If main WS was disconnected while in mate DM, reconnect now
863
875
  if (ws && ws.readyState !== 1) {
@@ -1512,6 +1524,13 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
1512
1524
  dmConversations: function () { return cachedDmConversations || []; },
1513
1525
  myUserId: function () { return myUserId; },
1514
1526
  selectSession: function (id) {
1527
+ // Close any open panels before switching
1528
+ if (isSchedulerOpen()) closeScheduler();
1529
+ var stickyPanel = document.getElementById("sticky-notes-panel");
1530
+ if (stickyPanel && !stickyPanel.classList.contains("hidden")) {
1531
+ var stickyBtn = document.getElementById("sticky-notes-sidebar-btn");
1532
+ if (stickyBtn) stickyBtn.click();
1533
+ }
1515
1534
  if (ws && ws.readyState === 1) {
1516
1535
  ws.send(JSON.stringify({ type: "switch_session", id: id }));
1517
1536
  }
@@ -4434,6 +4453,7 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
4434
4453
  initSTT({
4435
4454
  inputEl: inputEl,
4436
4455
  addSystemMessage: addSystemMessage,
4456
+ scrollToBottom: scrollToBottom,
4437
4457
  });
4438
4458
 
4439
4459
  // --- User profile (Discord-style popover on user island) ---
@@ -4574,6 +4594,8 @@ import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } fro
4574
4594
  if (!myPermissions.scheduledTasks) {
4575
4595
  var schBtn = document.getElementById("scheduler-btn");
4576
4596
  if (schBtn) schBtn.style.display = "none";
4597
+ var mateSchBtn = document.getElementById("mate-scheduler-btn");
4598
+ if (mateSchBtn) mateSchBtn.style.display = "none";
4577
4599
  }
4578
4600
  if (!myPermissions.createProject) {
4579
4601
  var addProjBtn = document.getElementById("icon-strip-add");
@@ -798,8 +798,10 @@
798
798
  .mate-knowledge-header {
799
799
  display: flex;
800
800
  align-items: center;
801
- padding: 10px 16px;
801
+ height: 48px;
802
+ padding: 0 16px;
802
803
  flex-shrink: 0;
804
+ border-bottom: 1px solid var(--border-subtle);
803
805
  }
804
806
  .mate-knowledge-title-wrap {
805
807
  display: flex;
@@ -1130,3 +1132,87 @@
1130
1132
  margin-right: 8px;
1131
1133
  vertical-align: middle;
1132
1134
  }
1135
+
1136
+ /* --- Mate color theming for panels --- */
1137
+
1138
+ /* Match panel header heights to sidebar header (48px) */
1139
+ body.mate-dm-active .mate-knowledge-header,
1140
+ body.mate-dm-active .scheduler-top-bar,
1141
+ body.mate-dm-active .notes-archive-header {
1142
+ height: 48px;
1143
+ box-sizing: border-box;
1144
+ border-bottom: 1px solid rgba(255, 255, 255, 0.15);
1145
+ }
1146
+
1147
+ /* Knowledge header */
1148
+ body.mate-dm-active .mate-knowledge-header {
1149
+ background: var(--mate-color);
1150
+ color: #fff;
1151
+ }
1152
+ body.mate-dm-active .mate-knowledge-header .lucide,
1153
+ body.mate-dm-active .mate-knowledge-header h2 {
1154
+ color: #fff;
1155
+ }
1156
+ body.mate-dm-active .mate-knowledge-header-actions button {
1157
+ color: rgba(255, 255, 255, 0.85);
1158
+ }
1159
+ body.mate-dm-active .mate-knowledge-header-actions button:hover {
1160
+ color: #fff;
1161
+ background: rgba(255, 255, 255, 0.15);
1162
+ }
1163
+ body.mate-dm-active .mate-knowledge-count {
1164
+ color: rgba(255, 255, 255, 0.7);
1165
+ }
1166
+
1167
+ /* Scheduler top bar (main header) */
1168
+ body.mate-dm-active .scheduler-top-bar {
1169
+ background: var(--mate-color);
1170
+ color: #fff;
1171
+ }
1172
+ body.mate-dm-active .scheduler-top-title,
1173
+ body.mate-dm-active .scheduler-top-title .lucide {
1174
+ color: #fff;
1175
+ }
1176
+ body.mate-dm-active .scheduler-close-btn {
1177
+ color: rgba(255, 255, 255, 0.85);
1178
+ }
1179
+ body.mate-dm-active .scheduler-close-btn:hover {
1180
+ color: #fff;
1181
+ background: rgba(255, 255, 255, 0.15);
1182
+ }
1183
+ body.mate-dm-active .scheduler-scope-toggle {
1184
+ color: rgba(255, 255, 255, 0.7);
1185
+ }
1186
+ body.mate-dm-active .scheduler-scope-label {
1187
+ color: rgba(255, 255, 255, 0.7);
1188
+ }
1189
+ body.mate-dm-active .scheduler-scope-label[data-side="off"],
1190
+ body.mate-dm-active .scheduler-scope-toggle.active .scheduler-scope-label[data-side="on"] {
1191
+ color: #fff;
1192
+ }
1193
+
1194
+ /* Scheduler: breathing room below top-bar */
1195
+ body.mate-dm-active .scheduler-sidebar,
1196
+ body.mate-dm-active .scheduler-content {
1197
+ padding-top: 12px;
1198
+ }
1199
+
1200
+ /* Sticky Notes header */
1201
+ body.mate-dm-active .notes-archive-header {
1202
+ background: var(--mate-color);
1203
+ color: #fff;
1204
+ }
1205
+ body.mate-dm-active .notes-archive-header .lucide,
1206
+ body.mate-dm-active .notes-archive-header h2 {
1207
+ color: #fff;
1208
+ }
1209
+ body.mate-dm-active .notes-archive-count {
1210
+ color: rgba(255, 255, 255, 0.7);
1211
+ }
1212
+ body.mate-dm-active .notes-archive-header button {
1213
+ color: rgba(255, 255, 255, 0.85);
1214
+ }
1215
+ body.mate-dm-active .notes-archive-header button:hover {
1216
+ color: #fff;
1217
+ background: rgba(255, 255, 255, 0.15);
1218
+ }
@@ -18,8 +18,10 @@
18
18
  .scheduler-top-bar {
19
19
  display: flex;
20
20
  align-items: center;
21
- padding: 10px 16px;
21
+ height: 48px;
22
+ padding: 0 16px;
22
23
  flex-shrink: 0;
24
+ border-bottom: 1px solid var(--border-subtle);
23
25
  }
24
26
  .scheduler-top-title {
25
27
  display: flex;
@@ -96,7 +98,7 @@
96
98
  display: flex;
97
99
  flex-direction: row;
98
100
  gap: 10px;
99
- padding: 0 10px 10px;
101
+ padding: 12px 10px 10px;
100
102
  min-height: 0;
101
103
  overflow: hidden;
102
104
  }
@@ -531,8 +531,10 @@
531
531
  .notes-archive-header {
532
532
  display: flex;
533
533
  align-items: center;
534
- padding: 10px 16px;
534
+ height: 48px;
535
+ padding: 0 16px;
535
536
  flex-shrink: 0;
537
+ border-bottom: 1px solid var(--border-subtle);
536
538
  }
537
539
 
538
540
  .notes-archive-title-wrap {
@@ -203,6 +203,7 @@
203
203
  <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>
204
204
  <button id="mate-sticky-notes-btn"><i data-lucide="sticky-note"></i> <span>Sticky Notes</span></button>
205
205
  <button id="mate-skills-btn"><i data-lucide="puzzle"></i> <span>Skills</span></button>
206
+ <button id="mate-scheduler-btn"><i data-lucide="calendar-clock"></i> <span>Scheduled Tasks</span></button>
206
207
  </div>
207
208
  <div class="mate-sidebar-sessions-header">
208
209
  <span>Conversations</span>
@@ -1,6 +1,7 @@
1
1
  import { escapeHtml } from './utils.js';
2
2
  import { iconHtml, refreshIcons } from './icons.js';
3
3
  import { hideKnowledge } from './mate-knowledge.js';
4
+ import { isSchedulerOpen, closeScheduler } from './scheduler.js';
4
5
 
5
6
  var getMateWs = null;
6
7
  var currentMateId = null;
@@ -58,6 +59,14 @@ export function initMateSidebar(mateWsGetter) {
58
59
  if (origBtn) origBtn.click();
59
60
  });
60
61
  }
62
+ var mateSchedulerBtn = document.getElementById("mate-scheduler-btn");
63
+ if (mateSchedulerBtn) {
64
+ mateSchedulerBtn.addEventListener("click", function () {
65
+ hideKnowledge();
66
+ var origBtn = document.getElementById("scheduler-btn");
67
+ if (origBtn) origBtn.click();
68
+ });
69
+ }
61
70
  }
62
71
 
63
72
  export function showMateSidebar(mateId, mateData) {
@@ -293,6 +302,14 @@ function renderMateSessionItem(s) {
293
302
 
294
303
  el.addEventListener("click", (function (id) {
295
304
  return function () {
305
+ // Close any open panels
306
+ hideKnowledge();
307
+ if (isSchedulerOpen()) closeScheduler();
308
+ var stickyBtn = document.getElementById("sticky-notes-sidebar-btn");
309
+ var stickyPanel = document.getElementById("sticky-notes-panel");
310
+ if (stickyPanel && !stickyPanel.classList.contains("hidden")) {
311
+ if (stickyBtn) stickyBtn.click();
312
+ }
296
313
  var ws = getMateWs ? getMateWs() : null;
297
314
  if (ws && ws.readyState === 1) {
298
315
  ws.send(JSON.stringify({ type: "switch_session", id: id }));
@@ -182,6 +182,7 @@ function startRecording() {
182
182
 
183
183
  ctx.inputEl.value = text;
184
184
  autoResize();
185
+ if (ctx.scrollToBottom) ctx.scrollToBottom();
185
186
  };
186
187
 
187
188
  recognition.onerror = function(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.13.0-beta.6",
3
+ "version": "2.13.0-beta.7",
4
4
  "description": "Web UI for Claude Code. Any device. Push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",