Skip to content

feat: Tell a computer below the requirements so at launch, before setup. - #18

Merged
vlidholt merged 1 commit into
mainfrom
feat/system-requirements-check
Dec 3, 2026
Merged

vlidholt merged 1 commit into
mainfrom
feat/system-requirements-check

Conversation

@vlidholt

@vlidholt vlidholt commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Summary

App Studio runs a server, a database and a Flutter app side by side. On a computer with too little memory or too slow a processor, a project is very slow to start or does not start at all. Such a computer is now told so first thing at launch, before first-run setup downloads a few GB of tools onto it.

What changes

  • The requirements are 16 GB of memory and 8 logical cores. Anything short of either raises one dialog, "App Studio is unlikely to run on this computer", listing only what falls short, with Try Anyway and Quit (Quit on the right, as the default).
  • Before setup. main() creates SystemRequirementsController before runApp, and home shows SystemRequirementsScreen ahead of the setup screen and the shell. While it is up it owns the window: File → Open, Open Recent and Settings are off, and no other launch question (Linux's add-to-applications, the update check) lands on top.
  • Try Anyway is remembered with the readings it was made for, so the same computer is not asked twice and one that reads differently later is asked again. It is a preference, so an uninstall forgets it.
  • Reading the hardware. Windows is asked directly (GetPhysicallyInstalledSystemMemory, then GlobalMemoryStatusEx), macOS through /usr/sbin/sysctl -n hw.memsize, Linux from /proc/meminfo. A reading that fails or takes over two seconds is not held against the computer, so the check can never stop the app from starting.

Decisions worth a look

  • The memory bar is 13 GiB, not 16. A 16 GB computer never reports all of it where the figure is what the OS can use (Linux always), and integrated graphics can hold back 2 GB. 12 GB, the next size down, still falls short.
  • The core count is a proxy for speed, chosen over a benchmark. It is instant and the same on every start; a timed run varies with battery saver and whatever else starts at login. It passes every Apple Silicon Mac and four cores with two threads each, and fails dual-core laptops and four-thread budget chips. It says nothing about how fast a core is.
  • One level only. There is no softer "may be slow" tier.
  • No analytics event is sent for an under-spec computer.
  • The Windows test VM is 8 GB and 4 vCPUs, so every pass from a pristine snapshot now starts with this dialog; specs/windows_vm_testing.md says so.

Verification

  • flutter analyze is clean and flutter test -x process -j 1 passes on the Windows dev laptop (1114 passed, 20 skipped), including 32 new tests: the readings per OS with fakes, the thresholds and the remembered choice, and the dialog and screen.
  • The real Windows reading on the dev laptop: 32 GB and 12 logical cores.
  • The real app run once with an 8 GB / 4-core machine faked in main(): the dialog at launch, Try Anyway to the start page, and the choice saved. The fake was removed again.
  • The dialog looked at in Widgetbook (First run → Below requirements).

Not verified

  • The macOS and Linux readings on real machines; they are tested with fakes only.
  • Quit pressed in the real app (it is exit(0), as in the setup dialogs).
  • A second launch skipping the dialog, beyond the unit test and the saved preference.
  • The process-tagged tests, which CI runs on macOS.

🤖 Generated with Claude Code

App Studio runs a server, a database and a Flutter app side by side, and on
a computer with too little memory or too slow a processor a project is very
slow to start or does not start at all. Such a computer now hears that first
thing at launch — before first-run setup downloads a few GB of tools onto it.

- The requirements are 16 GB of memory and 8 logical cores. Anything short
  of either raises "App Studio is unlikely to run on this computer", listing
  only what falls short, with Try Anyway and Quit.
- The memory bar is 13 GiB rather than 16: a 16 GB computer never reports
  all of it where the figure is what the OS can use, and integrated graphics
  can hold back 2 GB. 12 GB, the next size down, still falls short.
- The core count is a proxy for speed, chosen over a benchmark because it is
  instant and the same on every start.
- Windows is asked for its memory directly (GetPhysicallyInstalledSystemMemory,
  then GlobalMemoryStatusEx), macOS through sysctl, Linux from /proc/meminfo.
  A reading that fails or takes over two seconds is not held against the
  computer, so the check can never stop the app from starting.
- Try Anyway is remembered with the readings it was made for: the same
  computer is not asked twice, one that reads differently later is.
- While the question is up it owns the window, like setup: File > Open,
  Open Recent and Settings are off, and no other launch question lands on it.

Verified on the Windows dev laptop: the real memory and core readings, and
the real app run once with an 8 GB / 4-core machine faked — the question at
launch, Try Anyway to the start page, and the choice saved. The macOS and
Linux readings are tested with fakes only, Quit was not pressed in the real
app, and the process-tagged tests were not run locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vlidholt
vlidholt merged commit 409e3ff into main Dec 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant