Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/workflows/dart-checks.yml

This file was deleted.

12 changes: 8 additions & 4 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Dart
uses: dart-lang/setup-dart@v1
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -36,7 +36,11 @@ jobs:
cache: npm

- name: Install Dart dependencies
run: dart pub get
run: flutter pub get

- name: Install pilot_runtime dependencies
working-directory: packages/pilot_runtime
run: flutter pub get

- name: Install Node dependencies
run: npm ci
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/flutter-dart-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Flutter/Dart Checks

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
dart:
name: Flutter/Dart checks
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install root dependencies
run: flutter pub get

- name: Install pilot_runtime dependencies
working-directory: packages/pilot_runtime
run: flutter pub get

- name: Install screen_recorder dependencies
working-directory: packages/screen_recorder
run: dart pub get

- name: Check formatting
run: dart format --output=none --set-exit-if-changed .

- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings bin lib test tool

- name: Analyze pilot_runtime
working-directory: packages/pilot_runtime
run: flutter analyze --fatal-infos --fatal-warnings

- name: Analyze screen_recorder
working-directory: packages/screen_recorder
run: dart analyze --fatal-infos --fatal-warnings

- name: Run unit tests
run: dart test

- name: Run pilot_runtime tests
working-directory: packages/pilot_runtime
run: flutter test

- name: Run screen_recorder tests
working-directory: packages/screen_recorder
run: dart test
62 changes: 45 additions & 17 deletions issues/0.1.1-pilot-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Publishing status: skipped by user request; local issue breakdown only.

## 1. Scaffold pilot_runtime with protocol handshake

Status: completed in `91f9d21 feat(runtime): scaffold pilot runtime handshake`.

## Parent

https://github.com/drown0315/flutter_pilot/issues/110
Expand All @@ -16,18 +18,27 @@ Create the first usable `pilot_runtime` package slice: a Flutter package with a

## Acceptance criteria

- [ ] `pilot_runtime` exists as an independent Flutter package with public app-side hook and client APIs.
- [ ] `PilotRuntimeBinding.ensureInitialized()` can register a debug runtime handshake and is a no-op outside debug mode.
- [ ] The client validates protocol version 1 and required capabilities through a handshake.
- [ ] Missing hook, missing capability, and protocol mismatch produce clear initialization failures.
- [ ] Unit tests cover successful handshake and each initialization failure path without requiring a live Flutter app.
- [x] `pilot_runtime` exists as an independent Flutter package with public app-side hook and client APIs.
- [x] `PilotRuntimeBinding.ensureInitialized()` can register a debug runtime handshake and is a no-op outside debug mode.
- [x] The client validates protocol version 1 and required capabilities through a handshake.
- [x] Missing hook, missing capability, and protocol mismatch produce clear initialization failures.
- [x] Unit tests cover successful handshake and each initialization failure path without requiring a live Flutter app.

Verification:

- `flutter analyze` from `packages/pilot_runtime`
- `flutter test` from `packages/pilot_runtime`
- `dart analyze`
- `dart test`

## Blocked by

None - can start immediately

## 2. Capture normalized Widget Tree through pilot_runtime

Status: completed in working tree.

## Parent

https://github.com/drown0315/flutter_pilot/issues/110
Expand All @@ -38,19 +49,28 @@ Implement the first diagnostic capability in `pilot_runtime`: capture a normaliz

## Acceptance criteria

- [ ] `captureWidgetTree()` sets Inspector pub root directories using the runtime target project root.
- [ ] The client requests the root widget tree as a summary tree with previews and without full details.
- [ ] The returned JSON includes `schema`, `source`, and a normalized root node.
- [ ] Nodes normalize description, widget type, Inspector value id as `inspectorValueId`, text preview, local project marker, and children.
- [ ] The normalizer does not parse keys from Inspector description strings.
- [ ] Tests cover valid normalization, optional missing fields, invalid required shape, and Inspector call failures.
- [x] `captureWidgetTree()` sets Inspector pub root directories using the runtime target project root.
- [x] The client requests the root widget tree as a summary tree with previews and without full details.
- [x] The returned JSON includes `schema`, `source`, and a normalized root node.
- [x] Nodes normalize description, widget type, Inspector value id as `inspectorValueId`, text preview, local project marker, and children.
- [x] The normalizer does not parse keys from Inspector description strings.
- [x] Tests cover valid normalization, optional missing fields, invalid required shape, and Inspector call failures.

Verification:

- `flutter analyze` from `packages/pilot_runtime`
- `flutter test` from `packages/pilot_runtime`
- `dart analyze`
- `dart test`

## Blocked by

- 1. Scaffold pilot_runtime with protocol handshake

## 3. Expose PilotRuntimeAdapter behind hidden runtime switch

Status: completed in `7261c6c feat(runtime): expose pilot runtime adapter`.

## Parent

https://github.com/drown0315/flutter_pilot/issues/110
Expand All @@ -61,12 +81,20 @@ Wire Flutter Pilot to the new runtime without replacing the default bridge. Add

## Acceptance criteria

- [ ] Flutter Pilot can select `PilotRuntimeAdapter` through a hidden environment switch.
- [ ] The default runtime path still uses `McpFlutterRuntimeAdapter`.
- [ ] Invalid hidden runtime switch values fail clearly without appearing in public CLI help.
- [ ] `PilotRuntimeAdapter.initialize()` maps missing hook and protocol failures to run-level initialization failures.
- [ ] `PilotRuntimeAdapter.captureWidgetTree()` returns Flutter Pilot `WidgetTreeCapture` data from `pilot_runtime`.
- [ ] Tests cover default adapter selection, hidden switch selection, invalid switch values, and initialization failure behavior.
- [x] Flutter Pilot can select `PilotRuntimeAdapter` through a hidden environment switch.
- [x] The default runtime path still uses `McpFlutterRuntimeAdapter`.
- [x] Invalid hidden runtime switch values fail clearly without appearing in public CLI help.
- [x] `PilotRuntimeAdapter.initialize()` maps missing hook and protocol failures to run-level initialization failures.
- [x] `PilotRuntimeAdapter.captureWidgetTree()` returns Flutter Pilot `WidgetTreeCapture` data from `pilot_runtime`.
- [x] Tests cover default adapter selection, hidden switch selection, invalid switch values, and initialization failure behavior.

Verification:

- `dart format .`
- `dart analyze`
- `dart test`
- `flutter analyze` from `packages/pilot_runtime`
- `flutter test` from `packages/pilot_runtime`

## Blocked by

Expand Down
4 changes: 4 additions & 0 deletions lib/flutter_pilot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export 'src/project_scenario_discovery.dart';
export 'src/project_run_report.dart';
export 'src/runtime/fake_runtime_adapter.dart';
export 'src/runtime/mcp_flutter_runtime_adapter.dart';
export 'src/runtime/pilot_runtime_adapter.dart';
export 'src/runtime/pilot_runtime_vm_service.dart';
export 'src/runtime/runtime_adapter_selector.dart';
export 'src/runtime/runtime_contract.dart';
export 'src/run_diff.dart';
export 'src/scenario.dart';
Expand All @@ -28,4 +31,5 @@ export 'src/step_progress_renderer.dart';
export 'src/target_app_launch_progress_renderer.dart';
export 'src/target_app_launcher.dart';
export 'src/target_device.dart';
export 'src/test_command_support.dart';
export 'src/terminal_style.dart';
Loading
Loading