feat(editor): the simulation's properties in a sheet of their own, with a restart for everyone
Who started the simulation, "Pakete verwerfen" and the dropped packets move from the toolbar into a properties sheet beside the surface. New in it: restart the simulation, after asking. The room learns a restart message: stopped as by stop, every capture, dropped frame and program window emptied, started anew and named after who restarted; refused for readers and frozen projects, logged, and waiting for asked blobs like a start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ describe("a client's messages", () => {
|
||||
{ v: 1, kind: 'unsub', topics: ['activity'] },
|
||||
{ v: 1, kind: 'start' },
|
||||
{ v: 1, kind: 'stop' },
|
||||
{ v: 1, kind: 'restart' },
|
||||
{ v: 1, kind: 'speed', value: 50 },
|
||||
{ v: 1, kind: 'drop', on: true },
|
||||
{ v: 1, kind: 'clearCapture' },
|
||||
@@ -19,7 +20,7 @@ describe("a client's messages", () => {
|
||||
expect(messages.map((each) => each.kind)).toEqual([...CLIENT_MESSAGE_KINDS]);
|
||||
for (const each of messages) expect(parseClientMessage(each)).toEqual({ message: each });
|
||||
// A start in a language, and the language dropped where it is none.
|
||||
for (const language of ['de', 'en']) expect(parseClientMessage({ v: 1, kind: 'start', language })).toEqual({ message: { v: 1, kind: 'start', language } });
|
||||
for (const kind of ['start', 'restart']) for (const language of ['de', 'en']) expect(parseClientMessage({ v: 1, kind, language })).toEqual({ message: { v: 1, kind, language } });
|
||||
expect(parseClientMessage({ v: 1, kind: 'stop', language: 'en' })).toEqual({ message: { v: 1, kind: 'stop' } });
|
||||
expect(parseClientMessage({ v: 1, kind: 'clearCapture', port: 'p' })).toEqual({ message: { v: 1, kind: 'clearCapture' } });
|
||||
});
|
||||
@@ -34,6 +35,7 @@ describe("a client's messages", () => {
|
||||
expect(code({ v: 1, kind: 'sub', topics: ['activity', 'trace:'] })).toBe('badTopic');
|
||||
expect(code({ v: 1, kind: 'unsub', topics: ['app:node/paint'] })).toBe('badTopic');
|
||||
expect(code({ v: 1, kind: 'start', language: 'fr' })).toBe('badMessage');
|
||||
expect(code({ v: 1, kind: 'restart', language: 'fr' })).toBe('badMessage');
|
||||
expect(code({ v: 1, kind: 'drop', on: 'yes' })).toBe('badMessage');
|
||||
expect(code({ v: 1, kind: 'sub', topics: ['dropped', 'app:node/sat', 'app:node/nat'] })).toBe('ok');
|
||||
expect(code({ v: 1, kind: 'start', language: null })).toBe('badMessage');
|
||||
|
||||
Reference in New Issue
Block a user