Skip to content

Split BuilderView into cards, delete ContentView.swift (#387 step 8) - #476

Merged
v0lumehi merged 10 commits into
v0lumehi/build-storefrom
v0lumehi/launcher-cards
Nov 2, 2026
Merged

v0lumehi merged 10 commits into
v0lumehi/build-storefrom
v0lumehi/launcher-cards

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #473 (stack #459), retarget to main after the ones below merge.

Part of #387, step 8.

Fix or feature

  • Fix
  • Feature

A step of #387. No behavior change.

What and why

BuilderView and ContentView.swift are gone. The Builds and Settings pages are one view per card now. Each card takes the stores it shows as parameters and observes only those. A value from another store comes as a value or a closure, never through another store.

  • NXLauncher: SetupHintCard, TargetCard, InstallCard, LogCard, ActionCard, OutcomeCard, ProgressCard, ControlsCard, ToolsCard, AppCard, plus the shared CardGroup, CardRow, CardDivider, CardDisclosure, LauncherPageScroll. Moved there too: BuildFailureCard, EngineSyncBanner, ShellCopyCard, the stale frameworks prompt, UpdateSheet, GameFilesDrop, RowScroller, DockProgress.
  • App target: FilesCard (it runs KeyCheck, which needs CommonCrypto), LibraryCard (observes GameLibrary), BuildPage and SettingsPage (list the cards), CardPages (the shared scrolling column, so the open log and the scroll position stay when going between the two pages). The other views read app types (LibraryGame, LauncherGamepad, ConsoleState, OnboardingState, CheatFiles, FrameTimes) and stay.
  • struct ContentView is renamed to LauncherView in its own commit, "Rename ContentView to LauncherView", so it reads apart (14 files, 21 lines).
  • New LayerImportsTests: NXCore and NXModel import no SwiftUI or AppKit. The audit found none.
  • Stale paths in comments fixed (tools/engine.py, frontend-qt, requirements.txt). ARCHITECTURE.md says what each target holds and where a new feature goes.

Done when (#387)

Point Evidence
BuildModel and ContentView.swift do not exist git grep BuildModel finds only prose in ARCHITECTURE.md and AGENTS.md. No ContentView.swift, no ContentView left.
NSPortBuilder only in the bundle id, the executable and the data folder Left are the three names, the --install-shell usage text (the executable name), the test fixtures for them, and the Qt QSettings key, which holds players' settings and stays. A patch comment in patches/0009 names an old path and is history.
NXCore and NXModel import no SwiftUI or AppKit grep -rn "import SwiftUI|import AppKit" frontend/Sources/NXCore frontend/Sources/NXModel finds nothing. LayerImportsTests checks it.
A log line invalidates only the log view LauncherPerformanceTests, step "1000 log lines in a build", budget 0 cards. Passes.
Every store has unit tests without SwiftUI NXModelTests: AppUpdateStore, RepoStore, EngineSyncStore, DependencyStore, DeviceStore, BuildStore. Localizer and BuildLog are tested in NX2AppleTests (LocalizerTests, BuildLogTests), which link SwiftUI. Not moved here.
No file above 800 lines except the listed ones Two are listed: NXCore/Localization.swift 4237 (a string table) and NX2Apple/LauncherView.swift 967 (library page, hero, collection, activity bar, pad routing). LauncherView did not shrink. Its limit stays 967.

startBuild is still one long method in BuildStore+Run. I did not split it: it needs its own tests first. It stays on the list for #387.

Checked

  • Tests: cd frontend && swift test three times, green (118 NXModelTests, 113 NXCoreTests, 637 NX2AppleTests, 868 in all, 865 before). python3 -m unittest discover -s frontend-qt/tests green.
  • Visual QA: captured all launcher and onboarding views on the base and on this branch and compared the PNGs by pixel. 78 of 101 are byte-identical. In the Builds page captures the only difference is the random temp folder in the "Save to" path. A few captures of views this PR does not touch (Xcode onboarding, saves, progress bars) differ in small areas. I did not rerun the base to prove those are run-to-run noise.

Screenshots

None, no visible change.

Scope

  • No engine file (dm/, scripts/, docs/, ref/) is added to the repository
  • No keys, game files or data extracted from a game in the change

, step 8)

The Builds and Settings pages are cards now: files, target, install, log, action, outcome and progress on the Builds page, library, controls, tools and app on the Settings page. Each card takes the stores it shows as parameters and observes only those. The cards that need no app type move to NXLauncher with the shared row and group pieces, the failure and copy cards, the update sheet, the drop target, the row scroller and the dock progress. FilesCard stays in the app target because it runs KeyCheck. Adds LayerImportsTests: NXCore and NXModel import no SwiftUI or AppKit.
@v0lumehi v0lumehi added this to the v1.0.2 milestone Nov 2, 2026
@v0lumehi v0lumehi added enhancement New feature or request launcher The NX2Apple launcher app mac Mac labels Nov 2, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation windows Windows (the Qt front end) labels Nov 2, 2026
@v0lumehi
v0lumehi added this pull request to stack #459 November 2, 2026 03:00
# Conflicts:
#	frontend/Sources/NX2Apple/ContentView.swift
#	frontend/Sources/NXCore/ShellInstall.swift
#	frontend/Tests/NX2AppleTests/ShellInstallTests.swift
# Conflicts:
#	frontend/Sources/NX2Apple/ContentView.swift
#	frontend/Sources/NXModel/BuildStore+ShellRoot.swift
# Conflicts:
#	frontend/Tests/NX2AppleTests/BuildNotificationsTests.swift
#	frontend/Tests/NX2AppleTests/KeyCheckTests.swift
#	frontend/Tests/NX2AppleTests/LauncherPerformanceTests.swift
#	frontend/Tests/NX2AppleTests/LibraryTests.swift
@v0lumehi
v0lumehi merged commit d9ae970 into main Nov 2, 2026
15 checks passed
@v0lumehi
v0lumehi deleted the v0lumehi/launcher-cards branch November 2, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request launcher The NX2Apple launcher app mac Mac windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant