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
61 changes: 59 additions & 2 deletions .github/workflows/deploy-satisfactory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ name: Deploy Satisfactory Planner

on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- ".github/workflows/deploy-satisfactory.yml"
- "angular.json"
- "package.json"
- "package-lock.json"
- "playwright.config.ts"
- "tsconfig.base.json"
- "vitest.config.mjs"
- "apps/web/**"
- "e2e/**"
- "packages/**"
- "scripts/extract-satisfactory-data/**"
- "data/generated/**"
- "data/resource-limits/**"
push:
branches:
- main
Expand All @@ -10,18 +27,20 @@ on:
- "angular.json"
- "package.json"
- "package-lock.json"
- "playwright.config.ts"
- "tsconfig.base.json"
- "vitest.config.mjs"
- "apps/web/**"
- "e2e/**"
- "packages/**"
- "scripts/extract-satisfactory-data/**"
- "data/generated/**"
- "data/resource-limits/**"

jobs:
build_and_deploy:
validate:
runs-on: ubuntu-latest
name: Build and deploy
name: Validate
permissions:
contents: read
steps:
Expand All @@ -40,9 +59,47 @@ jobs:
- name: Run tests
run: npm test

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Run browser smoke tests
run: npm run test:smoke

- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
if-no-files-found: ignore
retention-days: 7

- name: Build app
run: npm run build

- name: Upload app build
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: satisfactory-web-build
path: dist/apps/web/browser
if-no-files-found: error
retention-days: 1

deploy:
runs-on: ubuntu-latest
name: Deploy
needs: validate
if: github.event_name != 'pull_request'
permissions:
contents: read
steps:
- name: Download app build
uses: actions/download-artifact@v4
with:
name: satisfactory-web-build
path: dist/apps/web/browser

- name: Deploy to Azure Static Web Apps
uses: Azure/static-web-apps-deploy@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ Feature code should depend on the capability that owns the use case instead of r

Do not reintroduce broad convenience command forwards on `PlannerStoreService`. New tests should cover the capability interface used by the consumer; runtime-store tests should stay focused on composition, persistence/solver wiring, lifecycle hooks, and workspace initialization.

Future optional capabilities should consider plugin-shaped extension seams before they become built-in planner behavior. See [Plugin-Shaped Extension Seams](./rfc/plugin-extension-seams.md) for the current guidance. Runtime third-party plugins are not an accepted architecture decision.
Future session-scale features, such as linked plan contracts, should add focused
session/link capabilities instead of expanding `PlannerStoreService` back into a
feature facade. Future optional capabilities should consider plugin-shaped
extension seams before they become built-in planner behavior. See
[Plugin-Shaped Extension Seams](./rfc/plugin-extension-seams.md) for the current
guidance. Runtime third-party plugins are not an accepted architecture decision.

The generated data pipeline is build-time only. Raw `en-US.json` is read by `scripts/extract-satisfactory-data` and normalized into `apps/web/public/data/satisfactory-current.json`, which is what the Angular app serves.

Expand Down
13 changes: 11 additions & 2 deletions docs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,23 @@ Sessions currently group plans only. Session defaults, save metadata, linked
plans, logistics routes, map pins/locations, session-wide production balance,
and session import/export are future extensions.

The planned linked-plan model should store links on the session rather than on
individual plan exports. A destination plan should keep its normal external
input requirement by item and rate; session links can cover all or part of that
requirement by reserving output from another plan. This keeps standalone plan
JSON/share payloads portable while letting a session explain where an external
input is expected to come from. Link health, source shortages, destination
overcoverage, and session-wide balance remain derived state.

Individual plans can be exported as readable Beltwise JSON files with `kind:
beltwise.plan` and `formatVersion: 1`. A plan export contains one persisted
project payload plus dataset metadata for mismatch warnings, including product
targets, power targets, sink rules, recipe/machine/resource settings, external
inputs, objective settings, graph display/layout, notes, and build state. It
does not include global user defaults, whole-session state, save-game data,
share links, or solver output. Imported plans are added as separate local
projects in the active session and are solved again with the current app dataset.
share links, linked-plan contracts, or solver output. Imported plans are added
as separate local projects in the active session and are solved again with the
current app dataset.

Plan sharing uses a separate compact `bw.p` payload. It stores deltas against
Beltwise's schema-defined defaults for the current dataset, then compresses that
Expand Down
7 changes: 7 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Run focused web app tests:
npm.cmd run test:web
```

Run browser smoke tests:

```powershell
npm.cmd run test:smoke
```

Run workspace typechecks:

```powershell
Expand Down Expand Up @@ -75,6 +81,7 @@ docs architecture, ADRs, RFCs, and product notes
- Keep `planner-core` graph and project models renderer-neutral.
- Persist user configuration, not solver output.
- Add focused tests when changing parser, solver, resource-limit, graph-model, transfer, persistence, or planner capability behavior.
- Use `npm.cmd run test:smoke` for shallow browser coverage of the assembled Angular planner, graph shell, simple solving path, and local persistence.
- Test Angular planner behavior through the owning capability (`PlannerWorkspaceSlice`, `PlannerPlanConfigStore`, `PlannerDefaultsStore`, `PlannerGraphStore`, transfer, solving, or workbench) instead of rebuilding broad root-store coverage.
- Run `npm.cmd test`, `npm.cmd run typecheck`, and `npm.cmd run build` before handing off meaningful changes.
- If a sandboxed run of `npm.cmd test` fails while loading `vitest.config.mjs` with `Access is denied`, rerun the same command with the appropriate permissions before changing test configuration.
Expand Down
20 changes: 11 additions & 9 deletions docs/product-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1093,12 +1093,14 @@ Completed baseline:

Near-term follow-up:

1. Design a workspace dashboard/navigation entry point for sessions, plans, defaults, transfer, and future save-wide views.
2. Add browser smoke tests for graph rendering, planner editing, persistence reload, share/import flows, and infeasible/error states.
3. Improve responsive workbench behavior on narrow screens without trying to make the full graph experience equivalent to desktop.
4. Improve graph connection display controls and selected-flow readability behind renderer-neutral display settings.
5. Profile full-data solves and larger graph layout; move solver/layout work to Web Workers only if the UI visibly stalls.
6. Decide whether Dagre remains sufficient or whether ELK should replace it behind the existing renderer-neutral graph boundary.
7. Continue power planning from explicit generator/fuel targets toward solver-selected fuels, maximize-power objectives, and richer nuclear waste handling.
8. Draft the linked-plan contract model before adding logistics-backed links or session-wide production balance.
9. Keep save-file import, randomized node seeds, session-scale logistics/map planning, and assistant/tooling integrations in RFC/future-work space unless explicitly pulled forward.
1. Add browser smoke tests for graph rendering, planner editing, persistence reload, share/import flows, and infeasible/error states.
2. Add a selected-node action tray for existing safe actions such as done state, notes, path focus, relevant workbench controls, and current sink actions.
3. Implement session-scoped linked-plan contracts for partial output reservations and destination external-input coverage before adding logistics-backed links.
4. Add manual linked-plan editing, then node-driven plan extraction once manual partial links are stable.
5. Design a workspace dashboard/navigation entry point for sessions, plans, defaults, transfer, and future save-wide views once sessions have link status worth summarizing.
6. Improve responsive workbench behavior on narrow screens without trying to make the full graph experience equivalent to desktop.
7. Improve graph connection display controls and selected-flow readability behind renderer-neutral display settings.
8. Profile full-data solves and larger graph layout; move solver/layout work to Web Workers only if the UI visibly stalls.
9. Decide whether Dagre remains sufficient or whether ELK should replace it behind the existing renderer-neutral graph boundary.
10. Continue power planning from explicit generator/fuel targets toward solver-selected fuels, maximize-power objectives, and richer nuclear waste handling.
11. Keep save-file import, randomized node seeds, session-scale logistics/map planning, and assistant/tooling integrations in RFC/future-work space unless explicitly pulled forward.
Loading
Loading