95902e3e49
Keep Settings location, selection, history, and persistence separate from Pipelines so /settings restores and navigates independently. Update focused navigation coverage and defer notification loading to avoid a mid-build Runs-tab update.
19 lines
751 B
Dart
19 lines
751 B
Dart
import '../shell/destination.dart';
|
|
import 'app_route.dart';
|
|
|
|
/// The destination that owns [route]. Settings and its sub-pages (Templates,
|
|
/// Schedules) belong to Settings itself, never to Pipelines.
|
|
AppDestination tabForRoute(AppRoute route) => switch (route.kind) {
|
|
AppRouteKind.pipelines => AppDestination.pipelines,
|
|
AppRouteKind.settings ||
|
|
AppRouteKind.templates ||
|
|
AppRouteKind.schedules => AppDestination.settings,
|
|
AppRouteKind.runs => AppDestination.runs,
|
|
AppRouteKind.chat => AppDestination.chat,
|
|
AppRouteKind.search => AppDestination.search,
|
|
};
|
|
|
|
/// Remembers navigation without retaining modal actions such as run decisions.
|
|
AppRoute durableTabRoute(AppRoute route) =>
|
|
route.decide ? AppRoute.run(route.runId!) : route;
|