Detached chat: read the chat again once its machine connects, and follow the main window's look
A detached chat window read the chat list once, before any saved machine had connected, and never again; its pane also did not rebuild when the runtime adopted a row. Without the row the header showed a bare "Chat" with no folder or model, the window was named by the session id, and the chat's colour (bar tint, focus ring, prompt bar) was missing. The window now re-reads the list on each connection change and rebuilds on the runtime, as the Chat destination does. It also re-reads the stored design and font on the browser's storage event and on coming to the front, so a Settings change in the main window follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -975,6 +975,8 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// `?speech=fake` reads replies aloud with a scripted engine, one word per
|
||||
/// `?speechStep=` ms (tool/probe_speech_fixture.dart);
|
||||
/// `?design=terminal` chooses that app design (Settings → Design);
|
||||
/// `?poolDelay=<ms>` (with `?federated=1`) connects each machine that
|
||||
/// much later, as a real server does (a detached chat window's first list);
|
||||
/// `?theme=dark` / `?theme=light` pins the platform brightness the app's
|
||||
/// `ThemeMode.system` follows (omitted: the browser's color scheme).
|
||||
///
|
||||
@@ -1077,6 +1079,12 @@ Future<void> main() async {
|
||||
? ChatServerPool(
|
||||
machines,
|
||||
connect: (machine) async {
|
||||
// `poolDelay=<ms>`: each machine connects that much later, as a
|
||||
// real server does, so the first chat list finds none connected.
|
||||
final delay = int.tryParse(params['poolDelay'] ?? '') ?? 0;
|
||||
if (delay > 0) {
|
||||
await Future<void>.delayed(Duration(milliseconds: delay));
|
||||
}
|
||||
final client = PipelinesClient(
|
||||
channelFactory: (_) => _FixtureChannel(
|
||||
hostname: machine.id == 'mac' ? 'tank' : 'linux-box',
|
||||
|
||||
Reference in New Issue
Block a user