fix(app): guard foreground refresh during interaction

This commit is contained in:
2026-10-22 23:42:31 +01:00
parent 926443504f
commit 9a46a6b2b9
3 changed files with 78 additions and 1 deletions
+3
View File
@@ -90,6 +90,9 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
AppRoute get route => _route;
/// Whether a dialog, popup, or other route is covering the shell page.
bool get hasTransientRoute => _navigatorKey.currentState?.canPop() ?? false;
bool get searchOpen => _route.kind == AppRouteKind.search;
bool get templatesOpen => _route.kind == AppRouteKind.templates;
+6
View File
@@ -217,6 +217,7 @@ class _PipelinesAppState extends State<PipelinesApp>
// A return to the foreground refreshes only the visible list. Detail routes
// (including pipeline definitions and run visits) keep their current data.
if (_delegate.hasTransientRoute || _isEditingText) return;
final route = _delegate.route;
if (route.kind == AppRouteKind.pipelines &&
route.pipelineId == null &&
@@ -227,6 +228,11 @@ class _PipelinesAppState extends State<PipelinesApp>
}
}
bool get _isEditingText {
final focusContext = FocusManager.instance.primaryFocus?.context;
return focusContext?.findAncestorWidgetOfExactType<EditableText>() != null;
}
/// A replaced socket drops the attention status baseline so the gap cannot
/// replay a transition; the Runs list's next read reseeds the rows.
void _attentionSessionChanged() {