Remove the Runs error counter for now
Keep the running indicator and Needs you flow, but remove the failed-count badge and its tab count plumbing until unseen-state behavior is addressed. Preserve the unfinished seen-state work separately. Verify application, Runs, attention and shell regressions.
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
import '../../../core/api_gateway.dart';
|
||||
|
||||
typedef RunTabCounts = ({int running, int failed});
|
||||
|
||||
/// Independent status counts from known, unfiltered server summaries.
|
||||
/// Dismissing a notification does not change a run's failed status.
|
||||
RunTabCounts runTabCounts(Iterable<JsonMap> runs) {
|
||||
/// Counts executing work without treating failed or completed runs as active.
|
||||
int runningRunCount(Iterable<JsonMap> runs) {
|
||||
var running = 0;
|
||||
var failed = 0;
|
||||
for (final run in runs) {
|
||||
if (run['status'] == 'failed') failed++;
|
||||
if (const {
|
||||
'succeeded',
|
||||
'failed',
|
||||
@@ -23,5 +18,5 @@ RunTabCounts runTabCounts(Iterable<JsonMap> runs) {
|
||||
running++;
|
||||
}
|
||||
}
|
||||
return (running: running, failed: failed);
|
||||
return running;
|
||||
}
|
||||
|
||||
@@ -103,19 +103,14 @@ class RunsList extends StatelessWidget {
|
||||
if (!ShellBar.available(context)) {
|
||||
return _ownBar(context, [const Spacer(), ...actions]);
|
||||
}
|
||||
final counts = runTabCounts(controller.runs);
|
||||
return ShellBar(
|
||||
active: active,
|
||||
actions: actions,
|
||||
// The Runs tab counts runs still executing.
|
||||
child: ShellBadge(
|
||||
kind: ShellBadgeKind.running,
|
||||
count: counts.running,
|
||||
child: ShellBadge(
|
||||
kind: ShellBadgeKind.failed,
|
||||
count: counts.failed,
|
||||
child: _shortcutList(context),
|
||||
),
|
||||
count: runningRunCount(controller.runs),
|
||||
child: _shortcutList(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user