feat(app): start a pipeline from the detail view

Native Run action opens the web's prompt/workspace/notify dialog, sends the exact run_pipeline body against the pinned resolved version with one request key per confirmed attempt, keeps refusals in the dialog, reconciles a lost reply by key, and opens only the server-named run through the existing run route with one fresh Runs list read.

Adds a shared failure-reason helper so operators never see Dart runtime prefixes, and records the slice boundary in notes/P3-run.md.
This commit is contained in:
2026-10-22 02:07:49 +01:00
parent 92706a290e
commit 53a8f668ca
24 changed files with 2644 additions and 19 deletions
+38
View File
@@ -0,0 +1,38 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/core/error_reason.dart';
import 'package:pipelines_app/core/transport/connection_state.dart';
void main() {
const fallback = 'The server did not do it.';
test('runtime diagnostics are reduced to the reason itself', () {
expect(
describeErrorReason(StateError('Connection closed'), fallback: fallback),
'Connection closed',
);
expect(
describeErrorReason(Exception('Connection closed'), fallback: fallback),
'Connection closed',
);
});
test('protocol and repository messages stay verbatim', () {
expect(
describeErrorReason(
const ProtocolError('workspace is not allowed'),
fallback: fallback,
),
'workspace is not allowed',
);
expect(
describeErrorReason(' spaced reason ', fallback: fallback),
'spaced reason',
);
});
test('a failure with no text uses the honest fallback', () {
expect(describeErrorReason('', fallback: fallback), fallback);
expect(describeErrorReason(StateError(''), fallback: fallback), fallback);
expect(describeErrorReason('Bad state: ', fallback: fallback), fallback);
});
}