Repository navigation
[master] Feature 727211 SCALUS Modernization - #234
Merged
Merged
Conversation
…tests Delete the stale 'scalus - Backup.csproj' and its dangling .cs.hide item references, and pin the in-band Safeguard username decode behavior with characterization tests ahead of the core refactor.
Delete the Kestrel-hosted ASP.NET UI, its REST controllers, the bundled Angular 14 app, and the dual-container bridge. The console tool no longer boots a localhost web server or opens the system browser; configuration moves to a dedicated desktop UI. Convert the project from the Web SDK to the console SDK and drop the ASP.NET package dependencies.
Retarget both projects to net10.0, refresh test tooling, and update the RID to win-x64. Switch enum, dictionary, and reflection call sites to the modern generic and TryGetValue forms the newer analyzers expect. Regex and P/Invoke source-generator suggestions are kept as warnings for now.
Replace the local web server and system-browser configuration flow with a Photino-hosted native window that loads the Angular UI over a custom app:// scheme and calls the core in-process through a JSON bridge. The bridge exposes config read/write, validation, protocol registration, tokens, parser and application metadata, platform detection, and import/export file dialogs. On first launch the app seeds a per-platform default configuration if none exists. The Angular front-end is built and staged into the host output at build time and is never checked in.
The basic Windows registrar decided whether SCALUS owned a protocol by testing whether the registered command merely contained the binary file name. That also matched a different SCALUS install or any unrelated handler whose command line happened to mention the name. Compare each token of the registered command against this binary's canonical absolute path instead.
The Safeguard/SPS in-band username carries a one-time authorization token. It was written verbatim to the log wherever the URL or the substituted launch arguments were traced. Add a redaction helper that masks the token value in both separator styles and apply it at every site that logs the URL or args.
The macOS user-default registrar shelled out to a separate "scalusmac" Swift tool to call LaunchServices. Call LSCopyDefaultHandlerForURLScheme and LSSetDefaultHandlerForURLScheme directly through P/Invoke so there is no extra binary to build, ship or sign, and drop the Swift project and its build step.
The app:// custom-scheme handler was never invoked by WebView2, leaving the window blank. Load index.html directly from the staged wwwroot instead, which renders the Angular app and keeps the in-process bridge working. Also stage scalus.ico and apply it to the window and executable.
The bridge was overwriting window.external.receiveMessage instead of calling it to register a callback, so every response from the host was dropped and the UI never populated. Call receiveMessage with the handler as Photino expects.
…d on first run Seed the shipped client definitions so the Applications list isn't empty on a fresh install, and present rdp and ssh as unconfigured protocol rows so nothing registers with the OS until the user picks an application. Always ensure rdp and ssh rows exist even for hand-edited configs.
The Applications tab lists client definitions for every platform, but a handler can only launch a client that runs on this machine. Filter the assignment dropdown to applications whose supported platforms include the running OS. Also fix a corrupted separator character in the picker label.
Render the hint text as a flowing sentence instead of laying each fragment out as a flex item, add breathing room above the note, and give the individual-application card a single-square icon on a blue badge to match the full-configuration card.
The native save picker returns immediately with no dialog when it is given a suggested file name that doesn't exist yet, so export appeared to do nothing. Point it at the Documents folder instead, and append a .json extension afterward when the chosen name doesn't have one.
The replace-configuration and discard-changes confirmations used the native window.confirm() popup, which shows an out-of-place 'This page says' banner. Route both through a small in-app modal that reuses the existing dialog styling, with a red action button for the destructive choice.
The launcher and the configuration UI resolved the config path differently: on Windows and Linux it fell back to the binary directory, so edits made in the UI could land next to the executable while the launcher read from the per-user location. Resolve to the per-user application data directory everywhere (as macOS already did) so both read and write the same SCALUS.json, and so the config stays writable when SCALUS is installed under a read-only path such as Program Files.
Add TemplateContent/TemplateExtension plus LineEnding and Encoding controls to ParserConfig so launch templates live visibly in the config instead of relying on an embedded default or an external file. The write path reconstructs the wire format (CRLF/BOM for .rdp, LF/UTF8 otherwise) from LF-canonical stored text. Legacy UseDefaultTemplate/ UseTemplateFile still deserialize and are migrated to inline content on load and once on disk at startup.
Replace UseDefaultTemplate/UseTemplateFile in the default and per-OS SCALUS.json seeds with the resolved template text so a fresh install ships visible, editable templates instead of pointing at embedded defaults or files under %AppData%.
Replace the launch-strategy dropdown and UseTemplateFile path with a 'Generate a connection file' toggle plus an inline template content editor, file extension, and advanced line-ending/encoding controls. New RDP applications prefill from the built-in default template; the bridge and seed data now carry TemplateContent/TemplateExtension.
Replace the free-form Options textarea with a single wait-strategy dropdown (pause, wait for ready, wait for exit, or wait N seconds), matching how the launcher actually applies those mutually exclusive options. Drop the PostProcessingExec/Args fields from the editor UI; they remain in the model and round-trip untouched through load/save for the rare configs that use them.
Loads an older on-disk config that uses both UseDefaultTemplate and UseTemplateFile, pulls the external template files in from disk, runs the migration, and compares the whole result against a known-good fully-inlined golden config. Covers default-template inlining, CRLF->LF normalization of external files, .remmina extension derivation, PostProcessing round-trip, and command-only apps being left alone.
…check Covers the PostProcessing round-trip claim on real data: editing and saving an app leaves PostProcessingExec/Args exactly as they were, plain apps stay clean, saves are idempotent. Also drives the migration through the real Load(path) so inlining is verified end to end, not just the in-memory helper.
Mechanical first cut of the Core/CLI separation: the shared project becomes a Scalus.Core class library and a new thin Scalus.Cli project owns Program.cs and produces the scalus executable. Test and UI project references are unchanged since the .csproj filename stayed the same. Autofac, Newtonsoft, CommandLineParser and the verb handlers still live in Core for now; relocating the verbs and swapping the DI container and serializer come in follow-up commits.
Move all configuration serialization onto System.Text.Json with a source-generated context (ScalusJson) so the Core library stays trim- and NativeAOT-friendly. The disk format is unchanged: camelCase, indented, enums written as names, case-insensitive on read so legacy and hand-edited files still load. The bridge response envelope keeps its PascalCase shape for the Angular UI. Converts the DTO attributes, the load/save paths, the info/verify CLI dumps, and the Photino bridge off Newtonsoft, and drops the package from Core and the test project. The characterization tests are retargeted to the shared serializer, and the launch-args fixtures are rewritten as valid JSON (System.Text.Json does not accept single-quoted JSON).
Build the container with a plain ServiceCollection/ServiceProvider so the core has no reflection-based DI left to trip up trimming or NativeAOT. The old assembly-module scan and the five verb Module.cs files are gone; services are now registered explicitly, one interface at a time. The named-application resolution (Named<IApplication> + TypedParameter) is replaced by CreateVerbApplication, which maps the parsed options type to its application and builds it with ActivatorUtilities so the parsed options still flow into the constructor alongside the injected services. The CLI resolves through GetRequiredService and the Photino bridge now takes an IServiceProvider, keeping its per-call transient configuration resolves. Also drops an unused Autofac using in the RDP parser. Builds clean across Core, CLI and UI, all 43 tests pass, every verb resolves, and the UI bridge starts cleanly.
Feature 727211 SCALUS 2.0
Feature 727211 SCALUS 2.0 Upgrade Angular to 22.2.x; make unregister options visible
…above 65535, which is the limit for the 4th build number in some software. Update path handling to work cross-platform.
TFS 727211 SCALUS 2.0 - Pipeline bug fixes
Feature 727211 SCALUS Modernization
Feature 727211 SCALUS Modernization
…ls if the app doesn't support the current OS; Change button name
Feature 727211 SCALUS Modernization - clear apps on import if not applicable
Feature 727211 SCALUS Modernization - Fix Remmina parsing, port issues, standardize filename
…t the launch information. It only applied to the general log files.
Feature 727211 SCALUS Modernization - Remove confusing text
Feature 727211 SCALUS Modernization - Revert Filename
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| OSS Licenses | View in Orca | ||
| Malicious Packages | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
🛡️ The following SAST misconfigurations have been detected
| NAME | FILE | ||
|---|---|---|---|
| OS Command Injection Vulnerability Detected | ...rm/OsServicesBase.cs | View in code | |
| OS Command Injection Vulnerability Detected | ...rm/OsServicesBase.cs | View in code | |
| OS Command Injection Vulnerability Detected | ...nix/LinuxElevator.cs | View in code | |
| OS Command Injection Vulnerability Detected | ...s/WindowsElevator.cs | View in code |
Note: The scan should have failed if no policies were configured in warn-only mode.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
MichaelThompson
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.