Files
pipelines/app/lib/application/tab_location_routes.dart
T
alan 767643d991 Open the run's artifact from notifications
Phone and browser notifications that carry an artifact open it full
screen in the artifact viewer, with an Open run action and the preview as
expanded text; pipelines://artifact deep links route to the viewer.
2026-11-12 18:56:26 +00:00

20 lines
799 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,
AppRouteKind.artifact => AppDestination.runs,
};
/// Remembers navigation without retaining modal actions such as run decisions.
AppRoute durableTabRoute(AppRoute route) =>
route.decide ? AppRoute.run(route.runId!) : route;