Repository navigation
Record recent launches in LaunchHistory - #6
ivanmilevtues wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
CodeBoarding reviewStatus: 2 changed components See the full change in CodeBoarding. graph LR
n_User_Interface["User Interface"]
n_Data_Models["Data Models"]
n_Core_Application_Services["Core Application Services"]
n_Enumerations["Enumerations"]
n_Type_Extensions["Type Extensions"]
n_Utility_Services["Utility Services"]
n_Bootstrapper_Launch_Management["Bootstrapper #38; Launch Management"]
n_Domain_Exceptions["Domain Exceptions"]
n_External_Integrations["External Integrations"]
n_User_Interface -- "binds to and inspects models" --> n_Data_Models
n_User_Interface -- "accesses core services and logs to" --> n_Core_Application_Services
n_User_Interface -- "formats UI assets with" --> n_Type_Extensions
n_User_Interface -- "validates input and queries with" --> n_Utility_Services
n_User_Interface -- "controls and responds to" --> n_Bootstrapper_Launch_Management
n_User_Interface -- "catches theme parse exceptions from" --> n_Domain_Exceptions
n_User_Interface -- "controls presence in" --> n_External_Integrations
n_Data_Models -- "resolves graphical resources with" --> n_Type_Extensions
n_Data_Models -- "prompts UI dialogs through" --> n_User_Interface
n_Data_Models -- "logs activity to" --> n_Core_Application_Services
n_Data_Models -- "fetches data using" --> n_Utility_Services
n_Data_Models -- "signals HTTP faults with" --> n_Domain_Exceptions
n_Data_Models -- "resolves deployment locations from" --> n_Bootstrapper_Launch_Management
n_Core_Application_Services -- "displays views and alerts via" --> n_User_Interface
n_Core_Application_Services -- "deserializes and populates" --> n_Data_Models
n_Core_Application_Services -- "formats values using" --> n_Type_Extensions
n_Core_Application_Services -- "executes system and network tasks via" --> n_Utility_Services
n_Core_Application_Services -- "delegates execution to" --> n_Bootstrapper_Launch_Management
n_Enumerations -- "annotated by" --> n_Data_Models
n_Type_Extensions -- "creates UI components through" --> n_User_Interface
n_Type_Extensions -- "logs failures to" --> n_Core_Application_Services
n_Utility_Services -- "notifies errors through" --> n_User_Interface
n_Utility_Services -- "writes diagnostic logs to" --> n_Core_Application_Services
n_Utility_Services -- "extends HTTP requests using" --> n_Type_Extensions
n_Utility_Services -- "raises errors with" --> n_Domain_Exceptions
n_Bootstrapper_Launch_Management -- "updates progress and dismisses" --> n_User_Interface
n_Bootstrapper_Launch_Management -- "instantiates and parses" --> n_Data_Models
n_Bootstrapper_Launch_Management -- "persists configuration and logs via" --> n_Core_Application_Services
n_Bootstrapper_Launch_Management -- "configures registry using" --> n_Type_Extensions
n_Bootstrapper_Launch_Management -- "verifies files and synchronizes via" --> n_Utility_Services
n_Bootstrapper_Launch_Management -- "throws domain errors with" --> n_Domain_Exceptions
n_Bootstrapper_Launch_Management -- "records launch history and triggers activity wa…" --> n_External_Integrations
n_Domain_Exceptions -- "references RPC models in" --> n_Data_Models
n_External_Integrations -- "alerts users through" --> n_User_Interface
n_External_Integrations -- "populates and caches" --> n_Data_Models
n_External_Integrations -- "logs activity and presence events through" --> n_Core_Application_Services
n_External_Integrations -- "manages cache with" --> n_Utility_Services
classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
class n_Bootstrapper_Launch_Management,n_External_Integrations modified;
linkStyle 31,35 stroke:#7d4e00,stroke-width:2px;
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c0b088664
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| case NextAction.LaunchRoblox: | ||
| App.Logger.WriteLine(LOG_IDENT, "Opening Roblox"); | ||
| Integrations.LaunchHistory.Record(LaunchMode.Player); |
There was a problem hiding this comment.
Record launches initiated through launch arguments
The history hook exists only in ProcessNextAction, but website protocol invocations and the -player, -studio, and local-place CLI flows use the ProcessLaunchArgs branch at lines 69–72, which calls LaunchRoblox directly. Those are primary launch paths, so they never create or update LaunchHistory.json; recording needs to occur on a shared path used by every Roblox and Studio launch.
Useful? React with 👍 / 👎.
|
|
||
| case NextAction.LaunchRoblox: | ||
| App.Logger.WriteLine(LOG_IDENT, "Opening Roblox"); | ||
| Integrations.LaunchHistory.Record(LaunchMode.Player); |
There was a problem hiding this comment.
Record history only after a successful launch
This records the launch before LaunchRoblox performs any validation or starts a process. If Windows Media Foundation is unavailable, the user declines the existing-launch confirmation, bootstrapper setup fails, or a UAC prompt is cancelled, the history still reports that Roblox was opened; the same issue applies to the Studio call below. Record the entry only after the Roblox process has successfully started.
Useful? React with 👍 / 👎.
| { | ||
| private const int MaxEntries = 20; | ||
|
|
||
| private static string FilePath => Path.Combine(Paths.Base, "LaunchHistory.json"); |
There was a problem hiding this comment.
Delete launch history when the user discards data
When uninstalling with “Keep my settings and mods” disabled, Installer.DoUninstall(false) deletes the known settings, state, logs, and modifications but never deletes this new file. For installations with more than three top-level files, line 317 of Installer.cs also prevents removal of the entire base directory, so LaunchHistory.json and its usage timestamps remain after uninstall; add it to the non-keep-data cleanup sequence.
Useful? React with 👍 / 👎.
| var entries = Load().Prepend(new Entry(mode, DateTime.UtcNow)).Take(MaxEntries).ToList(); | ||
|
|
||
| try | ||
| { | ||
| File.WriteAllText(FilePath, JsonSerializer.Serialize(entries)); |
There was a problem hiding this comment.
Serialize history updates across launcher processes
Record performs an unprotected read-modify-write on a file shared by every Bloxstrap process. If Player and Studio launches begin concurrently, both processes can load the same previous list and the later write can overwrite the earlier entry, or one write can fail with a sharing violation and be silently reduced to a log message; protect the complete load-and-write operation with an interprocess lock.
Useful? React with 👍 / 👎.
Test PR for the one-file CodeBoarding setup (webview bloxstraplabs#210 / action bloxstraplabs#143): adds a small LaunchHistory integration that LaunchHandler calls on each Roblox or Studio launch, so the review has a new component and relations to report. Not meant to merge.