Skip to content
Open
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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
api/package-lock.json
worker/package-lock.json

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- run: ./scripts/lint.sh

build:
Expand Down Expand Up @@ -62,6 +67,11 @@ jobs:
api/package-lock.json
worker/package-lock.json

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- run: ./scripts/test.sh

release-scripts:
Expand Down
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

## Tooling
- **Node.js**: 20+ (managed by `npm`)
- **Flutter**: Stable channel
- **Docker**: Required for simulation engine
- **Package Manager**: `npm` (Node)

Expand All @@ -29,6 +30,8 @@
- **Worker Install**: `cd worker && npm install`
- **Worker Dev**: `cd worker && npm run dev`
- **Worker Test**: `cd worker && npm run test:unit`
- **Worker Flutter Lint**: `cd worker_flutter && flutter analyze --no-fatal-infos`
- **Worker Flutter Test**: `cd worker_flutter && flutter test`

## Deployment
- **CI**: `.github/workflows/ci.yml` (Runs on PR)
Expand All @@ -38,3 +41,4 @@
- `frontend/`: React app
- `api/`: Next.js API, ingestion, and analysis
- `worker/`: Node.js + Docker simulation runner
- `worker_flutter/`: Cross-platform desktop worker
8 changes: 6 additions & 2 deletions frontend/src/pages/JobStatus.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { screen, waitFor, fireEvent } from '@testing-library/react';
import { screen, waitFor, fireEvent, act } from '@testing-library/react';
import { renderWithRouter } from '../test/render';
import JobStatusPage from './JobStatus';
import { useJobStream } from '../hooks/useJobStream';
Expand Down Expand Up @@ -408,7 +408,11 @@ describe('JobStatus — Run Again', () => {
});
expect(screen.getByText('Submitting...').closest('button')).toBeDisabled();

resolveResponse({ ok: true, json: () => Promise.resolve({ id: 'job-new' }) } as unknown as Response);
await act(async () => {
resolveResponse({ ok: true, json: () => Promise.resolve({ id: 'job-new' }) } as unknown as Response);
// Let the microtask queue flush so React processes the state update
await new Promise(resolve => setTimeout(resolve, 0));
});
});

it('shows error when resubmit fails', async () => {
Expand Down
4 changes: 4 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ cd frontend && npm ci && npm run lint && cd ..
# API
echo "=== API lint ==="
cd api && npm ci && npm run lint && cd ..

# Worker Flutter
echo "=== Worker Flutter lint ==="
cd worker_flutter && flutter pub get && flutter analyze --no-fatal-infos && cd ..
4 changes: 4 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ npm run test:ingestion && cd ..
# Worker tests
echo "=== Worker unit tests ==="
cd worker && npm ci && npm run test:unit && cd ..

# Worker Flutter tests
echo "=== Worker Flutter tests ==="
cd worker_flutter && flutter pub get && flutter test && cd ..
1 change: 1 addition & 0 deletions worker_flutter/lib/sims/deck_picker_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class DeckPickerSection extends StatefulWidget {
}

class _DeckPickerSectionState extends State<DeckPickerSection> {
// Use ExpansionTileController for compatibility as ExpansibleController may not be available on this Flutter version
late final ExpansionTileController _ctrl;

@override
Expand Down
100 changes: 50 additions & 50 deletions worker_flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "8d7ff3948166b8ec5da0fbb5962000926b8e02f2ed9b3e51d1738905fbd4c98d"
sha256: a49d6cf99e8d8e7a8e93668d09ced0bbdb954d0b4fccc2f5f9241c6b87fad95c
url: "https://pub.dev"
source: hosted
version: "93.0.0"
version: "99.0.0"
_flutterfire_internals:
dependency: transitive
description:
Expand All @@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: analyzer
sha256: de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b
sha256: "663efa951fb8a45e06f491223a604c93820598f20e6a99c25617a1576065e8b7"
url: "https://pub.dev"
source: hosted
version: "10.0.1"
version: "12.1.0"
ansicolor:
dependency: transitive
description:
Expand Down Expand Up @@ -221,10 +221,10 @@ packages:
dependency: transitive
description:
name: code_assets
sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687"
sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.2.1"
code_builder:
dependency: transitive
description:
Expand Down Expand Up @@ -277,26 +277,26 @@ packages:
dependency: transitive
description:
name: dart_style
sha256: "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2"
sha256: a4c1ccfee44c7e75ed80484071a5c142a385345e658fd8bd7c4b5c97e7198f98
url: "https://pub.dev"
source: hosted
version: "3.1.7"
version: "3.1.8"
drift:
dependency: "direct main"
description:
name: drift
sha256: "8033500116b24398fba0cca0369cc31678cd627c01e41753a61186911cea743e"
sha256: "6cc0b623c0e83f7080524d8396e9301b1d78b9c66a4fdceeb0f798211303254c"
url: "https://pub.dev"
source: hosted
version: "2.33.0"
version: "2.34.0"
drift_dev:
dependency: "direct dev"
description:
name: drift_dev
sha256: b3dd5b75e30522a91da8abda9f5bb17230cb038097f6d15fa75d42bb563428aa
sha256: "9cfff1576b49725da0d32c040651a41ae195e8c4af8d8da301593e41d7abc2f7"
url: "https://pub.dev"
source: hosted
version: "2.33.0"
version: "2.34.0"
equatable:
dependency: transitive
description:
Expand Down Expand Up @@ -556,10 +556,10 @@ packages:
dependency: transitive
description:
name: hooks
sha256: "025f060e86d2d4c3c47b56e33caf7f93bf9283340f26d23424ebcfccf34f621e"
sha256: "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
version: "2.0.2"
http:
dependency: "direct main"
description:
Expand Down Expand Up @@ -628,10 +628,10 @@ packages:
dependency: transitive
description:
name: json_annotation
sha256: cb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8
sha256: "2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80"
url: "https://pub.dev"
source: hosted
version: "4.11.0"
version: "4.12.0"
launch_at_startup:
dependency: "direct main"
description:
Expand Down Expand Up @@ -716,10 +716,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.18.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -756,18 +756,18 @@ packages:
dependency: transitive
description:
name: native_toolchain_c
sha256: "6ba77bb18063eebe9de401f5e6437e95e1438af0a87a3a39084fbd37c90df572"
sha256: f59351d28f49520cd3a74eb1f41c5f19ae15e53c65a3231d14af672e46510a96
url: "https://pub.dev"
source: hosted
version: "0.17.6"
version: "0.19.1"
objective_c:
dependency: transitive
description:
name: objective_c
sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52"
sha256: "6cb691c686fa2838c6deb34980d426145c2a5d537491cb83d463c33cdbc726ed"
url: "https://pub.dev"
source: hosted
version: "9.3.0"
version: "9.4.1"
package_config:
dependency: transitive
description:
Expand Down Expand Up @@ -804,10 +804,10 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825
url: "https://pub.dev"
source: hosted
version: "2.1.5"
version: "2.1.6"
path_provider_android:
dependency: transitive
description:
Expand Down Expand Up @@ -836,10 +836,10 @@ packages:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
sha256: "484838772624c3a4b94f1e44a3e19897fee738f2d5c4ce448443b0417f7c9dda"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
path_provider_windows:
dependency: transitive
description:
Expand Down Expand Up @@ -956,42 +956,42 @@ packages:
dependency: transitive
description:
name: screen_retriever
sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c"
sha256: "42cc3b402a0f67d2455a0d067553d0f13453f6a008d98eababf8b63958d506bd"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
screen_retriever_linux:
dependency: transitive
description:
name: screen_retriever_linux
sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18
sha256: "2a476f1a5538065bc5badf376cfdc83d6ecf07d77eb2391b9c2bff5a76970048"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
screen_retriever_macos:
dependency: transitive
description:
name: screen_retriever_macos
sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149"
sha256: b5abb900fcb86614ff10b738b34e37b9e1d03b0447280668e2bc8a98bdc7bd59
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
screen_retriever_platform_interface:
dependency: transitive
description:
name: screen_retriever_platform_interface
sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0
sha256: "3af22d926bedf20c2caa308eea376776451a3af125919ce072e56525fded8901"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
screen_retriever_windows:
dependency: transitive
description:
name: screen_retriever_windows
sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13"
sha256: c44b38a4c4bab34af259180a70a4eee1e29384e7b82e627c9faa68afcdab2e73
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
sentry:
dependency: transitive
description:
Expand Down Expand Up @@ -1028,10 +1028,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: e8d4762b1e2e8578fc4d0fd548cebf24afd24f49719c08974df92834565e2c53
sha256: "93ae5884a9df5d3bb696825bceb3a17590754548b5d740eba51500afc8d088f5"
url: "https://pub.dev"
source: hosted
version: "2.4.23"
version: "2.4.26"
shared_preferences_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1121,10 +1121,10 @@ packages:
dependency: transitive
description:
name: sqlite3
sha256: "56da3e13ed7d28a66f930aa2b2b29db6736a233f08283326e96321dd812030f5"
sha256: "37356bcb56ce0d9404d602c41e4bdb7765e7e9732a3e47adb3d98c556a6abdad"
url: "https://pub.dev"
source: hosted
version: "3.3.1"
version: "3.3.3"
sqlite3_flutter_libs:
dependency: "direct main"
description:
Expand All @@ -1137,10 +1137,10 @@ packages:
dependency: transitive
description:
name: sqlparser
sha256: ecdc06d4a7d79dcbc928d99afd2f7f5b0f98a637c46f89be83d911617f759978
sha256: "40bdddb306a727be9ce510bd2d2b9a6c9db6c586d846ef7b22e3990a2b24f02d"
url: "https://pub.dev"
source: hosted
version: "0.44.4"
version: "0.44.5"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -1193,18 +1193,18 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev"
source: hosted
version: "0.7.10"
version: "0.7.11"
tray_manager:
dependency: "direct main"
description:
name: tray_manager
sha256: c5fd83b0ae4d80be6eaedfad87aaefab8787b333b8ebd064b0e442a81006035b
sha256: "1a659b08baa6e9b91ef8ce16eda37740de398be1c4cf322b8a1ddfef25c68c5a"
url: "https://pub.dev"
source: hosted
version: "0.5.2"
version: "0.5.3"
typed_data:
dependency: transitive
description:
Expand All @@ -1225,10 +1225,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
sha256: "3bb000251e55d4a209aa0e2e563309dc9bb2befea2295fd0cec1f51760aac572"
sha256: b413d49b73867ac08dd2f9890efd3cc11f2a0e577618d50843440a1fb3776c32
url: "https://pub.dev"
source: hosted
version: "6.3.29"
version: "6.3.32"
url_launcher_ios:
dependency: transitive
description:
Expand Down Expand Up @@ -1374,5 +1374,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.11.5 <4.0.0"
flutter: ">=3.38.4"
dart: ">=3.12.0 <4.0.0"
flutter: ">=3.44.0"
Loading