You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(client): send dev-panel WebSocket responses to the requesting client only
Dev-panel replies were sent via server.ws.send(), which Vite broadcasts to
every connected client. Route each response through the WebSocketClient passed
to the event handler so info-data, template:sync:*, action-required, and
config:update reach only the tab that initiated the request.
Add regression tests covering targeted info-data and template:sync responses.
'The server backup includes __template_variables.json. It differs from your local public/__template_variables.json (or that file is missing). Replace your project copy with the server backup?',
'The server backup includes __template_variables.json. It differs from your local public/__template_variables.json (or that file is missing). Replace your project copy with the server backup?',
content: `These files no longer match the hashes recorded in the VERSION manifest:\n\n${fileList}${suffix}\n\nCancel sync, or override and continue using the files on disk?`,
content: `These files no longer match the hashes recorded in the VERSION manifest:\n\n${fileList}${suffix}\n\nCancel sync, or override and continue using the files on disk?`,
353
+
confirmText: 'Override and continue',
354
+
cancelText: 'Cancel sync',
355
+
},
356
+
client,
357
+
);
353
358
354
359
if(!shouldContinueAfterVersionMismatch){
355
-
this.server.ws.send('template:sync:response',{
360
+
client.send('template:sync:response',{
356
361
cancelled: true,
357
362
message: 'Sync cancelled by user. Backup was saved.',
358
363
});
@@ -371,15 +376,18 @@ export class ClientService {
371
376
){
372
377
const{ expected, actual }=backupAnalysis.buildManifestMismatch;
content: `The recomputed backup fingerprint does not match BUILD-MANIFEST.json.\nManifest: ${expected.slice(0,12)}...\nComputed: ${actual.slice(0,12)}...\nContinue sync anyway?`,
content: `The recomputed backup fingerprint does not match BUILD-MANIFEST.json.\nManifest: ${expected.slice(0,12)}...\nComputed: ${actual.slice(0,12)}...\nContinue sync anyway?`,
383
+
confirmText: 'Continue sync',
384
+
cancelText: 'Cancel sync',
385
+
},
386
+
client,
387
+
);
380
388
381
389
if(!shouldContinueAfterMismatch){
382
-
this.server.ws.send('template:sync:response',{
390
+
client.send('template:sync:response',{
383
391
cancelled: true,
384
392
message: 'Sync cancelled by user. Backup was saved.',
385
393
});
@@ -416,23 +424,23 @@ export class ClientService {
0 commit comments