Build chat panes through one content builder

Phase 2.2 of docs/plans/floating-windows.md: buildChatPaneContent wraps a
conversation in the scopes it needs and keys it by the runtime, so the
tiling and (next) a floating window build the same subtree. The tiling uses
it; behaviour is unchanged.
This commit is contained in:
2026-11-10 21:05:41 +00:00
parent 558eedb410
commit 9695100faa
7 changed files with 227 additions and 136 deletions
@@ -14,12 +14,7 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
ChatFloatFrames get _floatFrames;
void _bindFloat(ChatFloatStore store, Future<void> restored);
void _unbindFloat();
Widget _thread(
String selected,
VoidCallback onBack, {
ChatWorkspacePane? pane,
BuildContext? paneContext,
});
Widget _thread(ChatWorkspacePane pane);
ChatSidebarMode _sidebarMode = ChatSidebarMode.expanded;
void _setSidebarMode(ChatSidebarMode mode) {
@@ -390,16 +385,9 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
// active pane the others fade theirs.
child: ChatPaneActivity(
inactive: _workspace.paneCount > 1 && !active,
child: DetailPane(
child: KeyedSubtree(
key: ValueKey('chat-pane-detail-${pane.id}'),
destination: AppDestination.chat,
implyBack: false,
builder: (context) => _thread(
pane.sessionId,
_back,
pane: pane,
paneContext: context,
),
child: _thread(pane),
),
),
),