clay-server 5.5.2 → 5.6.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/project-connection.js +24 -2
- package/lib/project-entry-policy.js +55 -0
- package/lib/project-session-actions.js +4 -0
- package/lib/project.js +3 -0
- package/lib/public/app.js +2 -0
- package/lib/public/appearance-bootstrap.js +2 -1
- package/lib/public/css/chrome-material.css +22 -5
- package/lib/public/css/navigation-island.css +72 -8
- package/lib/public/css/project-empty-canvas.css +43 -0
- package/lib/public/css/split-view-layout.css +3 -3
- package/lib/public/css/title-bar.css +1 -1
- package/lib/public/css/tool-pane.css +5 -5
- package/lib/public/css/workspace-background-gallery.css +3 -3
- package/lib/public/index.html +1 -0
- package/lib/public/modules/app-connection.js +1 -1
- package/lib/public/modules/app-messages.js +8 -1
- package/lib/public/modules/appearance-preferences.js +3 -2
- package/lib/public/modules/command-palette.js +1 -1
- package/lib/public/modules/pane-appearance-bridge.js +1 -1
- package/lib/public/modules/project-empty-canvas.js +159 -0
- package/lib/public/modules/projects-hub-view.js +1 -1
- package/lib/public/modules/split-pane-header-state.js +4 -5
- package/lib/public/modules/split-pane-renderer.js +3 -9
- package/lib/public/modules/split-session-boundary.js +1 -0
- package/lib/public/modules/split-view-close-actions.js +40 -0
- package/lib/public/modules/split-view-picker-render.js +13 -13
- package/lib/public/modules/split-view-presentation-close.js +9 -5
- package/lib/public/modules/split-view-presentation-renderer.js +5 -0
- package/lib/public/modules/split-view-presentations.js +19 -33
- package/lib/public/modules/split-view.js +7 -1
- package/lib/public/modules/theme.js +1 -1
- package/lib/public/modules/view-workspace-controller.js +6 -2
- package/lib/public/modules/workspace-background-gallery.js +16 -11
- package/lib/public/pane-assets/{app-H6UV34XQ.js → app-Y3UNQJAF.js} +1 -1
- package/lib/public/pane-assets/{chunk-67B5MWKR.js → chunk-3HH6CEO5.js} +1 -1
- package/lib/public/pane-assets/chunk-5JCXUWGC.js +1 -0
- package/lib/public/pane-assets/{chunk-633SGCT2.js → chunk-5Z22SHOM.js} +1 -1
- package/lib/public/pane-assets/{chunk-VAS6LSXR.js → chunk-76XI36Y7.js} +1 -1
- package/lib/public/pane-assets/chunk-BCUZ5CU4.js +1 -0
- package/lib/public/pane-assets/{chunk-IHK2VFL6.js → chunk-BHQLADRL.js} +1 -1
- package/lib/public/pane-assets/{chunk-TJYXZQL7.js → chunk-DCIX62EV.js} +1 -1
- package/lib/public/pane-assets/{chunk-T6XZ4HSS.js → chunk-DK5TJRPY.js} +1 -1
- package/lib/public/pane-assets/{chunk-XUTPUOOM.js → chunk-DNZONOJO.js} +1 -1
- package/lib/public/pane-assets/{chunk-MY6UBTTY.js → chunk-FFGCYBLP.js} +1 -1
- package/lib/public/pane-assets/{chunk-RTJ34GHZ.js → chunk-HA7YSD4A.js} +1 -1
- package/lib/public/pane-assets/chunk-IX4TRTWV.js +1 -0
- package/lib/public/pane-assets/{chunk-T5JS6E2K.js → chunk-JD65ITOS.js} +1 -1
- package/lib/public/pane-assets/chunk-JYKTJDXQ.js +1 -0
- package/lib/public/pane-assets/{chunk-KMFUU6Q2.js → chunk-M6IVTHY2.js} +1 -1
- package/lib/public/pane-assets/chunk-MHIJP27M.js +1 -0
- package/lib/public/pane-assets/{chunk-Z77CGAMT.js → chunk-S7RDX7Z7.js} +97 -97
- package/lib/public/pane-assets/{chunk-NEM3WBSD.js → chunk-SBLWP3OO.js} +1 -1
- package/lib/public/pane-assets/{chunk-YGHAWNJX.js → chunk-XUDCXLKZ.js} +1 -1
- package/lib/public/pane-assets/{chunk-2EMRY2BT.js → chunk-YIMKBG4B.js} +1 -1
- package/lib/public/pane-assets/{chunk-ZPRL32HE.js → chunk-YSP3IUTM.js} +1 -1
- package/lib/public/pane-assets/chunk-Z2APTNHP.js +1 -0
- package/lib/public/pane-assets/chunk-ZH3SEVMH.js +1 -0
- package/lib/public/pane-assets/manifest.json +392 -390
- package/lib/public/pane-assets/style-KPZA4PQD.css +1 -0
- package/lib/public/workspace-art/classic-mac-dither.svg +1 -0
- package/lib/public/workspace-art/clay-aqua.webp +0 -0
- package/lib/public/workspace-art/clay-clouds.webp +0 -0
- package/lib/public/workspace-art/clay-cove.webp +0 -0
- package/lib/public/workspace-art/clay-embossed.webp +0 -0
- package/lib/public/workspace-art/clay-galaxy.webp +0 -0
- package/lib/public/workspace-art/clay-light.webp +0 -0
- package/lib/public/workspace-art/clay-mates.webp +0 -0
- package/lib/public/workspace-art/clay-meadow.webp +0 -0
- package/lib/public/workspace-art/clay-memphis.webp +0 -0
- package/lib/public/workspace-art/clay-silicon.webp +0 -0
- package/lib/public/workspace-background-catalog.js +45 -4
- package/lib/server-appearance-settings.js +2 -2
- package/lib/server.js +1 -1
- package/lib/sessions.js +15 -1
- package/lib/user-presence.js +26 -0
- package/lib/ws-schema.js +1 -0
- package/package.json +1 -1
- package/lib/public/pane-assets/chunk-54AIJGMD.js +0 -1
- package/lib/public/pane-assets/chunk-A33CACT7.js +0 -1
- package/lib/public/pane-assets/chunk-CZBPKNRD.js +0 -1
- package/lib/public/pane-assets/chunk-EZHZ5MFM.js +0 -1
- package/lib/public/pane-assets/chunk-P36WWGYN.js +0 -1
- package/lib/public/pane-assets/chunk-XLUV3TB5.js +0 -1
- package/lib/public/pane-assets/chunk-XXMTHJBP.js +0 -1
- package/lib/public/pane-assets/style-F4MQRRX2.css +0 -1
|
@@ -143,6 +143,19 @@ function attachConnection(ctx) {
|
|
|
143
143
|
// warmup once per reconnect.
|
|
144
144
|
var _warmedUp = false;
|
|
145
145
|
|
|
146
|
+
function visibleEntrySessions(ws) {
|
|
147
|
+
return Array.from(sm.sessions.values()).filter(function (session) {
|
|
148
|
+
if (ctx.canAccessSession && !ctx.canAccessSession(ws, session)) return false;
|
|
149
|
+
return usersModule.isMultiUser() ? !!ws._clayUser && usersModule.canAccessSession(ws._clayUser.id, session, { visibility: "public" }) : !session.ownerId;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
if (sm && sm.addOnSessionViewed) sm.addOnSessionViewed(function (session, ws) {
|
|
153
|
+
if (isMate || !ws || ws._clayPane || !clients.has(ws) || ws.readyState !== 1) return;
|
|
154
|
+
var available = visibleEntrySessions(ws);
|
|
155
|
+
if (available.indexOf(session) < 0 || !require('./project-entry-policy').eligible(session)) return;
|
|
156
|
+
userPresence.recordVisit(slug, ws._clayUser ? ws._clayUser.id : '_default', session, available);
|
|
157
|
+
});
|
|
158
|
+
|
|
146
159
|
function findRestoredActiveSession(ws, wsUser, allSessions) {
|
|
147
160
|
if (ws._clayContextual && ws._clayPaneSession) {
|
|
148
161
|
return { active: allSessions.find(function (session) { return session.localId === ws._clayPaneSession; }) || null, storedPresence: null };
|
|
@@ -150,6 +163,10 @@ function attachConnection(ctx) {
|
|
|
150
163
|
var active = null;
|
|
151
164
|
var presenceKey = wsUser ? wsUser.id : "_default";
|
|
152
165
|
var storedPresence = userPresence.getPresence(slug, presenceKey);
|
|
166
|
+
if (!isMate && !ws._clayPane) {
|
|
167
|
+
var available = visibleEntrySessions(ws);
|
|
168
|
+
return { active: require('./project-entry-policy').choose(available, userPresence.getVisits(slug, presenceKey, available), Date.now()), storedPresence: storedPresence, entryPolicy: true };
|
|
169
|
+
}
|
|
153
170
|
if (storedPresence && storedPresence.sessionId) {
|
|
154
171
|
active = userPresence.findSession(sm.sessions, storedPresence.sessionId);
|
|
155
172
|
if (active && usersModule.isMultiUser() && wsUser) {
|
|
@@ -222,6 +239,10 @@ function attachConnection(ctx) {
|
|
|
222
239
|
}
|
|
223
240
|
var initialModels = (sm.modelsByVendor && sm.modelsByVendor[initialVendor]) || sm.availableModels || [];
|
|
224
241
|
sendTo(ws, { type: "info", controlRuntimeId: require("./clay-control-target-projection").runtime(sm), cwd: cwd, slug: slug, project: title || project, version: currentVersion, debug: !!debug, dangerouslySkipPermissions: dangerouslySkipPermissions, osUsers: osUsers, lanHost: lanHost, projectCount: _filteredProjects.length, projects: _filteredProjects, projectOwnerId: projectOwnerId, ownerLocked: ownerLocked, paneOsIdentity: wsUser && wsUser.linuxUser || null, vendors: require("./yoke/vendor-registry").publicInfo(), isMate: isMate, mateId: isMate ? mateId : null, mateDisplayName: isMate ? (mateDisplayName || title || project || "Mate") : "" });
|
|
242
|
+
if (restoredState.entryPolicy) {
|
|
243
|
+
sendTo(ws, { type: "project_entry", projectSlug: slug, empty: !restoredActive });
|
|
244
|
+
if (!restoredActive) ws._clayActiveSession = null;
|
|
245
|
+
}
|
|
225
246
|
if (typeof sendCursorSharingState === "function") sendCursorSharingState(ws);
|
|
226
247
|
// Update notifications are pushed on a scheduled interval (see
|
|
227
248
|
// scheduleUpdateBroadcast). We no longer push on connect to avoid
|
|
@@ -279,7 +300,7 @@ function attachConnection(ctx) {
|
|
|
279
300
|
var presenceKey = wsUser ? wsUser.id : "_default";
|
|
280
301
|
var storedPresence = restoredState.storedPresence;
|
|
281
302
|
var autoCreated = false;
|
|
282
|
-
if (!active && (!ws._clayPane || (ws._clayContextual && !ws._clayPaneSession))) {
|
|
303
|
+
if (!active && !restoredState.entryPolicy && (!ws._clayPane || (ws._clayContextual && !ws._clayPaneSession))) {
|
|
283
304
|
var autoOpts = {};
|
|
284
305
|
if (wsUser && usersModule.isMultiUser()) autoOpts.ownerId = wsUser.id;
|
|
285
306
|
active = sm.createSession(autoOpts, ws);
|
|
@@ -354,11 +375,12 @@ function attachConnection(ctx) {
|
|
|
354
375
|
|
|
355
376
|
if (active && !ws._clayPane) {
|
|
356
377
|
userPresence.setPresence(slug, presenceKey, userPresence.sessionIdForPersistence(active), storedPresence ? storedPresence.mateDm : null);
|
|
378
|
+
if (restoredState.entryPolicy) userPresence.recordVisit(slug, presenceKey, active, visibleEntrySessions(ws));
|
|
357
379
|
if (autoCreated) {
|
|
358
380
|
sendTo(ws, { type: "context_sources_state", active: [] });
|
|
359
381
|
}
|
|
360
382
|
}
|
|
361
|
-
if (storedPresence && storedPresence.mateDm && !isMate) {
|
|
383
|
+
if (storedPresence && storedPresence.mateDm && !isMate && !restoredState.entryPolicy) {
|
|
362
384
|
sendTo(ws, { type: "restore_mate_dm", mateId: storedPresence.mateDm });
|
|
363
385
|
}
|
|
364
386
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var activity = require('./session-activity-state');
|
|
2
|
+
var provenance = require('./session-provenance');
|
|
3
|
+
var background = require('./background-task-timing');
|
|
4
|
+
var DAY = 24 * 60 * 60 * 1000;
|
|
5
|
+
function timestamp(value) { return Number.isFinite(value) && value > 0 ? value : null; }
|
|
6
|
+
function working(session) {
|
|
7
|
+
var state = activity.currentState(session);
|
|
8
|
+
if (state.processing || state.starting || state.recoveryStopPending || background.countUserTasks(session.activeBackgroundTasks) > 0) return true;
|
|
9
|
+
if (state.stopRequested || state.queuePaused) return false;
|
|
10
|
+
return state.pendingApprovalCount > 0 || state.pendingInputCount > 0 ||
|
|
11
|
+
session._queuedTurnCount > 0 || !!session._pendingMessageClaimId;
|
|
12
|
+
}
|
|
13
|
+
// No file mtime or view timestamp: these can change merely by opening history.
|
|
14
|
+
function stoppedAt(session) {
|
|
15
|
+
var value = timestamp(session.workStoppedAt);
|
|
16
|
+
var history = session.history || [];
|
|
17
|
+
for (var i = history.length - 1; i >= 0; i--) {
|
|
18
|
+
if (history[i].type === 'done' && timestamp(history[i]._ts)) { value = Math.max(value || 0, history[i]._ts); break; }
|
|
19
|
+
}
|
|
20
|
+
return value || (session.workTimestampUnknown ? null : timestamp(session.createdAt));
|
|
21
|
+
}
|
|
22
|
+
function observe(session, now) {
|
|
23
|
+
var active = working(session), previous = session._entryWorkActive;
|
|
24
|
+
session._entryWorkActive = active;
|
|
25
|
+
if (previous === true && !active) { session.workStoppedAt = now; return true; }
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
function eligible(session) {
|
|
29
|
+
return session && !session.hidden && !session.isMate && !provenance.isWorker(session) &&
|
|
30
|
+
(session.runtimeMode || session.mode || 'gui') === 'gui' && !session.tuiSuspended && typeof session.sessionOriginId === 'string';
|
|
31
|
+
}
|
|
32
|
+
function choose(sessions, visits, now) {
|
|
33
|
+
var candidates = sessions.filter(eligible), owned = provenance.ownedWorkersByDriver(sessions);
|
|
34
|
+
var byOrigin = Object.create(null);
|
|
35
|
+
candidates.forEach(function (session) {
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(byOrigin, session.sessionOriginId)) byOrigin[session.sessionOriginId] = null;
|
|
37
|
+
else byOrigin[session.sessionOriginId] = session;
|
|
38
|
+
});
|
|
39
|
+
function state(session) {
|
|
40
|
+
var scope = [session].concat(owned[session.localId] || []);
|
|
41
|
+
return { running: scope.some(working), stoppedAt: Math.max.apply(Math, scope.map(function (item) { return stoppedAt(item) || 0; })) };
|
|
42
|
+
}
|
|
43
|
+
var visited = (visits || []).map(function (visit) { return byOrigin[visit.originId]; }).filter(Boolean);
|
|
44
|
+
var last = visited[0];
|
|
45
|
+
if (last) {
|
|
46
|
+
var lastState = state(last);
|
|
47
|
+
if (lastState.running || lastState.stoppedAt > 0 && now >= lastState.stoppedAt && now - lastState.stoppedAt < DAY) return last;
|
|
48
|
+
}
|
|
49
|
+
var running = visited.find(function (session) { return state(session).running; });
|
|
50
|
+
if (running) return running;
|
|
51
|
+
// Unvisited running work has no human visit order. Stable origins break ties.
|
|
52
|
+
return candidates.filter(function (session) { return byOrigin[session.sessionOriginId] === session && state(session).running; })
|
|
53
|
+
.sort(function (a, b) { return a.sessionOriginId.localeCompare(b.sessionOriginId); })[0] || null;
|
|
54
|
+
}
|
|
55
|
+
module.exports = { choose: choose, eligible: eligible, working: working, stoppedAt: stoppedAt, observe: observe };
|
|
@@ -28,12 +28,16 @@ function attachSessionActions(ctx) {
|
|
|
28
28
|
}
|
|
29
29
|
function stop(session, actor, retiring) {
|
|
30
30
|
exact(session);
|
|
31
|
+
// Capture live work before Stop suppresses pending requests; idle Stop must not renew it.
|
|
32
|
+
var observeWork = sm.observeWorkActivity && require('./project-entry-policy').working(session);
|
|
33
|
+
if (observeWork) sm.observeWorkActivity(session);
|
|
31
34
|
session._humanStopRevision = (session._humanStopRevision || 0) + 1;
|
|
32
35
|
if (ctx.autonomousRun && session.autonomousRun) ctx.autonomousRun.finish(session, "stopped", "Stopped by the user.");
|
|
33
36
|
if (typeof ctx.sdk.cancelResponseRecovery === "function") ctx.sdk.cancelResponseRecovery(session);
|
|
34
37
|
session._pendingMessageDrainPaused = true;
|
|
35
38
|
if (ctx.onPendingQueuePause) ctx.onPendingQueuePause(session, actor || null);
|
|
36
39
|
if (ctx.onHumanPairStop) ctx.onHumanPairStop(session);
|
|
40
|
+
if (observeWork) sm.observeWorkActivity(session);
|
|
37
41
|
if (!session.isProcessing && !session._queryStarting && !session._responseRecoveryStopPending && !session._awaitingTurnResult && !session.queryInstance) return { status: "completed", queuePaused: true };
|
|
38
42
|
session.taskStopRequested = true;
|
|
39
43
|
if (retiring) return { status: "queued", queuePaused: true };
|
package/lib/project.js
CHANGED
|
@@ -238,6 +238,7 @@ function createProjectContext(opts) {
|
|
|
238
238
|
var _scheduledTasks = null;
|
|
239
239
|
var _scheduledTaskExecution = null;
|
|
240
240
|
function onProcessingChanged() {
|
|
241
|
+
if (sm && sm.observeWorkActivity) sm.observeWorkActivity();
|
|
241
242
|
notifyProcessingChanged();
|
|
242
243
|
if (_scheduledMessages) _scheduledMessages.notify();
|
|
243
244
|
}
|
|
@@ -614,6 +615,7 @@ function createProjectContext(opts) {
|
|
|
614
615
|
// --- Session manager ---
|
|
615
616
|
var _gitAttribution = null;
|
|
616
617
|
var sm = createSessionManager({
|
|
618
|
+
createInitialSession: isMate,
|
|
617
619
|
onAuthRequired: function (session, msg) { return _workerAuth && _workerAuth.emit(session, msg); },
|
|
618
620
|
isMate: isMate,
|
|
619
621
|
cwd: cwd,
|
|
@@ -2818,6 +2820,7 @@ function createProjectContext(opts) {
|
|
|
2818
2820
|
|
|
2819
2821
|
// --- Connection handler (delegated to project-connection.js) ---
|
|
2820
2822
|
var _connection = attachConnection({
|
|
2823
|
+
canAccessSession: function (ws, session) { return _requestAccess.canReadSession(ws, session); },
|
|
2821
2824
|
cwd: cwd,
|
|
2822
2825
|
slug: slug,
|
|
2823
2826
|
isMate: isMate,
|
package/lib/public/app.js
CHANGED
|
@@ -526,6 +526,8 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
526
526
|
backgroundTaskCatalog: [],
|
|
527
527
|
backgroundTaskViewer: null,
|
|
528
528
|
splitSessionPicker: null,
|
|
529
|
+
projectEntryEmpty: false,
|
|
530
|
+
projectStartPicker: null,
|
|
529
531
|
splitSessionCreation: null,
|
|
530
532
|
agentMessagePreviews: {},
|
|
531
533
|
agentMessageBubble: null,
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
root.dataset.workspaceColor = color.id;
|
|
10
10
|
root.style.setProperty('--workspace-solid-light', color.light);
|
|
11
11
|
root.style.setProperty('--workspace-solid-dark', color.dark);
|
|
12
|
-
root.
|
|
12
|
+
globalThis.ClayWorkspaceBackgrounds.applyPicture(root.style, seed && seed.background);
|
|
13
|
+
root.dataset.workspaceBackground = globalThis.ClayWorkspaceBackgrounds.normalizeBackground(seed && seed.background);
|
|
13
14
|
|
|
14
15
|
function applyMode(mode) {
|
|
15
16
|
if (mode !== "light" && mode !== "dark") return;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Shared backing layers for navigation and pane chrome. Keep the filter on
|
|
2
2
|
a backing layer so fixed-position controls retain their original viewport. */
|
|
3
3
|
:root {
|
|
4
4
|
--chrome-material-blur: 14px;
|
|
5
5
|
--chrome-material-saturation: 1.08;
|
|
6
6
|
--chrome-material-tint: 74%;
|
|
7
|
-
--topbar-material-tint: 88%;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
:is(#top-bar, :where(#navigation-island) > #icon-strip, #sidebar-column, #mate-sidebar-column, .title-bar-content,
|
|
@@ -27,10 +26,16 @@
|
|
|
27
26
|
--chrome-material-solid: var(--sidebar-bg);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
/*
|
|
29
|
+
/* Navigation is denser and more diffuse than pane chrome. */
|
|
30
|
+
:is(:where(#navigation-island) > #icon-strip, #sidebar-column, #mate-sidebar-column) {
|
|
31
|
+
--chrome-material-tint: 90%;
|
|
32
|
+
--chrome-material-blur: 24px;
|
|
33
|
+
--chrome-material-saturation: 1.04;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* The global menu stays fully opaque, independently of navigation glass. */
|
|
31
37
|
#top-bar {
|
|
32
38
|
--chrome-material-solid: var(--sidebar-bg);
|
|
33
|
-
--chrome-material-tint: var(--topbar-material-tint);
|
|
34
39
|
/* Preserve the toolbar popover layer above chat and below contextual Clay. */
|
|
35
40
|
z-index: 150;
|
|
36
41
|
}
|
|
@@ -69,7 +74,7 @@ body.mate-workspace-active :is(#sidebar-column, .title-bar-content) {
|
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, black 74%, transparent)) {
|
|
72
|
-
:is(
|
|
77
|
+
:is(:where(#navigation-island) > #icon-strip, #sidebar-column, #mate-sidebar-column, .title-bar-content,
|
|
73
78
|
.split-pane-header, .tool-pane-header, .terminal-header,
|
|
74
79
|
.file-viewer-tabbar, .shared-browser-header, .dm-header-bar, #contextual-clay > header) {
|
|
75
80
|
--chrome-material-fill: color-mix(in srgb, var(--chrome-material-solid) var(--chrome-material-tint), transparent);
|
|
@@ -80,6 +85,9 @@ body.mate-workspace-active :is(#sidebar-column, .title-bar-content) {
|
|
|
80
85
|
/* The mobile drawer owns its existing fixed positioning and touch behavior. */
|
|
81
86
|
@media (max-width: 768px) {
|
|
82
87
|
#sidebar {
|
|
88
|
+
--chrome-material-tint: 90%;
|
|
89
|
+
--chrome-material-blur: 24px;
|
|
90
|
+
--chrome-material-saturation: 1.04;
|
|
83
91
|
--chrome-material-solid: var(--sidebar-bg);
|
|
84
92
|
--chrome-material-fill: var(--chrome-material-solid);
|
|
85
93
|
--chrome-material-filter: none;
|
|
@@ -131,3 +139,12 @@ body.mate-workspace-active :is(#sidebar-column, .title-bar-content) {
|
|
|
131
139
|
}
|
|
132
140
|
/* Browser tabs live inside the shared header, rather than its content body. */
|
|
133
141
|
.tool-pane-material > .tool-pane-header > .shared-browser-tabs { background: transparent; }
|
|
142
|
+
|
|
143
|
+
/* Reading surfaces stay opaque in project, embedded and native Mate chats.
|
|
144
|
+
Navigation and pane headers retain their independent backing materials. */
|
|
145
|
+
#app,
|
|
146
|
+
.split-pane-frame {
|
|
147
|
+
background: var(--bg);
|
|
148
|
+
-webkit-backdrop-filter: none;
|
|
149
|
+
backdrop-filter: none;
|
|
150
|
+
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
#navigation-island { display: contents; }
|
|
3
3
|
|
|
4
4
|
/* Theme classes are resolved by theme.js, including automatic appearance. */
|
|
5
|
-
:root { --workspace-art: none; --workspace-solid: var(--workspace-solid-dark, #
|
|
6
|
-
:root.light-theme { --workspace-solid: var(--workspace-solid-light, #
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
:root { --workspace-art: var(--workspace-art-dark, none); --workspace-solid: var(--workspace-solid-dark, #242422); }
|
|
6
|
+
:root.light-theme { --workspace-art: var(--workspace-art-light, none); --workspace-solid: var(--workspace-solid-light, #E7E7E2); }
|
|
7
|
+
|
|
8
|
+
/* Catalog metadata owns picture fit and scale, including the mobile picker. */
|
|
9
|
+
:root body:not(.pane-mode) #layout,
|
|
10
|
+
:root body:not(.pane-mode):has(#split-host.project-start-visible) #layout {
|
|
11
|
+
background: var(--workspace-solid) var(--workspace-art) var(--workspace-art-position, center) / var(--workspace-art-size, cover) var(--workspace-art-repeat, no-repeat);
|
|
12
|
+
}
|
|
9
13
|
|
|
10
14
|
@media (min-width: 769px) {
|
|
11
15
|
/* One continuous backing reaches both the global menu and workspace. */
|
|
12
|
-
body:not(.pane-mode) #layout {
|
|
13
|
-
background: var(--workspace-solid) var(--workspace-art) center / cover no-repeat;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
16
|
body:not(.pane-mode) #layout-body {
|
|
17
17
|
gap: 6px;
|
|
18
18
|
padding: 6px;
|
|
@@ -259,3 +259,67 @@ body.projects-active:not(.projects-shell) #layout-body {
|
|
|
259
259
|
#terminal-toggle-btn #terminal-count.hidden,
|
|
260
260
|
#sticky-notes-toggle-btn .sticky-notes-count.hidden,
|
|
261
261
|
#notif-center-btn .notif-badge.hidden { display: none; }
|
|
262
|
+
|
|
263
|
+
/* Sidebar controls share the navigation face without bright floating tiles. */
|
|
264
|
+
:is(#sidebar-column, #mate-sidebar-column, #sidebar, #icon-strip) {
|
|
265
|
+
--navigation-face: color-mix(in srgb, var(--brand-paper) 7%, transparent);
|
|
266
|
+
--navigation-hover: color-mix(in srgb, var(--text) 5%, var(--navigation-face));
|
|
267
|
+
--navigation-inset: color-mix(in srgb, var(--text) 7%, transparent);
|
|
268
|
+
}
|
|
269
|
+
:is(#sidebar-column, #mate-sidebar-column) .palette-tile > .lucide,
|
|
270
|
+
body.mate-workspace-active #sidebar-column .palette-tile:not(:hover):not(.active) > .lucide,
|
|
271
|
+
body.clay-workspace-active #sidebar-column #you-button.palette-tile > .lucide {
|
|
272
|
+
background: transparent;
|
|
273
|
+
box-shadow: none;
|
|
274
|
+
}
|
|
275
|
+
:is(#sidebar-column, #mate-sidebar-column) .palette-tile:hover > .lucide,
|
|
276
|
+
body.mate-workspace-active #sidebar-column .palette-tile:hover > .lucide,
|
|
277
|
+
body.clay-workspace-active #sidebar-column #you-button.palette-tile:hover > .lucide {
|
|
278
|
+
background: var(--navigation-hover);
|
|
279
|
+
box-shadow: none;
|
|
280
|
+
}
|
|
281
|
+
:is(#sidebar-column, #mate-sidebar-column) .palette-tile.active > .lucide,
|
|
282
|
+
body.mate-workspace-active #sidebar-column .palette-tile.active > .lucide,
|
|
283
|
+
body.clay-workspace-active #sidebar-column #you-button.palette-tile.active > .lucide {
|
|
284
|
+
background: color-mix(in srgb, var(--accent) 8%, var(--navigation-face));
|
|
285
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 48%, var(--border));
|
|
286
|
+
}
|
|
287
|
+
:is(#sidebar-column, #mate-sidebar-column) .palette-tile:active > .lucide {
|
|
288
|
+
transform: translateY(1px);
|
|
289
|
+
}
|
|
290
|
+
:is(#sidebar-column, #mate-sidebar-column) .sidebar-badge {
|
|
291
|
+
background: var(--navigation-inset);
|
|
292
|
+
color: var(--text-muted);
|
|
293
|
+
box-shadow: inset 0 1px 1px rgba(var(--shadow-rgb), .08);
|
|
294
|
+
}
|
|
295
|
+
#sidebar-column #sticky-notes-sidebar-count:hover {
|
|
296
|
+
background: var(--accent);
|
|
297
|
+
color: #fff;
|
|
298
|
+
}
|
|
299
|
+
#icon-strip :is(.icon-strip-item, .icon-strip-home)::before,
|
|
300
|
+
#icon-strip .icon-strip-filter-face,
|
|
301
|
+
#icon-strip .icon-strip-hint {
|
|
302
|
+
background: var(--navigation-face);
|
|
303
|
+
box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .04);
|
|
304
|
+
}
|
|
305
|
+
#icon-strip :is(.icon-strip-item, .icon-strip-home):hover::before,
|
|
306
|
+
#icon-strip .icon-strip-filter-knob:hover .icon-strip-filter-face,
|
|
307
|
+
#icon-strip .icon-strip-hint:hover {
|
|
308
|
+
background: var(--navigation-hover);
|
|
309
|
+
box-shadow: 0 1px 3px rgba(var(--shadow-rgb), .07);
|
|
310
|
+
}
|
|
311
|
+
#icon-strip :is(.icon-strip-item, .icon-strip-home).active::before {
|
|
312
|
+
background: color-mix(in srgb, var(--accent) 7%, var(--navigation-face));
|
|
313
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--border)),
|
|
314
|
+
0 1px 3px rgba(var(--shadow-rgb), .07);
|
|
315
|
+
}
|
|
316
|
+
/* Unread colors remain semantic; only the bright surrounding rim is softened. */
|
|
317
|
+
#icon-strip :is(.icon-strip-project-badge, .icon-strip-user-badge) {
|
|
318
|
+
box-shadow: 0 0 0 2px var(--navigation-face);
|
|
319
|
+
}
|
|
320
|
+
#sidebar-column .git-placard {
|
|
321
|
+
background: var(--navigation-face);
|
|
322
|
+
}
|
|
323
|
+
#sidebar-column :is(.git-placard-more, .git-placard-badge) {
|
|
324
|
+
background: var(--navigation-inset);
|
|
325
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* Only the shared picker has a surface; its surroundings expose the wallpaper. */
|
|
2
|
+
body:not(.pane-mode) #main-column:has(#split-host.project-start-visible) {
|
|
3
|
+
background: transparent;
|
|
4
|
+
border: 0;
|
|
5
|
+
border-radius: 0;
|
|
6
|
+
box-shadow: none;
|
|
7
|
+
}
|
|
8
|
+
#main-column:has(#split-host.project-start-visible) > .title-bar-content {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
body:not(.pane-mode) #main-panels:has(> #split-host.project-start-visible) {
|
|
12
|
+
background: transparent;
|
|
13
|
+
}
|
|
14
|
+
#split-host.project-start-visible.visible {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
align-items: safe center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
padding: 16px;
|
|
20
|
+
background: transparent;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
}
|
|
23
|
+
#split-host.project-start-visible > :not(#project-empty-canvas) { display: none; }
|
|
24
|
+
#project-empty-canvas {
|
|
25
|
+
position: relative;
|
|
26
|
+
flex: 0 1 360px;
|
|
27
|
+
width: 360px;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
max-height: 100%;
|
|
31
|
+
margin: auto 0;
|
|
32
|
+
}
|
|
33
|
+
#project-empty-canvas[hidden] { display: none; }
|
|
34
|
+
@media (max-width: 768px) {
|
|
35
|
+
body:not(.pane-mode):has(#split-host.project-start-visible) #layout {
|
|
36
|
+
background: var(--workspace-solid) var(--workspace-art) center / cover no-repeat;
|
|
37
|
+
}
|
|
38
|
+
body:not(.pane-mode) #layout-body:has(#split-host.project-start-visible),
|
|
39
|
+
body:not(.pane-mode) #main-area:has(#split-host.project-start-visible) {
|
|
40
|
+
background: transparent;
|
|
41
|
+
border: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
.split-view-child { min-width: 0; min-height: 0; overflow: hidden; }
|
|
97
97
|
.split-view-leaf { display: flex; }
|
|
98
98
|
.split-view-canvas .split-pane {
|
|
99
|
-
border: 1px solid var(--border);
|
|
100
|
-
border-radius:
|
|
99
|
+
border: 1px solid var(--border-subtle);
|
|
100
|
+
border-radius: 12px;
|
|
101
101
|
overflow: hidden;
|
|
102
102
|
container-type: inline-size;
|
|
103
103
|
}
|
|
@@ -558,7 +558,7 @@ body.is-dragging .split-pane-header, body.is-dragging .split-pane-drag-space { c
|
|
|
558
558
|
.agent-message-bubble-text blockquote { margin: 4px 0; padding-left: 8px; border-left: 2px solid var(--border); }
|
|
559
559
|
|
|
560
560
|
/* A split reserves its destination before a session is selected. */
|
|
561
|
-
.split-session-empty-pane { position: absolute; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius:
|
|
561
|
+
.split-session-empty-pane { position: absolute; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; background: var(--bg); }
|
|
562
562
|
.split-session-empty-body { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: safe center; justify-content: center; padding: 16px; overflow: auto; }
|
|
563
563
|
.split-session-empty-body > .split-session-picker { position: relative; flex: 0 1 360px; width: 360px; min-width: 0; max-width: 100%; max-height: 100%; margin: auto 0; display: flex; flex-direction: column; }
|
|
564
564
|
.split-session-empty-body .split-session-results { flex: 1 1 auto; min-height: 36px; max-height: 220px; }
|
|
@@ -231,7 +231,7 @@ body.projects-shell .top-bar-actions :is(#shared-browser-toggle-btn, #terminal-t
|
|
|
231
231
|
align-items: center;
|
|
232
232
|
padding: 0 10px;
|
|
233
233
|
background: var(--sidebar-bg);
|
|
234
|
-
border-bottom: 1px solid
|
|
234
|
+
border-bottom: 1px solid transparent;
|
|
235
235
|
gap: 6px;
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
@media (min-width: 1024px) {
|
|
27
27
|
#main-panels > :is(#terminal-container, #shared-browser-panel, #file-viewer, .file-instance, .workbench-pane-shell).tool-pane-window[data-workbench-placement="docked"]:not(.panel-fullscreen) {
|
|
28
28
|
position: absolute; inset: auto; flex: none; min-width: 0; max-width: none; margin: 0; align-self: auto;
|
|
29
|
-
z-index: 4; container-type: inline-size; box-sizing: border-box; border: 1px solid var(--border); border-radius:
|
|
29
|
+
z-index: 4; container-type: inline-size; box-sizing: border-box; border: 1px solid var(--border-subtle); border-radius: 12px;
|
|
30
30
|
background: var(--bg); box-shadow: none; animation: none;
|
|
31
31
|
transition: left 280ms cubic-bezier(.2,.75,.25,1), top 280ms cubic-bezier(.2,.75,.25,1), width 280ms cubic-bezier(.2,.75,.25,1), height 280ms cubic-bezier(.2,.75,.25,1);
|
|
32
32
|
}
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
min-width: 0;
|
|
59
59
|
margin: 0;
|
|
60
60
|
box-sizing: border-box;
|
|
61
|
-
border: 1px solid var(--border);
|
|
62
|
-
border-radius:
|
|
61
|
+
border: 1px solid var(--border-subtle);
|
|
62
|
+
border-radius: 12px;
|
|
63
63
|
container-type: inline-size;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/* Independent Files panes use the same shell; only the content owns scrolling. */
|
|
68
|
-
.file-instance { position: absolute; right: 8px; top: 8px; bottom: 8px; width: min(50%, 720px); min-width: 300px; display: flex; flex-direction: column; overflow: hidden; z-index: 20; background: var(--bg); border: 1px solid var(--border); border-radius:
|
|
68
|
+
.file-instance { position: absolute; right: 8px; top: 8px; bottom: 8px; width: min(50%, 720px); min-width: 300px; display: flex; flex-direction: column; overflow: hidden; z-index: 20; background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: 0 8px 28px #0002; }
|
|
69
69
|
.file-instance.hidden { display: none; }
|
|
70
70
|
.file-instance .tool-pane-header { height: 33px; min-height: 33px; flex-wrap: nowrap; }
|
|
71
71
|
.file-instance .tool-pane-title { max-width: none; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
#main-panels > .workbench-pane-shell[data-workbench-placement="overlay"]:not(.panel-fullscreen) {
|
|
104
104
|
position: absolute; top: 8px; bottom: 8px; right: 8px; left: auto;
|
|
105
105
|
width: min(50%, 720px); min-width: 300px; max-width: none; margin: 0;
|
|
106
|
-
max-height: none; border: 1px solid var(--border); border-radius:
|
|
106
|
+
max-height: none; border: 1px solid var(--border-subtle); border-radius: 12px;
|
|
107
107
|
box-shadow: 0 8px 28px #0002; z-index: 20;
|
|
108
108
|
}
|
|
109
109
|
#main-panels > .workbench-pane-shell.tool-pane-window:not(.panel-fullscreen) [aria-label^="Widen"] { display: none; }
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
.us-palette-arrow svg, .us-palette-add svg { width: 18px; height: 18px; }
|
|
18
18
|
.us-palette-add:hover, .us-palette-arrow:hover:not(:disabled) { color: var(--text); background: var(--accent-8); }
|
|
19
19
|
.us-palette-add:focus-visible, .us-palette-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
20
|
-
.us-background-pictures { display: flex; }
|
|
21
|
-
.us-background-
|
|
22
|
-
.light-theme .us-background-
|
|
20
|
+
.us-background-pictures { display: flex; gap: 16px; flex-wrap: wrap; }
|
|
21
|
+
.us-background-picture, .light-theme .us-background-picture { width: 112px; height: 64px; border-radius: 8px; background: var(--workspace-art-dark) var(--workspace-art-position) / var(--workspace-art-size) var(--workspace-art-repeat); }
|
|
22
|
+
.light-theme .us-background-picture { background-image: var(--workspace-art-light); }
|
|
23
23
|
.us-color-popover { position: fixed; z-index: 610; width: 260px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
|
|
24
24
|
.us-color-popover[hidden], .us-color-popover [hidden] { display: none; }
|
|
25
25
|
.us-color-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
|
package/lib/public/index.html
CHANGED
|
@@ -37,6 +37,7 @@ body { background: transparent; color: inherit; }
|
|
|
37
37
|
<script>if(window.navigator.standalone||window.matchMedia("(display-mode:standalone)").matches){document.documentElement.classList.add("pwa-standalone")}</script>
|
|
38
38
|
<link rel="stylesheet" href="style.css?v=20260913-scheduled-tasks4">
|
|
39
39
|
<link rel="stylesheet" href="css/default-ai.css">
|
|
40
|
+
<link rel="stylesheet" href="css/project-empty-canvas.css">
|
|
40
41
|
<style>
|
|
41
42
|
@media(max-width:768px){
|
|
42
43
|
/* User messages: vertical stack, avatar on top, right-aligned */
|
|
@@ -345,7 +345,7 @@ export function connect() {
|
|
|
345
345
|
var protocol = location.protocol === "https:" ? "wss:" : "ws:";
|
|
346
346
|
var socketPath = store.get('wsPath');
|
|
347
347
|
if (store.get('socketPath') && store.get('socketPath') !== socketPath) clearProjectSplitState();
|
|
348
|
-
store.set({ socketPath: socketPath, activeProjectSlug: null, sessionActivatedProjectSlug: null, sessionListProjectSlug: null, splitGroupsProjectSlug: null,
|
|
348
|
+
store.set({ projectEntryEmpty: false, socketPath: socketPath, activeProjectSlug: null, sessionActivatedProjectSlug: null, sessionListProjectSlug: null, splitGroupsProjectSlug: null,
|
|
349
349
|
projectSplitViewSocketGeneration: (store.get('projectSplitViewSocketGeneration') || 0) + 1 });
|
|
350
350
|
if (store.get("paneMode") && typeof performance !== "undefined" && performance.mark) { performance.clearMarks("clay:socket-created"); performance.mark("clay:socket-created"); }
|
|
351
351
|
var newWs = new WebSocket(protocol + "//" + location.host + socketPath);
|
|
@@ -45,6 +45,7 @@ import { updatePageTitle } from './sidebar.js';
|
|
|
45
45
|
import { handleSessionFoldersState } from './session-folders.js';
|
|
46
46
|
import { handleFolderDeletePreview, handleFolderDeleteState } from './session-folder-delete.js';
|
|
47
47
|
import { handleSessionCreateMessage, handleNewSessionResult } from './session-create.js';
|
|
48
|
+
import { handleProjectEntry, handleEmptyCanvasNewSessionResult } from './project-empty-canvas.js';
|
|
48
49
|
import { renderSessionList, updateSessionPresence, handleSearchResults, updateSessionBadge } from './sidebar-sessions.js';
|
|
49
50
|
import { updateDmBadge, setMentionActive, renderUserStrip } from './sidebar-mates.js';
|
|
50
51
|
import { renderSidebarPresence } from './sidebar-presence.js';
|
|
@@ -160,6 +161,7 @@ export function processMessage(msg) {
|
|
|
160
161
|
if (handleKnowledgeWorkbenchMessage(msg)) return;
|
|
161
162
|
if (handleSessionCreateMessage(msg)) return;
|
|
162
163
|
if (handleSplitSessionCreated(msg)) return;
|
|
164
|
+
if (msg && msg.type === "new_session_result" && handleEmptyCanvasNewSessionResult(msg)) return;
|
|
163
165
|
if (msg && msg.type === "new_session_result" && handleNewSessionResult(msg)) return;
|
|
164
166
|
if (handleDefaultVendorMessage(msg)) return;
|
|
165
167
|
if (handleContextViewMessage(msg)) return;
|
|
@@ -794,6 +796,10 @@ export function processMessage(msg) {
|
|
|
794
796
|
handleFolderDeleteState(msg);
|
|
795
797
|
break;
|
|
796
798
|
|
|
799
|
+
case "project_entry":
|
|
800
|
+
if (handleProjectEntry(msg)) finishProjectSessionActivation();
|
|
801
|
+
break;
|
|
802
|
+
|
|
797
803
|
case "session_list":
|
|
798
804
|
markProjectSessionListHydrated();
|
|
799
805
|
renderMateSessionList(msg.sessions || []);
|
|
@@ -810,7 +816,7 @@ export function processMessage(msg) {
|
|
|
810
816
|
// retarget and restore the iframe's stale initial session.
|
|
811
817
|
primePaneSession();
|
|
812
818
|
}
|
|
813
|
-
handlePaletteSessionSwitch();
|
|
819
|
+
handlePaletteSessionSwitch(store.get('projectEntryEmpty') === true);
|
|
814
820
|
maybeRestoreSplitGroup();
|
|
815
821
|
break;
|
|
816
822
|
case "project_split_views":
|
|
@@ -948,6 +954,7 @@ export function processMessage(msg) {
|
|
|
948
954
|
break;
|
|
949
955
|
|
|
950
956
|
case "session_switched":
|
|
957
|
+
store.set({ projectEntryEmpty: false, projectStartPicker: null });
|
|
951
958
|
saveSessionRichDraft();
|
|
952
959
|
store.set({ sessionActionEpoch: (store.get('sessionActionEpoch') || 0) + 1 });
|
|
953
960
|
clearPairResultStatus();
|
|
@@ -23,7 +23,8 @@ export function initWorkspaceBackground() {
|
|
|
23
23
|
document.documentElement.dataset.workspaceColor = color.id;
|
|
24
24
|
document.documentElement.style.setProperty('--workspace-solid-light', color.light);
|
|
25
25
|
document.documentElement.style.setProperty('--workspace-solid-dark', color.dark);
|
|
26
|
-
document.documentElement.
|
|
26
|
+
workspaceBackgrounds.applyPicture(document.documentElement.style, pref.background);
|
|
27
|
+
document.documentElement.dataset.workspaceBackground = workspaceBackgrounds.normalizeBackground(pref.background);
|
|
27
28
|
}
|
|
28
29
|
store.subscribe(function (state, previous) {
|
|
29
30
|
if (previous.myUserId && state.myUserId !== previous.myUserId) {
|
|
@@ -35,7 +36,7 @@ export function initWorkspaceBackground() {
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export function selectAppearanceBackground(background, backgroundColor) {
|
|
38
|
-
if (
|
|
39
|
+
if (!workspaceBackgrounds.isBackground(background) || (store.get('appearanceColorEditor') || {}).saving) return;
|
|
39
40
|
var current = store.get('appearanceDraft') || store.get('appearancePreference') || {};
|
|
40
41
|
if (backgroundColor !== undefined && !workspaceBackgrounds.isColor(backgroundColor, current.customBackgroundColors)) return;
|
|
41
42
|
store.set({ appearanceColorPreview: null });
|
|
@@ -173,7 +173,7 @@ export function handlePaletteSessionSwitch(authoritative) {
|
|
|
173
173
|
}
|
|
174
174
|
// session_list precedes the connection's authoritative session_switched.
|
|
175
175
|
// Wait for that identity instead of requesting a duplicate initial replay.
|
|
176
|
-
if (authoritative === true && pendingNav && store.get('activeSessionId')) {
|
|
176
|
+
if (authoritative === true && pendingNav && (store.get('activeSessionId') || store.get('projectEntryEmpty'))) {
|
|
177
177
|
var nav = pendingNav;
|
|
178
178
|
pendingNav = null;
|
|
179
179
|
if (ctx.currentSlug && ctx.currentSlug() === nav.slug) {
|
|
@@ -32,7 +32,7 @@ function validSnapshot(value) {
|
|
|
32
32
|
if (value.userId !== null && (typeof value.userId !== 'string' || !value.userId || value.userId.length > 200)) return false;
|
|
33
33
|
if (typeof pref.configured !== 'boolean') return false;
|
|
34
34
|
if (pref.mode !== null && pref.mode !== 'light' && pref.mode !== 'dark') return false;
|
|
35
|
-
if (pref.background !== undefined &&
|
|
35
|
+
if (pref.background !== undefined && !workspaceBackgrounds.isBackground(pref.background)) return false;
|
|
36
36
|
var custom = workspaceBackgrounds.normalizeCustom(pref.customBackgroundColors || []);
|
|
37
37
|
if (!custom || pref.backgroundColor !== undefined && !workspaceBackgrounds.isColor(pref.backgroundColor, custom)) return false;
|
|
38
38
|
return isIdOrNull(pref.theme) && isIdOrNull(pref.lightTheme) && isIdOrNull(pref.darkTheme);
|