add release variant selection for installation process. This allows u…#1288
add release variant selection for installation process. This allows u…#1288cameronaaron wants to merge 1 commit intoGrapheneOS:mainfrom
Conversation
…sers to choose between stable and security preview releases.
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability for users to select between stable and security preview release variants during the GrapheneOS web installation process. The implementation includes UI controls for variant selection and logic to modify the release ID accordingly.
- Adds radio button UI for users to choose between stable and security preview releases
- Modifies release selection logic to transform release IDs for preview variants
- Updates user-facing messages to indicate which variant is being downloaded/flashed
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| static/install/web.html | Adds radio button controls for selecting release variant (stable or security preview) |
| static/js/web-install.js | Implements getReleaseVariant() function, modifies getLatestRelease() to handle preview variants by transforming release IDs, and updates download/flash progress messages to display variant information |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <label> | ||
| <input type="radio" name="release-variant" value="stable" checked="checked"/> | ||
| Stable release | ||
| </label> | ||
| <br/> | ||
| <label> | ||
| <input type="radio" name="release-variant" value="preview"/> |
There was a problem hiding this comment.
The radio buttons lack proper identification attributes. Add 'id' attributes to the input elements and update the labels to use 'for' attributes that reference these IDs. For example: <input type=\"radio\" id=\"variant-stable\" name=\"release-variant\" .../> with <label for=\"variant-stable\">.
| <label> | |
| <input type="radio" name="release-variant" value="stable" checked="checked"/> | |
| Stable release | |
| </label> | |
| <br/> | |
| <label> | |
| <input type="radio" name="release-variant" value="preview"/> | |
| <label for="release-variant-stable"> | |
| <input type="radio" id="release-variant-stable" name="release-variant" value="stable" checked="checked"/> | |
| Stable release | |
| </label> | |
| <br/> | |
| <label for="release-variant-preview"> | |
| <input type="radio" id="release-variant-preview" name="release-variant" value="preview"/> |
There was a problem hiding this comment.
Damn thats actually not a bad suggestion
| if (releaseId.endsWith("00")) { | ||
| releaseId = releaseId.slice(0, -2) + "01"; | ||
| } else { | ||
| throw new Error("Unable to determine security preview release ID from stable release"); |
There was a problem hiding this comment.
This error message doesn't provide actionable information for users or developers about why the conversion failed. Consider including the actual releaseId value in the error message, such as: throw new Error(Unable to determine security preview release ID from stable release: ${releaseId} does not end with '00');
| throw new Error("Unable to determine security preview release ID from stable release"); | |
| throw new Error(`Unable to determine security preview release ID from stable release: ${releaseId} does not end with '00'`); |
1308572 to
fad75d8
Compare
67ed9e5 to
9b9de3f
Compare
2118467 to
7e60dbd
Compare
d97c2bd to
029d722
Compare
654b8f1 to
f531688
Compare
ef1436c to
b4d7a8a
Compare
aaddf37 to
87e56b0
Compare
59ef0ae to
7d872a6
Compare
b05f646 to
a219266
Compare
020f8bc to
78da890
Compare
Allow Users to choose between stable and security preview releases.