Skip to content

feat(ui): move chart options into axis flyouts - #16

Merged
mrcsin merged 11 commits into
masterfrom
ui-redesign
Nov 6, 2026
Merged

mrcsin merged 11 commits into
masterfrom
ui-redesign

Conversation

@mrcsin

@mrcsin mrcsin commented Nov 6, 2026

Copy link
Copy Markdown
Member

The side pane mixed spectrum and trend controls and gave the charts less room. Chart options now open from a left click on an axis, as in SemiPlot, and the charts get the full width.

  • Axis flyouts: spectrum intensity (max, min, log, from zero, invert, autoscale), wavelength (start, end, autoscale), trend intensity (max, min, from zero, autoscale), time (SemiPlot's interval panel with presets). Fields show the limits at opening; they accept . or ,.
  • "Вернуться к текущему" and "Следить за данными" sit in the top row; the readout sits beside the spectrum only, trend and overview span the full width.
  • A state line on each chart names a frozen scale, stale data (link not receiving or no spectrum for 10 s), a past moment and active modes.
  • Status bar shows spectrometers as "нет данных" unless frames arrive; the message panel is a compact row, toggled from the View menu.
  • From zero is a following mode with 5 % headroom, on by default for the trend; trend ticks drop the date (it moves to the axis title); the empty spectrum shows 0..1 over the device range.
  • Logs move to C:\DISTR\Logs\SemiSpec (installer creates it with Users modify) and fall back to %LOCALAPPDATA%\SemiSpec\Logs.
  • Fixes found on the way: flyouts close before the window closes (Avalonia calendar crash), ScottPlot DIP scale in the axis hit-test and the state line.

Verified: 992 tests (944 before), Release build 0 warnings, format and terse clean, publish and ISCC 6 compile. Reviewed twice by a second model; the review fixes are in the last four commits.

🤖 Generated with Claude Code

mrcsin and others added 11 commits November 6, 2026 17:35
The chart options sat in a side pane next to both charts, which
took width from the trend and differed from SemiPlot, the other
Semi viewer the operators use.

A left click on an axis now opens that axis's flyout, ported from
SemiPlot's axis scale and time window panels: spectrum intensity
(bounds, log, From zero, invert, Autoscale), spectrum wavelength
(start, end, Autoscale), trend intensity (bounds, From zero,
Autoscale) and trend time (start, end, width, presets). Back to
live and Follow live moved to the connection row. The readout pane
sits beside the spectrum only, the trend and overview span the
window, and each chart carries a one-line state text above its
data area. From zero replaces Stick to zero as a following mode
with 5 % headroom, on by default for the trend and its overview.
The status bar shows no board data outside Receiving, the message
panel is compact and toggled from the View menu, trend ticks drop
the date into the axis title, and an empty spectrum shows 185.9 to
2464.3 nm over 0..1, both devices' calibrated range.

Ported from the ui-demo commit c5d12f6 onto the SemiSpec rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closing the window with the time window flyout's calendar open
threw ArgumentOutOfRangeException from Avalonia 12's logical detach,
so the app crashed on exit. A log-axis minimum at or below zero was
dropped without a word, and the typed text was replaced by the old
bound. The flyout fields keep the limits of the moment they opened
while the live chart moves on, and nothing told the operator so.

Each chart view hides its flyouts on the window's Closing event;
AxisFlyout.Hide closes the calendars and the preset list inside the
flyout before the flyout itself. AxisRangeForm takes an axis rule,
and the spectrum chart's VerticalRangeProblem names the log minimum,
so the flyout shows the message and keeps the typed text. Every
flyout states that its values are those of the opening, and the
message line is a reserved 40 px row, so validation never resizes
the flyout. The connection-row fit test asserts that it measures
Back to live and Follow live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SemiPlot and SemiStep log to C:\DISTR\Logs\<App> on the operator
PC, where service staff collect the logs of every Semi application.
SemiSpec logged under the operator's %LOCALAPPDATA%, a folder the
staff have to find per user.

The app now logs to C:\DISTR\Logs\SemiSpec\semispec.log. Before the
logger exists, AppLogging.CanWrite creates the folder and opens the
log file for append with the sharing the shared sink uses; when that
fails, as on a dev run without the installer, the log goes to
%LOCALAPPDATA%\SemiSpec\Logs and its first line is a Warning naming
both folders. The spectrum store stays in %LOCALAPPDATA%. The
installer creates the folder in [Dirs] with users-modify, so the
operator can write it, and uninstall keeps it, as SemiPlot's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TrendViewModel kept Presets and SelectedPreset for the side pane's
preset box, and the resx kept MessagePanelTitle for the message
panel's header. The axis flyouts removed that box and the compact
panel has no header, so only tests read the two members and nothing
reads the key; the time window flyout picks a preset through
TimeWindowPanelViewModel.SetWidthCommand.

The members, their pipeline and the key go. The trend tests pick
presets through the flyout's command, so they cover the path the
operator uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The severity dot in the message list flyout carried a 6 px top
margin, off the 0, 4, 8, 12, 16, 24, 32 scale that ui-theme.md
holds every AXAML inset to, so its off-scale grep printed a line.

The margin is 4 px, and the grep prints nothing again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ported axis flyouts brought behaviour no test pinned: the From
zero range the spectrum, the trend and the overview share, the
overview band in that mode, a typed trend range held until
Autoscale, the trend's time tick format, the message panel's
visibility rules and the spectrum's axes before the first spectrum.

Each gets a test. The empty spectrum axis test pins the calibrated
range, 185.9 to 2464.3 nm, the first ATP-2000 pixel to the last
ATP-8000 pixel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The architecture docs still described the side pane with the chart
controls, Stick to zero, the trend presets box, the historical line,
the scrolling message panel and the log under %LOCALAPPDATA%, none
of which ships any more.

overview.md now covers the window rows and widths as measured, the
readout pane, the connection row's live buttons, the status bar's
Receiving rule, the From zero scale, the state lines, the axis
flyouts, the trend's ticks and held range, the compact message
panel, the log folder choice and the installer's [Dirs] entry. The
README's locked decisions, ui-text's key tables, ui-theme's brush
consumers and testing-strategy's rows follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A review of the axis flyouts found four faults. ChartAxisRegion
multiplied a DIP position by Plot.ScaleFactor, but ScottPlot's
layout runs in DIPs divided by it, so at any scale but 1 the axis
bands missed the press; ChartStateLine had the mirror error.
Autoscale and typed bounds froze the spectrum scale before the
first spectrum, which the docs say never happens. A DataContext
change detached the form before it hid the flyout, so pending
fields were lost, unlike on unload. Russian operators type "1.5"
as often as "1,5", and the point was rejected.

ChartAxisRegion divides and ChartStateLine multiplies, checked
against GetCoordinates at scale factors 1 and 2. HasSpectrum
guards ToggleAutoscale, SetVerticalRange and SetHorizontalRange.
Both views hide before they detach. AxisRangeForm reads the
current culture first, then a point or a comma as the separator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppLogging.Create used the site folder whenever the write check
passed, and if the logger then failed to create that folder the
app exited with code 1 and no log at all.

A failed open of the site folder now falls back to the local
folder with the same Warning as a failed check. Tests cover that
path and the real check against a read-only log file, which
Windows refuses with UnauthorizedAccessException.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The axis press path had only view-model tests, and the state line
fit test compared the spectrum line with the full-width trend
pane and measured the historical text alone.

New view tests press the trend's time and intensity bands and the
spectrum's intensity band, send Escape to an edited field, close
a flyout with an edited bound, and run a realised preset item's
command. The state line test measures the longest composed lines
over each chart's data area at the minimum width, and a new fit
test holds every flyout message to its 40 px row and every note
to one line, in English and Russian.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
overview.md now states the scale-factor units of the axis bands
and the state line, the early-input guard, the decimal separators,
the measured state line and flyout message widths, the logger
fallback after a failed open, and the manual icacls check after an
upgrade. testing-strategy.md lists the new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrcsin
mrcsin merged commit 4a158fb into master Nov 6, 2026
1 check passed
@mrcsin
mrcsin deleted the ui-redesign branch November 6, 2026 15:06
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