fix(app): selecting another item closes the previous item's pane page
On a wide split window a run's stage page (or an artifact, a file) opens inside the detail pane's own navigator. Selecting another run kept that page on top, so the pane still showed the old stage. ListDetailPanes now takes the selected item's identity (run, chat or pipeline id) and the pane navigator pops back to the item when it changes.
This commit is contained in:
@@ -256,6 +256,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
if (!beside) return list;
|
||||
return ListDetailPanes(
|
||||
list: list,
|
||||
detailIdentity: selected,
|
||||
detail: selected == null
|
||||
? const EmptyDetailPane(
|
||||
destination: AppDestination.chat,
|
||||
|
||||
@@ -255,6 +255,7 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
|
||||
list: ContentWidth(
|
||||
child: PipelineListPanel(controller: _controller),
|
||||
),
|
||||
detailIdentity: _controller.selectedId,
|
||||
detail: _controller.hasSelection
|
||||
? DetailPane(
|
||||
key: const ValueKey('pipeline-detail-pane'),
|
||||
|
||||
@@ -277,6 +277,7 @@ class _RunsScreenState extends State<RunsScreen> {
|
||||
if (narrow) return list;
|
||||
return ListDetailPanes(
|
||||
list: list,
|
||||
detailIdentity: controller.selectedRunId,
|
||||
detail: selected
|
||||
? DetailPane(
|
||||
key: const ValueKey('run-detail-pane'),
|
||||
|
||||
Reference in New Issue
Block a user