Skip to content

fix(gui): --history given on the command line beats the saved layout - #12

Merged
mysma-9403 merged 1 commit into
mainfrom
fix/history-precedence
Oct 11, 2026
Merged

mysma-9403 merged 1 commit into
mainfrom
fix/history-precedence

Conversation

@mysma-9403

Copy link
Copy Markdown
Contributor

--history did nothing whenever a layout file existed — which, since the JPSS layout started shipping, is always for the bundled demo. The station read the depth out of the layout and overwrote whatever the flag said.

The decision TODO(gs-gui-history-precedence) was waiting on: the command line wins, the way it does over a config file everywhere else. Left out, the layout's depth stands.

What made the two distinguishable is that --history is now Option<usize> rather than a default_value_t — given as 4096 and defaulted to 4096 were the same value and had to stop being the same instruction. The gui entry point now takes a Startup carrying what the operator asked for this run; the screenshot request moved into it too.

The depth in force is written back into the layout so a save records it: a depth somebody asked for that reverted silently on the next start would be the same complaint one place along.

The decision is a pure function with its own tests, so it did not need a window to cover.

538 tests, fmt and clippy clean.

It did nothing whenever a layout existed, which since last week is always for
the bundled demo: the station read the depth out of the layout file and
overwrote whatever the flag said. A flag that looks honoured and is not.

The decision the TODO was waiting on: the command line wins, the way it does
over a config file everywhere else. Left out, the layout's depth stands.

What made it possible to tell them apart is that `--history` is now an
`Option<usize>` rather than a `default_value_t`: given as 4096 and defaulted to
4096 were the same value and had to stop being the same instruction. The gui's
entry point takes a `Startup` carrying what the operator asked for this run,
which is also where the screenshot request moved to.

The depth in force is written back into the layout, so a save records it. A
depth somebody asked for that reverted silently on the next start would be the
same complaint one place along.

TODO(gs-gui-history-precedence) is closed; the index counts move with it, and
one of them was already stale.

538 tests, fmt and clippy clean.
@mysma-9403
mysma-9403 merged commit d9e1fda into main Oct 11, 2026
1 check passed
@mysma-9403
mysma-9403 deleted the fix/history-precedence branch October 11, 2026 19:45
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.

1 participant