clay-server 5.0.2-beta.1 → 5.1.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.
Files changed (162) hide show
  1. package/LICENSES/README.md +4 -0
  2. package/LICENSES/dicebear-avatars.md +16 -0
  3. package/lib/daemon-project-access.js +7 -1
  4. package/lib/daemon.js +2 -0
  5. package/lib/dicebear-avatar.js +62 -0
  6. package/lib/knowledge-db-service.js +175 -0
  7. package/lib/knowledge-db-validation.js +0 -0
  8. package/lib/knowledge-document-index.js +49 -0
  9. package/lib/knowledge-draft-store.js +56 -0
  10. package/lib/knowledge-file-store.js +199 -0
  11. package/lib/knowledge-markdown.js +128 -0
  12. package/lib/mate-knowledge-mcp-server.js +29 -6
  13. package/lib/mate-knowledge-service.js +23 -2
  14. package/lib/mate-knowledge-sync.js +36 -21
  15. package/lib/mate-workspace-color.js +4 -0
  16. package/lib/mates.js +18 -0
  17. package/lib/project-connection.js +36 -2
  18. package/lib/project-debate-proposal.js +6 -0
  19. package/lib/project-debate-workspace.js +43 -0
  20. package/lib/project-debate.js +1 -0
  21. package/lib/project-file-path.js +2 -3
  22. package/lib/project-knowledge.js +315 -136
  23. package/lib/project-mate-creation-proposal.js +1 -0
  24. package/lib/project-request-access.js +13 -1
  25. package/lib/project-sessions.js +39 -2
  26. package/lib/project-user-knowledge.js +60 -0
  27. package/lib/project.js +59 -18
  28. package/lib/public/app.js +73 -34
  29. package/lib/public/clay-studio-wordmark-bold.svg +20 -0
  30. package/lib/public/css/clay-workspace.css +105 -0
  31. package/lib/public/css/debates-workbench.css +47 -0
  32. package/lib/public/css/filebrowser.css +10 -0
  33. package/lib/public/css/home-debate-live.css +26 -0
  34. package/lib/public/css/home-hub.css +3 -1
  35. package/lib/public/css/home-mate-model-picker.css +15 -131
  36. package/lib/public/css/home-mate-settings.css +168 -16
  37. package/lib/public/css/icon-strip.css +249 -32
  38. package/lib/public/css/mate-conversation.css +176 -0
  39. package/lib/public/css/mate-knowledge-workbench.css +118 -0
  40. package/lib/public/css/mate-workspace-color.css +16 -0
  41. package/lib/public/css/mates.css +28 -28
  42. package/lib/public/css/messages.css +1 -114
  43. package/lib/public/css/mobile-nav.css +16 -16
  44. package/lib/public/css/overlays.css +8 -0
  45. package/lib/public/css/project-logs.css +7 -0
  46. package/lib/public/css/project-mate-creation.css +105 -0
  47. package/lib/public/css/right-workbench.css +3 -3
  48. package/lib/public/css/session-folders.css +80 -21
  49. package/lib/public/css/sidebar.css +183 -107
  50. package/lib/public/css/title-bar.css +151 -0
  51. package/lib/public/css/worker-delegation.css +47 -0
  52. package/lib/public/css/worker-proposal.css +72 -150
  53. package/lib/public/css/you.css +74 -0
  54. package/lib/public/index.html +33 -101
  55. package/lib/public/modules/account-island.js +230 -0
  56. package/lib/public/modules/app-cursors.js +19 -43
  57. package/lib/public/modules/app-debate-ui.js +4 -3
  58. package/lib/public/modules/app-header.js +106 -0
  59. package/lib/public/modules/app-message-router.js +12 -3
  60. package/lib/public/modules/app-messages.js +34 -9
  61. package/lib/public/modules/app-notifications.js +4 -7
  62. package/lib/public/modules/app-projects.js +5 -38
  63. package/lib/public/modules/app-rendering.js +12 -13
  64. package/lib/public/modules/avatar.js +25 -9
  65. package/lib/public/modules/chat-render-runtime.js +16 -4
  66. package/lib/public/modules/command-palette.js +2 -15
  67. package/lib/public/modules/cursor-sharing-preference.js +3 -3
  68. package/lib/public/modules/debate-controls.js +299 -0
  69. package/lib/public/modules/debate.js +2 -0
  70. package/lib/public/modules/debates-workbench.js +339 -0
  71. package/lib/public/modules/default-ai.js +81 -65
  72. package/lib/public/modules/filebrowser.js +28 -8
  73. package/lib/public/modules/home-debate-controls.js +18 -289
  74. package/lib/public/modules/home-mate-avatar-editor.js +228 -0
  75. package/lib/public/modules/home-mate-color-picker.js +66 -0
  76. package/lib/public/modules/home-mate-creation.js +1 -1
  77. package/lib/public/modules/home-mate-instructions.js +90 -0
  78. package/lib/public/modules/home-mate-model-picker.js +80 -271
  79. package/lib/public/modules/home-mate-profile-editor.js +72 -0
  80. package/lib/public/modules/home-mate-settings.js +118 -125
  81. package/lib/public/modules/home-shell.js +3 -0
  82. package/lib/public/modules/home-surface-boot.js +1 -9
  83. package/lib/public/modules/html-preview.js +19 -0
  84. package/lib/public/modules/icon-strip-tooltip.js +95 -0
  85. package/lib/public/modules/knowledge-db-edit-state.js +35 -0
  86. package/lib/public/modules/knowledge-db-workbench.js +234 -0
  87. package/lib/public/modules/knowledge-history-state.js +55 -0
  88. package/lib/public/modules/knowledge-markdown-editor.js +57 -0
  89. package/lib/public/modules/knowledge-preview-links.js +70 -0
  90. package/lib/public/modules/knowledge-workbench-shell.js +21 -0
  91. package/lib/public/modules/mate-knowledge-workbench-state.js +174 -0
  92. package/lib/public/modules/mate-knowledge-workbench.js +500 -0
  93. package/lib/public/modules/mate-knowledge.js +11 -3
  94. package/lib/public/modules/mate-management.js +54 -10
  95. package/lib/public/modules/mate-sidebar.js +11 -1
  96. package/lib/public/modules/mate-workspace-color.js +33 -0
  97. package/lib/public/modules/mention.js +5 -13
  98. package/lib/public/modules/profile.js +51 -18
  99. package/lib/public/modules/project-chat-identity.js +79 -0
  100. package/lib/public/modules/project-debate-planning-workspace.js +250 -0
  101. package/lib/public/modules/project-debate-workspace.js +185 -0
  102. package/lib/public/modules/project-header-identity.js +127 -0
  103. package/lib/public/modules/project-logs-render.js +9 -4
  104. package/lib/public/modules/project-mate-creation-workspace.js +414 -0
  105. package/lib/public/modules/project-mate-navigation.js +238 -0
  106. package/lib/public/modules/project-session-navigation.js +29 -0
  107. package/lib/public/modules/project-switcher.js +6 -8
  108. package/lib/public/modules/projects-hub-view.js +5 -6
  109. package/lib/public/modules/projects-hub.js +2 -6
  110. package/lib/public/modules/qrcode.js +27 -8
  111. package/lib/public/modules/search-clay-chat.js +8 -11
  112. package/lib/public/modules/session-activity-tooltip.js +12 -0
  113. package/lib/public/modules/session-create-form.js +86 -14
  114. package/lib/public/modules/session-create.js +50 -7
  115. package/lib/public/modules/session-list-visibility.js +41 -0
  116. package/lib/public/modules/session-presence-ui.js +4 -1
  117. package/lib/public/modules/session-title-marquee.js +51 -0
  118. package/lib/public/modules/sidebar-mates.js +3 -50
  119. package/lib/public/modules/sidebar-mobile.js +63 -60
  120. package/lib/public/modules/sidebar-projects.js +84 -97
  121. package/lib/public/modules/sidebar-session-folders-ui.js +2 -2
  122. package/lib/public/modules/sidebar-session-hierarchy.js +149 -70
  123. package/lib/public/modules/sidebar-sessions.js +49 -50
  124. package/lib/public/modules/sidebar.js +11 -13
  125. package/lib/public/modules/thinking-lifecycle.js +7 -6
  126. package/lib/public/modules/tool-palette-order.js +4 -3
  127. package/lib/public/modules/tool-palette.js +13 -3
  128. package/lib/public/modules/tools.js +22 -22
  129. package/lib/public/modules/worker-proposal.js +42 -8
  130. package/lib/public/modules/worker-runtime-picker.js +115 -0
  131. package/lib/public/modules/you-activity.js +121 -0
  132. package/lib/public/modules/you.js +251 -0
  133. package/lib/public/style.css +16 -8
  134. package/lib/public/vendor/codemirror/LICENSE +21 -0
  135. package/lib/public/vendor/codemirror/codemirror.css +344 -0
  136. package/lib/public/vendor/codemirror/codemirror.js +9884 -0
  137. package/lib/public/vendor/codemirror/continuelist.js +101 -0
  138. package/lib/public/vendor/codemirror/markdown.js +886 -0
  139. package/lib/public/vendor/codemirror/show-hint.css +37 -0
  140. package/lib/public/vendor/codemirror/show-hint.js +523 -0
  141. package/lib/sdk-bridge.js +15 -3
  142. package/lib/server-admin.js +11 -0
  143. package/lib/server-home-chat-events.js +1 -1
  144. package/lib/server-home-chat.js +25 -3
  145. package/lib/server-home-debate-planning.js +4 -1
  146. package/lib/server-home-debates.js +2 -0
  147. package/lib/server-home-mate-creation.js +4 -1
  148. package/lib/server-mate-instructions.js +44 -0
  149. package/lib/server-mates.js +12 -3
  150. package/lib/server-palette.js +1 -1
  151. package/lib/server-settings.js +65 -1
  152. package/lib/server-user-knowledge.js +119 -0
  153. package/lib/server.js +21 -1
  154. package/lib/session-visibility.js +7 -2
  155. package/lib/sessions.js +32 -6
  156. package/lib/user-knowledge-service.js +167 -0
  157. package/lib/users-permissions.js +7 -0
  158. package/lib/users-project-mate-filter-preferences.js +39 -0
  159. package/lib/users.js +6 -0
  160. package/lib/workspace-query-access.js +4 -1
  161. package/lib/ws-schema.js +50 -0
  162. package/package.json +10 -1
package/lib/public/app.js CHANGED
@@ -25,6 +25,7 @@ import {
25
25
  } from './modules/sidebar-mobile.js';
26
26
  import { initMateSidebar, showMateSidebar, hideMateSidebar, renderMateSessionList, updateMateSidebarProfile, handleMateSearchResults } from './modules/mate-sidebar.js';
27
27
  import { initMateKnowledge, requestKnowledgeList, renderKnowledgeList, handleKnowledgeContent, hideKnowledge } from './modules/mate-knowledge.js';
28
+ import { initMateKnowledgeWorkbench } from './modules/mate-knowledge-workbench.js';
28
29
  import { initMateMemory, renderMemoryList, hideMemory } from './modules/mate-memory.js';
29
30
  import { initRewind, setRewindMode, showRewindModal, clearPendingRewindUuid, addRewindButton, onRewindComplete, onRewindError } from './modules/rewind.js';
30
31
  import { initNotifications, showDoneNotification, playDoneSound, isNotifAlertEnabled, isNotifSoundEnabled } from './modules/notifications.js';
@@ -47,11 +48,15 @@ import { initSkills, handleSkillInstalled, handleSkillUninstalled } from './modu
47
48
  import { initMcp } from './modules/mcp-ui.js';
48
49
  import { initScheduler, resetScheduler, handleLoopRegistryUpdated, handleScheduleRunStarted, handleScheduleRunFinished, handleLoopScheduled, openSchedulerToTab, isSchedulerOpen, closeScheduler, enterCraftingMode, exitCraftingMode, handleLoopRegistryFiles, getUpcomingSchedules } from './modules/scheduler.js';
49
50
  import { initScheduledTasks, closeScheduledTasks } from './modules/scheduled-tasks.js';
51
+ import { initDebatesWorkbench } from './modules/debates-workbench.js';
50
52
  import { initPlaybook, openPlaybook, getPlaybooks, getPlaybookForTip, isCompleted as isPlaybookCompleted } from './modules/playbook.js';
51
53
  import { initSTT } from './modules/stt.js';
52
54
  import { initProfile, getProfileLang } from './modules/profile.js';
55
+ import { initAccountIsland } from './modules/account-island.js';
53
56
  import { initUserSettings } from './modules/user-settings.js';
54
57
  import { initToolPalettes } from './modules/tool-palette.js';
58
+ import { initYou } from './modules/you.js';
59
+ import { initYouActivity } from './modules/you-activity.js';
55
60
  import { initProjectLogs, closeProjectLogs } from './modules/project-logs.js';
56
61
  import { initProjectSwitcher } from './modules/project-switcher.js';
57
62
  import { initSplitView } from './modules/split-view.js';
@@ -65,9 +70,6 @@ import { initShellCommand } from './modules/shell-command.js';
65
70
  import { initConnection, connect as _connConnect, setStatus as _connSetStatus, scheduleReconnect as _connScheduleReconnect, cancelReconnect as _connCancelReconnect } from './modules/app-connection.js';
66
71
  import { processMessage as _msgProcessMessage } from './modules/app-messages.js';
67
72
  import { getWs as _getWsRef, setWs as _setWsRef } from './modules/ws-ref.js';
68
- import { initHomeHub, showHomeHub as _hubShowHomeHub, hideHomeHub as _hubHideHomeHub, isHomeHubVisible, renderHomeMateSwitcher, updateHomeIconBadge } from './modules/app-home-hub.js';
69
- import { initHomeSidebar } from './modules/home-sidebar.js';
70
- import { openHomeMateAction } from './modules/home-mate-chat.js';
71
73
  import { initProjectsHub, showProjectsHub, hideProjectsHub } from './modules/projects-hub.js';
72
74
  import { initHomeSurfaceBoot } from './modules/home-surface-boot.js';
73
75
  import { rememberHomePrimarySurface } from './modules/home-surface.js';
@@ -88,6 +90,10 @@ import { initPendingMessageQueue } from './modules/pending-message-queue.js';
88
90
  import { initAppNotifications, handleNotificationsState as _notifHandleState, handleNotificationCreated as _notifHandleCreated, handleNotificationDismissed as _notifHandleDismissed, handleNotificationDismissedAll as _notifHandleDismissedAll } from './modules/app-notifications.js';
89
91
  import { initHeaderTuiFont } from './modules/header-tui-font.js';
90
92
  import { createStore, store } from './modules/store.js';
93
+ import { initProjectMateNavigation } from './modules/project-mate-navigation.js';
94
+ import { initProjectMateCreationWorkspace } from './modules/project-mate-creation-workspace.js';
95
+ import { initProjectDebatePlanningWorkspace } from './modules/project-debate-planning-workspace.js';
96
+ import { initProjectSessionNavigation } from './modules/project-session-navigation.js';
91
97
  import { initPanels, updateConfigChip as _panUpdateConfigChip, getModelEffortLevels as _panGetModelEffortLevels, accumulateUsage as _panAccumulateUsage, updateUsagePanel as _panUpdateUsagePanel, resetUsage as _panResetUsage, toggleUsagePanel as _panToggleUsagePanel, formatTokens as _panFormatTokens, updateStatusPanel as _panUpdateStatusPanel, requestProcessStats as _panRequestProcessStats, toggleStatusPanel as _panToggleStatusPanel, accumulateContext as _panAccumulateContext, updateContextPanel as _panUpdateContextPanel, resetContext as _panResetContext, resetContextData as _panResetContextData, minimizeContext as _panMinimizeContext, expandContext as _panExpandContext, toggleContextPanel as _panToggleContextPanel, getContextView as _panGetContextView, renderCtxPopover as _panRenderCtxPopover, hideCtxPopover as _panHideCtxPopover, formatBytes as _panFormatBytes, formatUptime as _panFormatUptime, getModelSupportsEffort as _panGetModelSupportsEffort, getSessionUsage, setSessionUsage, getContextData, setContextData, setContextView as _panSetContextView, applyContextView as _panApplyContextView } from './modules/app-panels.js';
92
98
  import { initProjects, updateProjectList as _projUpdateProjectList, renderProjectList as _projRenderProjectList, renderTopbarPresence as _projRenderTopbarPresence, switchProject as _projSwitchProject, resetClientState as _projResetClientState, confirmRemoveProject as _projConfirmRemoveProject, handleRemoveProjectCheckResult as _projHandleRemoveProjectCheckResult, handleRemoveProjectResult as _projHandleRemoveProjectResult, openAddProjectModal as _projOpenAddProjectModal, closeAddProjectModal as _projCloseAddProjectModal, handleBrowseDirResult as _projHandleBrowseDirResult, handleAddProjectResult as _projHandleAddProjectResult, handleCloneProgress as _projHandleCloneProgress, showUpdateAvailable as _projShowUpdateAvailable, getCachedProjects, setCachedProjects, getCachedProjectCount, getCachedRemovedProjects, setCachedRemovedProjects } from './modules/app-projects.js';
93
99
  import { initRendering, addToMessages as _renAddToMessages, scrollToBottom as _renScrollToBottom, forceScrollToBottom as _renForceScrollToBottom, addUserMessage as _renAddUserMessage, getMsgTime as _renGetMsgTime, shouldGroupMessage as _renShouldGroupMessage, ensureAssistantBlock as _renEnsureAssistantBlock, addCopyHandler as _renAddCopyHandler, appendDelta as _renAppendDelta, flushStreamBuffer as _renFlushStreamBuffer, finalizeAssistantBlock as _renFinalizeAssistantBlock, addSystemMessage as _renAddSystemMessage, addConflictMessage as _renAddConflictMessage, addContextOverflowMessage as _renAddContextOverflowMessage, showClaudePreThinking as _renShowClaudePreThinking, showMatePreThinking as _renShowMatePreThinking, removeMatePreThinking as _renRemoveMatePreThinking, showSuggestionChips as _renShowSuggestionChips, hideSuggestionChips as _renHideSuggestionChips, getGhostSuggestion as _renGetGhostSuggestion, getTurnCounter, setTurnCounter, getPrependAnchor, setPrependAnchor, getActivityEl, setActivityEl, getIsUserScrolledUp, setIsUserScrolledUp, getStickyBottom, armStickyBottom, disarmStickyBottom } from './modules/app-rendering.js';
@@ -148,11 +154,12 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
148
154
 
149
155
 
150
156
  // --- Home Hub (delegated to app-home-hub.js) ---
151
- function showHomeHub(fromHistory) { _hubShowHomeHub(fromHistory); }
152
- function hideHomeHub() { _hubHideHomeHub(); }
157
+ function showHomeHub(fromHistory) { showProjectsHub(fromHistory); }
158
+ function hideHomeHub() {}
159
+ function isHomeHubVisible() { return false; }
153
160
  function startClayMateCreation() {
154
- showHomeHub();
155
- openHomeMateAction("mate");
161
+ var add = document.getElementById('icon-strip-add');
162
+ if (add) add.click();
156
163
  }
157
164
 
158
165
  // --- DM (delegated to app-dm.js) ---
@@ -273,6 +280,8 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
273
280
  sharedBrowser: null,
274
281
  sharedBrowsers: [],
275
282
  mcpSkillsWorkbench: {},
283
+ mateKnowledgeWorkspaces: {},
284
+ mateColorSave: null,
276
285
  mcpConnections: { screen: "list", servers: [], search: "", loaded: false },
277
286
  sharedBrowserOpen: false,
278
287
  sharedBrowserUi: {},
@@ -314,12 +323,55 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
314
323
  githubWorkProject: null,
315
324
  githubWorkRefresh: null,
316
325
  activeProjectSlug: null,
326
+ activeProjectMateId: null,
327
+ activeProjectMateName: '',
328
+ activeSessionMateId: null,
329
+ activeSessionMateName: '',
317
330
  sessionActivatedProjectSlug: null,
318
331
  sessionListProjectSlug: null,
319
332
  splitGroupsProjectSlug: null,
320
333
  socketPath: null,
321
334
  pendingHomeProjectSlug: null,
322
335
  homeProjectEmptyVisible: false,
336
+ homeShellVisible: false,
337
+ projectMateFilterMode: 'all',
338
+ projectMateFilterTurns: 0,
339
+ projectMateFilterActivated: false,
340
+ projectMateCreationActive: false,
341
+ projectMateCreationMateId: null,
342
+ projectMateCreationSessionId: null,
343
+ projectMateCreationRequestId: null,
344
+ projectMateCreationPendingStart: false,
345
+ projectMateCreationAwaitingHistory: false,
346
+ projectMateCreationAwaitingMateList: false,
347
+ projectMateCreationHistoryReady: false,
348
+ projectMateCreationLocalId: null,
349
+ projectMateCreationMessages: [],
350
+ projectMateCreationPendingMateId: null,
351
+ projectDebatePlanningActive: false,
352
+ projectDebatePlanningMateId: null,
353
+ projectDebatePlanningSessionId: null,
354
+ projectDebatePlanningLocalId: null,
355
+ projectDebatePlanningRequestId: null,
356
+ projectDebatePlanningPendingStart: false,
357
+ projectDebatePlanningAwaitingHistory: false,
358
+ projectDebatePlanningAwaitingMateList: false,
359
+ projectDebatePlanningHistoryReady: false,
360
+ projectDebatePlanningTopic: "",
361
+ projectDebatePlanningMessages: [],
362
+ projectDebatePlanningError: "",
363
+ projectDebatePlanningRetryable: false,
364
+ debatesWorkbenchStatus: "idle",
365
+ debatesWorkbenchRequestId: null,
366
+ debatesWorkbenchItems: [],
367
+ debatesWorkbenchError: "",
368
+ debatesWorkbenchFilter: "all",
369
+ debatesWorkbenchCreating: false,
370
+ debatesWorkbenchWide: false,
371
+ debatesWorkbenchFullscreen: false,
372
+ debatesWorkbenchScrollTop: 0,
373
+ pendingDebateNavigation: null,
374
+ pendingProjectSessionNavigation: null,
323
375
  projectsHubVisible: false,
324
376
  projectsHubMarkup: null,
325
377
  projectsHubList: [],
@@ -387,6 +439,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
387
439
  fileViewerOpenRevision: 0,
388
440
  cursorSharingEnabled: false,
389
441
  cursorSharingHydrated: false,
442
+ cursorSharingPending: null,
390
443
  pendingOutboundMessages: [],
391
444
  pendingMessageQueue: { projectSlug: null, sessionId: null, revision: 0, paused: false, items: [], loading: false, error: "" },
392
445
  pendingMessageQueueRecovery: false,
@@ -426,6 +479,9 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
426
479
  dockWidth: null,
427
480
  dockHasActivity: false,
428
481
  dockActivityToolId: null,
482
+ you: {},
483
+ youActivity: {},
484
+ youSequence: 0,
429
485
  projectLogsOpen: false,
430
486
  projectLogsWide: false,
431
487
  projectLogsFullscreen: false,
@@ -655,14 +711,18 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
655
711
  // mcp-ui.js / etc.) attach click handlers by ID.
656
712
  initToolPalettes();
657
713
  initProjectLogs();
714
+ initYou();
715
+ initYouActivity();
658
716
  initIssues();
659
717
  initIssuesContext();
660
718
  initIssueLinks();
661
719
  initScheduledTasks();
720
+ initDebatesWorkbench();
662
721
  initSidebar(sidebarCtx);
663
722
  var wsGetter = function () { return _getWsRef(); };
664
723
  initMateSidebar(wsGetter);
665
724
  initMateKnowledge(wsGetter);
725
+ initMateKnowledgeWorkbench();
666
726
  initMateMemory(wsGetter, { onShow: function () { hideKnowledge(); hideNotes(); } });
667
727
  initCommandPalette({
668
728
  switchProject: function (slug) { switchProject(slug); },
@@ -936,7 +996,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
936
996
  var m = location.pathname.match(/^\/p\/([a-z0-9_-]+)/);
937
997
  var newSlug = m ? m[1] : null;
938
998
  if (!newSlug) {
939
- showHomeHub(true);
999
+ showProjectsHub(true);
940
1000
  return;
941
1001
  }
942
1002
  rememberHomePrimarySurface("project", newSlug);
@@ -1096,6 +1156,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
1096
1156
  }
1097
1157
  initCursorToggle();
1098
1158
  initDefaultAi();
1159
+ initAccountIsland();
1099
1160
  // Apply RBAC UI gating
1100
1161
  var _perms = store.get('permissions');
1101
1162
  if (_perms) {
@@ -1332,18 +1393,6 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
1332
1393
  function handleSkillInstallWs(msg) { _siHandleSkillInstallWs(msg); }
1333
1394
 
1334
1395
 
1335
- // Debate button in mate sidebar (only visible in DM mode)
1336
- var debateBtn = document.getElementById("mate-debate-btn");
1337
- if (debateBtn) {
1338
- debateBtn.addEventListener("click", function () {
1339
- var contextMessages = dmMessageCache.map(function (m) {
1340
- return { text: m.text, isMate: m.from !== store.get('myUserId') };
1341
- });
1342
- openDebateModal({ dmContext: contextMessages });
1343
- });
1344
- }
1345
-
1346
-
1347
1396
  // --- Debate UI (delegated to app-debate-ui.js) ---
1348
1397
  // debateStickyState, debateHandRaiseOpen, debateFloorMode, debateConcludeMode, debateEndedMode -> modules/app-debate-ui.js
1349
1398
  function showDebateConcludeConfirm(msg) { _debShowDebateConcludeConfirm(msg); }
@@ -1408,23 +1457,13 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
1408
1457
  initProjects();
1409
1458
 
1410
1459
  // --- Home Hub module ---
1411
- initHomeHub();
1412
- initHomeSidebar();
1460
+ initProjectMateNavigation();
1461
+ initProjectSessionNavigation();
1462
+ initProjectMateCreationWorkspace();
1463
+ initProjectDebatePlanningWorkspace();
1413
1464
  initProjectsHub();
1414
1465
  initHomeSurfaceBoot();
1415
1466
 
1416
- // Mates live on the home hub now, so keep that pane and the C button
1417
- // badge in sync with the mate list, unread DMs, and mention activity.
1418
- store.subscribe(function (state, prev) {
1419
- if (state.cachedMatesList !== prev.cachedMatesList || state.dmUnread !== prev.dmUnread) {
1420
- renderHomeMateSwitcher();
1421
- updateHomeIconBadge();
1422
- }
1423
- });
1424
- onMentionActiveChange(function () {
1425
- renderHomeMateSwitcher();
1426
- });
1427
- updateHomeIconBadge();
1428
1467
 
1429
1468
  // --- DM module ---
1430
1469
  initDm();
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4742 1156" role="img" aria-label="Clay Studio">
2
+ <title>Clay Studio</title>
3
+ <style>
4
+ g { fill: #171717; }
5
+ @media (prefers-color-scheme: dark) { g { fill: #f2f2ef; } }
6
+ </style>
7
+ <metadata>Source Serif 4 v4.005, weight 700, optical size 60, tracking -0.01em, word gap 0.18em. Converted to outlines from Adobe Source Serif 4 release 4.005R.</metadata>
8
+ <g transform="translate(53.619 820.549) scale(1 -1)">
9
+ <path d="M346.54 -16Q285.787 -16 230.018 4.606Q174.248 25.213 130.354 67.319Q86.46 109.425 61.421 174.071Q36.381 238.717 36.381 327.505Q36.381 417.416 62.775 482.624Q89.168 547.832 133.916 589.938Q178.664 632.044 234.079 652.651Q289.495 673.257 346.832 673.257Q389.619 673.257 431.495 664.049Q473.372 654.841 509.292 632.628L520 472.673H498.336L418.098 646.044L477.549 626.425L481.549 604.673Q450.044 629.009 417.022 638.155Q384 647.301 356.495 647.301Q311.362 647.301 271.835 613.757Q232.309 580.213 208.326 509.752Q184.344 439.292 184.344 326.921Q184.344 215.257 207.534 145.297Q230.724 75.336 269.813 42.646Q308.902 9.956 355.619 9.956Q385.079 9.956 418.5 19.664Q451.921 29.372 482.717 52.876L479.885 30.832L421.142 11.505L500.381 193.664H522.336L511.628 23.505Q477.124 4 433.978 -6Q390.832 -16 346.54 -16Z" transform="translate(0 0)"/>
10
+ <path d="M24.381 0V21.664L109.054 36.495H182.566L264.115 21.664V0ZM74.558 0Q77.266 25.832 78.12 62.062Q78.974 98.292 79.474 137.022Q79.974 175.752 79.974 209.168V648.682L20.381 664.974V683.222L203.15 730.549L216.813 719.717L212.813 521.231V209.168Q212.813 175.752 213.313 137.022Q213.813 98.292 214.813 62.062Q215.813 25.832 218.229 0Z" transform="translate(556 0)"/>
11
+ <path d="M147.505 -14.832Q94.965 -14.832 61.673 15.438Q28.381 45.708 28.381 100Q28.381 134.372 45.044 163.265Q61.708 192.159 100.141 216.783Q138.575 241.407 203.823 260.699Q221.654 266.407 246.256 273.115Q270.858 279.823 298.358 286.969Q325.858 294.115 350.946 300.699V279.035Q312.689 267.575 281.481 258.283Q250.273 248.991 234.858 241.575Q209.848 229.946 191.764 214.84Q173.68 199.734 163.786 179.256Q153.893 158.778 153.893 130.451Q153.893 90.283 171.853 71.783Q189.813 53.283 216.858 53.283Q232.486 53.283 245.469 57.575Q258.451 61.867 273.372 72.473Q288.292 83.079 308.381 101.752L316.381 62.336H286.381Q266.089 33.628 244.651 16.69Q223.213 -0.248 199.421 -7.54Q175.628 -14.832 147.505 -14.832ZM379.619 -13.664Q331.708 -13.664 306.898 7.836Q282.089 29.336 277.549 64.381V67.797V316.495Q277.549 365.495 270.881 392.933Q264.213 420.372 248.106 432.018Q232 443.664 202.832 443.664Q188.079 443.664 173.619 439.872Q159.159 436.079 146.946 430.495L176.362 456.575L169.397 385.07Q167.521 338.168 146.61 320.443Q125.699 302.717 101.619 302.717Q78.956 302.717 65.292 314.133Q51.628 325.549 45.381 348.921Q50.717 403.584 104.443 438.04Q158.168 472.495 245.53 472.495Q303.566 472.495 340.145 453.872Q376.724 435.248 393.702 396.354Q410.68 357.46 410.68 296.089V72.381Q410.68 56.956 416.702 49.703Q422.724 42.451 432.477 42.451Q442.645 42.451 450.229 47.389Q457.813 52.327 467.981 64.911L482.229 54.079Q470.105 23 443.964 4.668Q417.823 -13.664 379.619 -13.664Z" transform="translate(832 0)"/>
12
+ <path d="M88.858 -245.549Q71.026 -245.549 51.778 -239.987Q32.53 -234.425 17.283 -221.531Q2.035 -208.638 -4.381 -186.85Q-1.673 -163.479 15.367 -149.023Q32.407 -134.568 58.486 -134.568Q79.734 -134.568 99.605 -144.961Q119.477 -155.355 141.972 -183.346L161.724 -205.593L147.061 -219.505L130.309 -212.054Q149.521 -199.885 164.212 -182.943Q178.902 -166 193.008 -139.181Q207.115 -112.362 222.575 -72.566L258.654 26.505L261.07 34.044L349.813 281.397L412.362 457.664H443.902L248.991 -76.813Q229.946 -129.778 206.924 -167.597Q183.902 -205.416 155.318 -225.482Q126.734 -245.549 88.858 -245.549ZM238.451 -49.893 38.336 457.664H181.76L305.645 113.893L269.318 25.708ZM6.832 436V457.664H264.096V436.292L178.255 421.168H80.381ZM333.778 436.292V457.664H482.946V436L421.778 425.168H412.61Z" transform="translate(1283 0)"/>
13
+ <path d="M220.248 -16Q170.079 -16 124.579 -2.062Q79.079 11.876 38.584 36L46.584 190.832H68.248L128.362 12L81.53 41.664L78.699 54.832Q104.159 37.832 125.035 27.686Q145.911 17.54 167.579 13.748Q189.248 9.956 214.584 9.956Q249.381 9.956 278.071 24.602Q306.762 39.248 323.784 66.938Q340.806 94.628 340.806 134.47Q340.806 169.222 324.868 193.244Q308.93 217.266 282.554 235.912Q256.177 254.558 225.301 270.266L195.673 285.85Q159.089 305.558 125.213 330.474Q91.336 355.39 69.544 392.306Q47.752 429.222 47.752 483.93Q47.752 538.39 73.19 581.076Q98.628 623.762 147.876 648.509Q197.124 673.257 266.699 673.257Q314.575 673.257 354.407 659.695Q394.238 646.133 421.53 625.257L417.53 475.593H395.867L333.46 648.381L385.416 628.381L386.584 600.965Q357.54 626.054 331.473 636.677Q305.407 647.301 272.362 647.301Q238.194 647.301 211.296 633.593Q184.397 619.885 168.437 593.987Q152.477 568.089 152.477 531.956Q152.477 498.203 168.769 473.827Q185.061 449.451 212.145 431.159Q239.229 412.867 270.105 396.159L299.442 380.575Q338.026 360.159 372.756 335.597Q407.486 311.035 429.924 274.827Q452.362 238.619 452.362 181.911Q452.362 126.035 428.424 81.057Q404.486 36.079 353.446 10.04Q302.407 -16 220.248 -16Z" transform="translate(1953 0)"/>
14
+ <path d="M142.946 428V457.664H309.981V428ZM201.283 -14.832Q140.124 -14.832 105.752 15.978Q71.381 46.787 71.381 110.946Q71.381 142.486 71.027 167.048Q70.673 191.61 71.381 230.566L73.381 428H13.664V449.664L102.717 467.664L69.549 445.664L163.442 609.664H209.512L205.512 445.664V436V110.451Q205.512 74.991 220.866 60.969Q236.22 46.946 258.68 46.946Q278.68 46.946 292.14 54.03Q305.601 61.115 318.185 75.699L332.724 64.575Q321.309 39.203 303.915 21.456Q286.521 3.708 261.296 -5.562Q236.07 -14.832 201.283 -14.832Z" transform="translate(2427 0)"/>
15
+ <path d="M195.301 -14.832Q136.177 -14.832 101.846 22.562Q67.514 59.956 68.222 148.115L72.47 422.628L101.257 394.044L18.336 410.921V432L192.813 472.495L206.477 463.079L202.477 330V133.549Q202.477 89.787 218.083 74.367Q233.689 58.946 263.238 58.946Q279.451 58.946 297.495 65.676Q315.54 72.407 334.23 87.283Q352.921 102.159 370.133 125.867L372.47 84.381H359.974Q340.974 53.717 315.952 31.195Q290.93 8.673 260.908 -3.079Q230.885 -14.832 195.301 -14.832ZM351.39 -12.832V81.505V83.797V400.168L296.089 410.921V432L474.566 472.495L488.229 463.079L484.229 330V30.664L534.946 21.664V0Z" transform="translate(2753 0)"/>
16
+ <path d="M205.885 -14.832Q154.762 -14.832 116.239 11.376Q77.717 37.584 55.903 89.146Q34.089 140.708 34.089 215.292Q34.089 295 58.819 352.624Q83.549 410.248 126.487 441.372Q169.425 472.495 224.257 472.495Q251.965 472.495 275.341 461.725Q298.717 450.956 318.739 428.124Q338.762 405.292 354.638 367.752H367.222L354.558 350.54Q331.009 379.673 313.19 392.217Q295.372 404.762 267.115 404.762Q241.734 404.762 220.437 386.863Q199.14 368.965 186.45 328.982Q173.76 289 173.76 222.832Q173.76 159.372 185.45 122.035Q197.14 84.699 218.437 68.654Q239.734 52.61 267.115 52.61Q293.248 52.61 314.275 70.115Q335.301 87.619 353.39 113.752L360.098 92.54H350.638Q336.346 59.584 315.054 35.522Q293.762 11.46 266.824 -1.686Q239.885 -14.832 205.885 -14.832ZM337.39 -12.832V75.797V80.213V378.832L338.806 389.664V648.682L280.089 664.974V683.222L460.566 730.549L474.229 719.717L470.229 514.514V29.956L521.53 21.664V0Z" transform="translate(3299 0)"/>
17
+ <path d="M24.381 0V21.664L109.054 36.495H182.566L264.115 21.664V0ZM74.558 0Q77.266 25.832 78.12 62.062Q78.974 98.292 79.474 137.123Q79.974 175.954 79.974 209.446V239.28Q79.974 286.338 79.828 318.946Q79.682 351.554 77.682 385.46L20.381 401.752V420L203.15 472.495L216.813 461.693L212.813 330V209.493Q212.813 175.987 213.313 137.14Q213.813 98.292 214.813 62.062Q215.813 25.832 218.229 0ZM145.664 547.762Q116.975 547.762 96.324 566.548Q75.673 585.334 75.673 616.521Q75.673 646.708 96.324 665.664Q116.975 684.619 145.664 684.619Q175.352 684.619 195.503 665.617Q215.654 646.616 215.654 616.644Q215.654 585.673 195.503 566.717Q175.352 547.762 145.664 547.762Z" transform="translate(3833 0)"/>
18
+ <path d="M264.451 -14.832Q191.752 -14.832 140.151 15.562Q88.549 45.956 61.319 100.579Q34.089 155.203 34.089 228.248Q34.089 301.292 63.443 356.208Q92.797 411.124 144.752 441.81Q196.708 472.495 264.451 472.495Q337.858 472.495 389.105 442.102Q440.353 411.708 467.583 357.23Q494.813 302.752 494.813 229.416Q494.813 157.372 464.751 101.956Q434.689 46.54 382.734 15.854Q330.778 -14.832 264.451 -14.832ZM264.451 11.124Q292 11.124 311.381 31.314Q330.762 51.505 341.098 99.089Q351.434 146.673 351.434 229.416Q351.434 312.867 341.098 360.013Q330.762 407.159 311.381 426.849Q292 446.54 264.451 446.54Q236.902 446.54 217.375 426.349Q197.848 406.159 187.512 358.575Q177.175 310.991 177.175 228.248Q177.175 145.797 187.512 98.151Q197.848 50.505 217.375 30.814Q236.902 11.124 264.451 11.124Z" transform="translate(4104 0)"/>
19
+ </g>
20
+ </svg>
@@ -0,0 +1,105 @@
1
+ /* The fixed Clay entry keeps its original artwork and resting face. */
2
+ .icon-strip-brand {
3
+ border: 0;
4
+ padding: 0;
5
+ cursor: pointer;
6
+ }
7
+ .icon-strip-brand:hover::before {
8
+ background: var(--bg-alt);
9
+ box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.08);
10
+ }
11
+ .icon-strip-brand.active::before {
12
+ background: color-mix(in srgb, var(--brand-indigo) 12%, var(--bg));
13
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-indigo) 34%, transparent), 0 2px 5px color-mix(in srgb, var(--brand-indigo) 16%, transparent);
14
+ }
15
+ .icon-strip-brand:focus-visible {
16
+ outline: 2px solid var(--accent);
17
+ outline-offset: -3px;
18
+ border-radius: 14px;
19
+ }
20
+ .icon-strip-brand:disabled { cursor: default; }
21
+
22
+ /* Mate colors adapt to the theme; Clay always uses the pale mint default. */
23
+ body.mate-workspace-active {
24
+ --clay-surround: var(--mate-surround-dark, color-mix(in srgb, var(--brand-green) 2%, #232322));
25
+ --clay-face: #2b2b29;
26
+ --clay-well: #1c1c1a;
27
+ --clay-edge: #41413d;
28
+ --clay-blue-ink: var(--brand-blue);
29
+ --clay-blue-edge: color-mix(in srgb, var(--brand-blue) 38%, var(--clay-edge));
30
+ --clay-highlight: rgba(255, 255, 255, 0.05);
31
+ --clay-contact: rgba(var(--shadow-rgb), 0.16);
32
+ }
33
+ :root.light-theme body.mate-workspace-active {
34
+ --clay-surround: var(--mate-surround-light, color-mix(in srgb, var(--brand-green) 3%, var(--brand-paper)));
35
+ --clay-face: #fafaf8;
36
+ --clay-well: #e7e7e2;
37
+ --clay-edge: #d4d4ce;
38
+ --clay-blue-ink: color-mix(in srgb, var(--brand-blue) 48%, var(--brand-ink));
39
+ --clay-highlight: rgba(255, 255, 255, 0.5);
40
+ --clay-contact: rgba(var(--shadow-rgb), 0.07);
41
+ }
42
+
43
+ body.mate-workspace-active #main-area,
44
+ body.mate-workspace-active #main-column {
45
+ background: var(--clay-surround);
46
+ }
47
+ body.mate-workspace-active #main-area {
48
+ border-color: transparent;
49
+ border-top-left-radius: 12px;
50
+ box-shadow: inset 0 1px 0 var(--clay-highlight);
51
+ }
52
+ body.mate-workspace-active #sidebar-column,
53
+ body.mate-workspace-active .title-bar-content {
54
+ --sidebar-bg: var(--clay-surround);
55
+ --sidebar-hover: color-mix(in srgb, var(--text) 4%, var(--clay-surround));
56
+ --text-muted: color-mix(in srgb, var(--text) 76%, var(--clay-surround));
57
+ --text-dimmer: color-mix(in srgb, var(--text) 68%, var(--clay-surround));
58
+ background: var(--clay-surround);
59
+ }
60
+ body.mate-workspace-active .title-bar-sidebar,
61
+ body.mate-workspace-active .title-bar-content {
62
+ border-bottom-color: transparent;
63
+ }
64
+ body.mate-workspace-active .title-bar-mate-avatar {
65
+ border-color: var(--clay-blue-edge);
66
+ box-shadow: 0 1px 2px var(--clay-contact);
67
+ }
68
+ body.mate-workspace-active #sidebar-column .palette-tile:not(:hover):not(.active) > .lucide {
69
+ background: var(--clay-face);
70
+ box-shadow: 0 1px 2px var(--clay-contact), inset 0 0 0 1px var(--clay-edge), inset 0 1px 0 var(--clay-highlight);
71
+ }
72
+ body.mate-workspace-active #sidebar-column .palette-tile:hover > .lucide {
73
+ color: var(--clay-blue-ink);
74
+ box-shadow: 0 2px 4px var(--clay-contact), inset 0 0 0 1px var(--clay-blue-edge);
75
+ }
76
+ body.mate-workspace-active #sidebar-column .session-item.active {
77
+ color: var(--clay-blue-ink);
78
+ background: color-mix(in srgb, var(--brand-blue) 10%, var(--clay-face));
79
+ box-shadow: inset 0 0 0 1px var(--clay-blue-edge), 0 1px 2px var(--clay-contact);
80
+ }
81
+
82
+ /* The six-pixel edge is the only added space. Header, session rows, prose,
83
+ toolbar targets and composer padding keep their production proportions. */
84
+ body.mate-workspace-active #main-panels {
85
+ margin: 0 6px 6px 0;
86
+ border-radius: 12px;
87
+ background: var(--bg);
88
+ box-shadow: 0 0 0 1px var(--clay-edge), 0 2px 3px var(--clay-contact);
89
+ }
90
+ /* Split iframes already sit inside the shared conversation surface. */
91
+ body.mate-workspace-active.pane-mode #main-area {
92
+ border-radius: 0;
93
+ box-shadow: none;
94
+ }
95
+ body.mate-workspace-active.pane-mode #main-panels {
96
+ margin: 0;
97
+ border-radius: 0;
98
+ box-shadow: none;
99
+ }
100
+ @media (max-width: 768px) {
101
+ body.mate-workspace-active:not(.pane-mode) #main-panels {
102
+ margin: 0 4px 4px;
103
+ border-radius: 10px;
104
+ }
105
+ }
@@ -0,0 +1,47 @@
1
+ @media (min-width: 1024px) {
2
+ #debates-workbench { width: 46%; max-width: 720px; min-width: 380px; height: calc(100% - 16px); min-height: 0; align-self: center; margin: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; }
3
+ #debates-workbench.hidden { display: none; }
4
+ #debates-workbench.debates-workbench-wide { width: 68%; max-width: 1120px; }
5
+ #debates-workbench.panel-fullscreen { width: 100%; max-width: none; min-width: 0; height: 100%; margin: 0; border: 0; border-radius: 0; }
6
+ }
7
+ @media (max-width: 1023px) {
8
+ #debates-workbench { position: fixed; inset: 0; z-index: 300; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
9
+ #debates-workbench.hidden { display: none; }
10
+ #debates-workbench [data-debates-action="wide"], #debates-workbench [data-debates-action="fullscreen"] { display: none; }
11
+ }
12
+ .debates-workbench-topbar { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; }
13
+ .debates-workbench-title { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; color: var(--text); font-weight: 700; }
14
+ .debates-workbench-title .lucide { width: 15px; color: var(--accent); }
15
+ .debates-workbench-actions { display: flex; align-items: center; gap: 5px; }
16
+ .debates-workbench-icon, .debates-workbench-new, .debates-workbench-filter { box-sizing: border-box; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-alt); color: var(--text-secondary); font: inherit; cursor: pointer; }
17
+ .debates-workbench-icon { width: 30px; display: inline-flex; align-items: center; justify-content: center; }
18
+ .debates-workbench-icon .lucide { width: 14px; }
19
+ .debates-workbench-icon, .debates-workbench-new { height: 30px; }
20
+ .debates-workbench-new { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-color: var(--accent); background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
21
+ .debates-workbench-new .lucide { width: 14px; }
22
+ .debates-workbench-filters { display: flex; gap: 5px; padding: 8px 14px; border-bottom: 1px solid var(--border-subtle); overflow-x: auto; }
23
+ .debates-workbench-filter { height: 26px; padding: 0 9px; font-size: 11px; }
24
+ .debates-workbench-filter[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
25
+ .debates-workbench-summary { margin: 0; padding: 10px 14px; color: var(--text-dimmer); font-size: 11px; border-bottom: 1px solid var(--border-subtle); }
26
+ .debates-workbench-list { flex: 1; min-height: 0; overflow-y: auto; }
27
+ .debates-workbench-row { width: 100%; min-height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 14px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--border-subtle); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
28
+ .debates-workbench-row:hover { background: var(--bg-alt); }
29
+ .debates-workbench-row:focus-visible, .debates-workbench-icon:focus-visible, .debates-workbench-new:focus-visible, .debates-workbench-filter:focus-visible, .debates-workbench-form-actions button:focus-visible, .debates-workbench-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
30
+ .debates-workbench-row strong, .debates-workbench-row span { min-width: 0; }
31
+ .debates-workbench-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
32
+ .debates-workbench-row-panel { grid-column: 1; color: var(--text-dimmer); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
33
+ .debates-workbench-row-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--text-dimmer); font-size: 11px; }
34
+ .debates-workbench-phase { padding: 2px 7px; border-radius: 999px; background: var(--bg-alt); color: var(--text-secondary); font-weight: 700; text-transform: capitalize; }
35
+ .debates-workbench-empty { padding: 48px 24px; text-align: center; color: var(--text-dimmer); }
36
+ .debates-workbench-empty strong { display: block; margin-bottom: 6px; color: var(--text); }
37
+ .debates-workbench-form { padding: 14px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-alt); }
38
+ .debates-workbench-form.hidden { display: none; }
39
+ .debates-workbench-form label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 700; }
40
+ .debates-workbench-form textarea { box-sizing: border-box; width: 100%; min-height: 72px; resize: vertical; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; background: var(--bg); color: var(--text); font: inherit; }
41
+ .debates-workbench-launch-status { min-height: 15px; margin: 6px 0 0; color: var(--danger); font-size: 11px; }
42
+ .debates-workbench-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 8px; }
43
+ .debates-workbench-form-actions button { height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text-secondary); font: inherit; cursor: pointer; }
44
+ .debates-workbench-form-actions button[type="submit"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
45
+ .project-debate-planning-error { margin: 10px 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--danger) 5%, var(--bg)); }
46
+ .project-debate-planning-error p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
47
+ .project-debate-planning-error button { min-height: 30px; margin-top: 8px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 7px; background: var(--bg); color: var(--accent); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
@@ -1696,6 +1696,16 @@
1696
1696
  padding: 0;
1697
1697
  }
1698
1698
 
1699
+ .file-viewer-html-preview {
1700
+ display: block;
1701
+ width: 100%;
1702
+ height: 100%;
1703
+ min-height: 320px;
1704
+ border: 0;
1705
+ background: #fff;
1706
+ color-scheme: light;
1707
+ }
1708
+
1699
1709
  .file-viewer-body pre {
1700
1710
  margin: 0;
1701
1711
  padding: 16px 20px;
@@ -144,3 +144,29 @@
144
144
  .home-mate-chat-transcript.home-chat-bubble-layout .home-debate-live-user > .dm-bubble-avatar { width: 32px; height: 32px; }
145
145
  }
146
146
  @media (prefers-reduced-motion: reduce) { .home-debate-live-activity i, .home-debate-control-dots i { animation: none; opacity: .7; } }
147
+
148
+ /* The project shell hosts the same debate cards and participation controls. */
149
+ #messages > .project-debate-transcript { width: 100%; max-width: 860px; min-height: 0; margin: 0 auto; padding: 16px 12px; }
150
+ .project-debate-transcript .home-debate-live-header { margin-bottom: 24px; }
151
+ .project-debate-controls { flex: none; width: min(100%, 884px); margin: 0 auto; padding: 12px 24px 18px; }
152
+ #input-area[hidden] { display: none !important; }
153
+ .project-debate-error { color: var(--error); font-size: 12px; margin: 8px 0 0; }
154
+ @media (max-width: 600px) {
155
+ #messages > .project-debate-transcript { padding: 12px 4px; }
156
+ .project-debate-controls { padding: 8px 12px 12px; }
157
+ }
158
+ @media (max-width: 768px) {
159
+ .project-debate-controls { padding-bottom: calc(var(--safe-bottom) + 64px); }
160
+ body.keyboard-open .project-debate-controls { padding-bottom: 8px; }
161
+ #messages .project-debate-transcript .home-debate-live-user {
162
+ display: grid !important;
163
+ grid-template-columns: 32px minmax(0, 1fr);
164
+ gap: 9px;
165
+ padding: 4px 12px !important;
166
+ max-width: 100% !important;
167
+ }
168
+ #messages .project-debate-transcript .home-debate-live-user .dm-bubble-content {
169
+ align-items: flex-start !important;
170
+ min-width: 0;
171
+ }
172
+ }
@@ -3,7 +3,6 @@
3
3
  ========================================================================== */
4
4
 
5
5
  body.home-active #top-bar,
6
- body.home-active #icon-strip,
7
6
  body.home-active #sidebar-column,
8
7
  body.home-active #mate-sidebar-column,
9
8
  body.home-active #sidebar-resize-handle,
@@ -19,6 +18,9 @@ body.capsules-disabled #home-tool-workbench { display: none !important; }
19
18
 
20
19
  body.home-active #main-area { border: 0; border-radius: 0; }
21
20
 
21
+ /* Preserve rail targets when the 32px project top bar is hidden. */
22
+ body.home-active #icon-strip { padding-top: 32px; }
23
+
22
24
  body.home-surface-boot-pending #connect-overlay.hidden {
23
25
  opacity: 1;
24
26
  pointer-events: auto;
@@ -1,131 +1,15 @@
1
- /* Vendor and model controls shared by the Mate settings dialog. */
2
-
3
- .home-mate-model-note {
4
- max-width: 560px;
5
- margin: 0 0 18px;
6
- color: var(--text-muted);
7
- font-size: 12px;
8
- line-height: 1.55;
9
- }
10
-
11
- .home-mate-model-current {
12
- margin: -8px 0 20px;
13
- color: var(--text-dimmer);
14
- font-size: 11px;
15
- }
16
-
17
- .home-mate-model-section-label {
18
- margin: 18px 0 8px;
19
- color: var(--text-dimmer);
20
- font-size: 10px;
21
- font-weight: 700;
22
- letter-spacing: 0.08em;
23
- text-transform: uppercase;
24
- }
25
-
26
- .home-mate-vendor-list {
27
- display: flex;
28
- flex-wrap: wrap;
29
- gap: 6px;
30
- }
31
-
32
- .home-mate-vendor-option {
33
- padding: 7px 11px;
34
- border: 1px solid transparent;
35
- border-radius: 999px;
36
- background: rgba(var(--overlay-rgb), 0.035);
37
- color: var(--text-muted);
38
- font: inherit;
39
- font-size: 12px;
40
- cursor: pointer;
41
- }
42
-
43
- .home-mate-vendor-option:hover,
44
- .home-mate-vendor-option[aria-pressed="true"] {
45
- border-color: var(--border-subtle);
46
- background: rgba(var(--overlay-rgb), 0.075);
47
- color: var(--text);
48
- }
49
-
50
- .home-mate-vendor-option[aria-pressed="true"] { font-weight: 650; }
51
-
52
- .home-mate-model-muted {
53
- color: var(--text-dimmer);
54
- font-size: 11px;
55
- }
56
-
57
- .home-mate-model-list {
58
- display: grid;
59
- gap: 6px;
60
- }
61
-
62
- .home-mate-model-option,
63
- .home-mate-model-retry {
64
- border: 1px solid var(--border-subtle);
65
- background: transparent;
66
- color: var(--text-secondary);
67
- font: inherit;
68
- cursor: pointer;
69
- }
70
-
71
- .home-mate-model-option {
72
- display: flex;
73
- align-items: baseline;
74
- justify-content: space-between;
75
- gap: 16px;
76
- width: 100%;
77
- padding: 11px 12px;
78
- border-radius: 8px;
79
- text-align: left;
80
- }
81
-
82
- .home-mate-model-option:hover,
83
- .home-mate-model-option[aria-pressed="true"] {
84
- border-color: var(--border);
85
- background: rgba(var(--overlay-rgb), 0.045);
86
- color: var(--text);
87
- }
88
-
89
- .home-mate-model-option[aria-pressed="true"] { font-weight: 600; }
90
- .home-mate-vendor-option:disabled,
91
- .home-mate-model-option:disabled { cursor: wait; opacity: 0.62; }
92
-
93
- .home-mate-model-option small {
94
- overflow: hidden;
95
- color: var(--text-dimmer);
96
- font-size: 10px;
97
- font-weight: 400;
98
- text-overflow: ellipsis;
99
- white-space: nowrap;
100
- }
101
-
102
- .home-mate-model-state {
103
- padding: 28px 0;
104
- color: var(--text-muted);
105
- font-size: 12px;
106
- text-align: center;
107
- }
108
-
109
- .home-mate-model-retry {
110
- display: block;
111
- margin: 14px auto 0;
112
- padding: 7px 11px;
113
- border-radius: 7px;
114
- }
115
-
116
- .home-mate-model-retry:hover { background: rgba(var(--overlay-rgb), 0.045); color: var(--text); }
117
-
118
- .home-mate-model-selection-status {
119
- min-height: 20px;
120
- padding-top: 10px;
121
- color: var(--text-muted);
122
- font-size: 11px;
123
- }
124
-
125
- .home-mate-vendor-option:focus-visible,
126
- .home-mate-model-option:focus-visible,
127
- .home-mate-model-retry:focus-visible {
128
- border-radius: 4px;
129
- outline: 2px solid var(--accent);
130
- outline-offset: 3px;
131
- }
1
+ /* Provider/model share the compact setting-row vocabulary of account settings. */
2
+ .mate-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
3
+ .mate-settings-row > div:first-child { flex: 1; min-width: 0; }
4
+ .mate-settings-row label { font-size: 13px; font-weight: 500; color: var(--text); }
5
+ .mate-settings-row p { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
6
+ .mate-settings-value { width: 210px; flex: none; min-width: 0; }
7
+ .mate-settings-value .worker-runtime-trigger, .mate-settings-value select { height: 36px; border-radius: 8px; font-size: 13px; }
8
+ .mate-settings-value .worker-runtime-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
9
+ .mate-settings-model-section > .mate-settings-help { margin-bottom: 12px; }
10
+ .home-mate-model-retry { align-self: flex-start; margin-top: 8px; }
11
+ @media (max-width: 600px) {
12
+ .mate-settings-row { flex-direction: column; align-items: stretch; gap: 10px; }
13
+ .mate-settings-value { width: 100%; }
14
+ }
15
+ @media (pointer: coarse) { .mate-settings-value select { height: 40px; } }