Skip to content

C4G BLIS Spring 2026: Self-update & password reset#67

Open
mrysav wants to merge 68 commits into
mainfrom
unstable
Open

C4G BLIS Spring 2026: Self-update & password reset#67
mrysav wants to merge 68 commits into
mainfrom
unstable

Conversation

@mrysav
Copy link
Copy Markdown
Contributor

@mrysav mrysav commented Apr 20, 2026

I am opening this PR to track the review on the unstable branch - don't merge this! I will merge this PR when my review is completed.

I will tag people in comments as I make, and you can follow up in that thread.

ranjinikrishnan and others added 30 commits March 4, 2026 12:02
Co-authored-by: Mitchell Rysavy <mitchell.rysavy@gmail.com>
Co-authored-by: Mitchell Rysavy <mitchell.rysavy@gmail.com>
feat: tools window with supervisor verification for password reset
feat: Addded update button for file selection, progress window and data backup
Copy link
Copy Markdown
Contributor Author

@mrysav mrysav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hakiatalov @ranjinikrishnan @simotony77 @asuquoe62-star @luqmanrashad @Tjones1701

Good work all! I have some suggestions and some discussions below. In general there is nothing here that I wouldn't merge in main - just some areas where I think we should refactor in the long term. Ultimately the goal is that most features don't live in the launcher after all, but within BLIS itself. The launcher really just needs to be reliable, and I see a lot of good things to that end here.

If you'd like to push more changes to the unstable branch based on my feedback, please feel free. After the semester ends, I'll merge it and work on getting a proper release out.

Comment thread Views/ToolsWindow.axaml Outdated
Comment thread Views/ToolsWindow.axaml Outdated
<DockPanel>

<Border DockPanel.Dock="Top" Background="#005A9C" Padding="16 12">
<TextBlock Foreground="White" FontSize="16" FontWeight="SemiBold">BLIS Tools</TextBlock>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asuquoe62-star @Tjones1701 @simotony77 If any of you are interested before the semester end, all of the text in this file looks like it needs to be separated into the Resources file and translated.

(this comment is irrelevant if the Tools window is not used, per my comment above)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrysav
Done! I have pushed the following changes to the feature/s2026-modern-password-hashing branch:

  • Created Lang/Resources.resx with English strings for all UI text across MainWindow, ToolsWindow, and PasswordResetDialog
  • Created Lang/Resources.fr.resx with French translations of all those strings
  • Updated BLIS-NG.csproj to register the resx files and generate the BLIS_NG.Lang.Resources strongly-typed class
  • Updated Views/MainWindow.axaml, Views/ToolsWindow.axaml, and Views/PasswordResetDialog.axaml to replace all hardcoded text with {x:Static lang:Resources.KeyName} bindings
  • Removed the commented-out Updates tab from ToolsWindow.axaml per your suggestion

The translation system builds on the LanguagePreferences and culture-switching logic already in the unstable branch. At runtime, if launcher-language.txt is set to "fr", .NET automatically serves strings from Resources.fr.resx. If set to "en" or absent, it falls back to Resources.resx. No additional code changes were needed beyond the resource files and the AXAML updates

Comment thread ViewModels/ToolsWindowViewModel.cs Outdated
<TextBlock FontSize="18" FontWeight="Bold">Reset User Password</TextBlock>

<StackPanel Spacing="4">
<TextBlock>Username</TextBlock>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asuquoe62-star @Tjones1701 @simotony77 If any of you are interested before the semester end, all of the text in this file looks like it needs to be separated into the Resources file and translated.


namespace BLIS_NG.ViewModels;

public class UpdateProgressViewModel : ViewModelBase
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luqmanrashad @hakiatalov

So, I'm not going to block on this, but putting the update logic in this class is an antipattern.

Avalonia (which traces its lineage to Microsoft's WPF forms) uses the "MVVM" pattern where "VM" is "ViewModel," and "view models" are where the weird bits of logic that deal with updating the data layer of the UI but aren't strictly to do with the UI.

Sort of weird, but it does make sense, and for the most part the codebase should follow that. Practically speaking I would suggest that this logic should live in its own set of utility classes (the "model") and injected into this view model which then interacts with them.

Comment thread ViewModels/UpdateProgressViewModel.cs
Comment thread ViewModels/ServerControlViewModel.cs
return Convert.ToHexString(bytes).ToLowerInvariant();
}

private string? ValidatePassword(string password)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simotony77 It seems like this is duplicate logic from above- maybe separate it into its own function?


namespace BLIS_NG.ViewModels;

public class PasswordResetViewModel : ViewModelBase
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simotony77 I have same comment on this class as I do the update one below. I'm not blocking this, but the Avalonia MVVM pattern should be used, and much of this should be in a model class. The ViewModel class should really just be used for the bridge between the view itself and the business logic.

private const string DefaultLanguageCode = "en";
private const string SettingsFileName = "launcher-language.txt";

public static string GetLanguageCode()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Language code should be implemented as an enum, or something else that provides more of a compile-time guarantee about the values, rather than a string.

Comment thread Config/LanguagePreferences.cs Dismissed
Comment thread Config/LanguagePreferences.cs Dismissed
Comment thread Config/StateFile.cs Fixed
Comment thread Config/StateFile.cs Fixed
Comment thread ViewModels/UpdateProgressViewModel.cs Fixed
Comment thread ViewModels/UpdateProgressViewModel.cs Fixed
Comment thread ViewModels/UpdateProgressViewModel.cs Fixed
Comment thread ViewModels/UpdateProgressViewModel.cs Fixed
Comment thread Config/StateFile.cs Dismissed
Comment thread Config/StateFile.cs Dismissed
Comment thread ViewModels/UpdateProgressViewModel.cs Dismissed
Comment thread ViewModels/UpdateProgressViewModel.cs Dismissed
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.

6 participants