Repository navigation
Sync MaRGE's hardware fields with the landing page, regroup Status and Start, and start pulserver from the page - #15
Merged
Conversation
…and regroup Status and Start The fields the scanner determines (per-axis gmax, slew, raster, rise time, steps, delay, RFPA de-blanking time, RF dead time, gyromagnetic ratio, Larmor frequency) are written from the settings of the launcher last downloaded and made read-only. The Console row is named Docker, Open MaRGE moves under Start pulserver, and the launcher to the bottom of Status. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012vtPr1RHY3npHWe7bMTGrr
…registers A launcher run once copies itself to ~/.pulserver and registers that copy as the handler of pulserver: links (desktop entry on Linux, applet on macOS, HKCU URL protocol on Windows). The page's Start pulserver button opens pulserver:start/x<limits>.x<sequences>.x<recon>, and the handler starts pulserver with those settings. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012vtPr1RHY3npHWe7bMTGrr
…mmand does Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012vtPr1RHY3npHWe7bMTGrr
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.
Requested by Matteo · project thread
Before: the landing page's scanner settings reached pulserver only. MaRGE's Gradients and RF tabs kept their own values (Gx/Gy/Gz max, slew, raster, rise time, steps, delay, de-blanking time, RF dead time, gamma, Larmor), so the two could disagree. The status row was called Console, Open MaRGE sat under Status and the launcher under Start pulserver. Every change of settings or update meant downloading the launcher and running it again.
After: when MaRGE opens from the landing page, those fields are filled from the scanner pulserver was started with and are read-only, with a tip saying they are set on the page. The row is called Docker, Open MaRGE sits under Start pulserver, and the launcher download is at the bottom of Status. The launcher only has to be run once: after that, the page's Start pulserver button starts or updates pulserver with the page's settings directly.
The button can't run Docker from inside the page: a browser page cannot run commands on the computer, and that includes Pyodide. So the launcher registers itself as the handler of
pulserver:links, and the button opens one of those links.How:
boot.hardware_fieldsmaps the limits block to MaRGE's field texts: gradient units are converted with gamma, rise time = max_grad/max_slew, steps = rise/raster, de-blanking =rf_dead_time, RF dead time =rf_ringdown_time, and Larmor = gamma·B0. The page passes the last started settings toboot.start. A page opened with?console=leaves the fields editable.~/.pulserverand registers the copy as thepulserver:handler: a desktop entry on Linux, anosacompileapplet re-signed ad hoc on macOS, and an HKCU URL protocol on Windows.pulserver:start/x<limits>.x<sequences>.x<recon>, where each part is base64url behind anx. The handler decodes the settings as data, never as code, and logs to~/.pulserver/launcher.logon macOS and Linux. On Windows it shows a window, which pauses only if the launch fails.tests/test_boot.pycovers the field mapping.tests/test_launcher.pycovers installing the handler and starting from a link, for both the shell and batch launchers. The macOS applet is not exercised in CI.🤖 Generated with Claude Code
https://claude.ai/code/session_012vtPr1RHY3npHWe7bMTGrr