Skip to content

UX round: drag & drop, zoom, variations, plot simulation, command palette, PNG cards, paper colours and more - #16

Merged
Murphy23x merged 18 commits into
mainfrom
dev
Nov 2, 2026
Merged

Murphy23x merged 18 commits into
mainfrom
dev

Conversation

@Murphy23x

@Murphy23x Murphy23x commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Ten user-experience improvements, plus the original fix of this PR. Each one has its own commit, was tested in the running app (GUI screenshots under xvfb, or the CLI), and is documented in the README.

Changes

  1. Drag and drop: drop files onto the window to load them by type. Several files at once work, and a dropped preset is applied. Dropping a folder makes it the watch folder, and dropping a browser link downloads it. An overlay shows while something is dragged over the window.
  2. Exact slider values: double-click a slider, or click its value, to type a number. Enter applies, Esc cancels, Tab moves to the next slider and Up/Down nudge. A decimal comma works, and so do *2, /2, +10 and --10. Out-of-range values are clamped, with a note.
  3. Preview zoom and pan: the mouse wheel zooms around the cursor (1×–40×), dragging pans, and double-click or 0 fits the page again. Zoomed in, lines are drawn at their real pen width, with a scale bar.
  4. Session kept: the design is saved to session.json (gitignored) after each change and restored at start-up. Ctrl+N starts a fresh design, and Undo takes that back. Long status messages no longer run over the statistics.
  5. Explore variations (E): a 3×3 grid of variations of the current layer, drawn with the other layers. It can vary only the seed, or the parameters too, with locks respected. Clicking a variation keeps it as one undo step.
  6. Plot simulation (G): plays the plot back in plot order at the plotter's speeds, with pen lifts and travel moves. It has a time bar you can click to jump, pause and speed control. The total time matches the plot-time estimate.
  7. Command palette (Ctrl+K or /): a search box over 100+ commands — patterns, actions, paper, pens, layers, tabs, sources and presets — with the shortcut shown next to each command.
  8. PNG proof card (I, or --out x.png on the CLI): the plot on paper with a shadow and a caption (patterns, paper, pens, metres of line, plot time).
  9. Paper colours and gel pens: preview on cream, kraft, grey, black or navy paper, with new white, gold and silver pens. Plot files are unchanged. A pen with too little contrast on the chosen paper is flagged.
  10. CLI --set "<name>=<value>" and --list [json]: change any parameter or setting by name without a preset, and list every pattern, parameter and setting with its range.

Also included: an error that happens inside a job is now reported once instead of twice (the original fix of this PR).

Testing

  • All 10 presets, --batch, G-code/HPGL export and the CLI error paths: exit codes as expected.
  • Each GUI feature was driven through a test hook kept outside the repo, with screenshots of the result.
  • --set and --list json were checked for valid output and for clear errors on a wrong name, option, range or toggle value.

🤖 Generated with Claude Code

https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC

claude and others added 18 commits October 24, 2026 20:48
New Sources tab and five new patterns that build designs from outside data:

- Field sources: Flow field, Wave lines, Contour map and Hatch shading can
  follow a photo or a grid (CSV matrix, ESRI .asc, heightmap) instead of noise
- Route pattern: GPX / GeoJSON files and OpenStreetMap streets (Overpass),
  with smoothing, parallel copies and a rectangle or circle frame
- Data lines pattern: CSV / JSON series as ridgelines, rings or a spiral;
  weather from Open-Meteo; Microsoft 365 report CSVs are put in date order
- Terrain: Terrarium elevation tiles around a place, drawn as contours
- SVG import pattern with its own SVG reader and even-odd hatch fill
- Audio pattern: WAV / AIFF as waveform rows, spiral or spectrum ridgeline
- Text pattern with single-line Hershey fonts (sans, serif, script)
- Web addresses with a local download cache, so presets stay reproducible
- Watch folder that loads new files and exports them automatically
- Text to seed / design: the same name always gives the same design
- AI design: a description becomes a preset through the Claude API
- Command-line mode (--preset, --input, --out, --batch, --watch, ...)

Presets are now version 2: they also store the sources, each layer's field
and text, and accept parameters by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
httpRequest now refuses https -> http redirects, and requests that carry
headers or a body only follow redirects within the same scheme, host and port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
Shows the new features: a contour map that follows real terrain data
(Field = Grid) and a single-line Hershey text caption on a second pen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
- CLI: numeric options (--seed, --layer, --radius, --terrain, --batch) are
  validated against their ranges instead of silently becoming 0; --streets
  and --terrain only take a following value when it fits, so
  "--streets --paper A4" works; a missing API key or empty --prompt now
  exits with code 1.
- HTTP: retries 429/502/503/504/529 twice, honouring Retry-After (max 30 s);
  JSON error bodies are reduced to their error message.
- AI design: parameter names match regardless of case, spaces or a unit in
  brackets ("step" -> "Step (mm)"); unknown names are reported in the
  status instead of being dropped silently; an answer without layers is an
  error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
An error already reported by cliError (CliAbort) inside a synchronous job
was caught by runAsync and reported a second time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
Files load by type like the Sources buttons (presets apply, several at
once), a folder becomes the watch folder and a browser link is fetched.
An overlay shows while something is dragged over the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
Double-click a slider or click its value to type a number. Enter applies,
Esc cancels, Tab/Shift+Tab moves to the next slider and Up/Down nudge.
Accepts a decimal comma and *2, /2, +10, --10 relative to the current
value; out-of-range input is clamped with a note in the status bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
Mouse wheel over the page zooms around the cursor (1x-40x), dragging pans,
double-click or 0 fits the page, + and - zoom from the keyboard. While
zoomed, only the visible area is redrawn at that scale at the real pen
width, with the zoom level and a 10 mm / 1 mm scale bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
The design is written to session.json shortly after every change and
restored at start-up (with the open tab and layer); Ctrl+N starts fresh
and Undo takes that back. Not used in command-line mode. Also: status
messages get a backdrop and are shortened so they never run over the
statistics in the status bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
E (or the new button) shows nine variations of the current layer on the
page with the other layers: seeds only, or Tab to also vary the pattern's
parameters like Randomize (locks respected). The first cell is the current
design. Click or 1-9 keeps one as a single undo step; Space makes a new
batch. One variation is generated per frame so the window stays live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
G (or the Output tab button) plays the plot back in plot order using the
pen-down speed, travel speed and pen lifts, layer by layer: finished
strokes, the stroke in progress, travel moves and the pen position. A time
bar shows elapsed / total time and the layers in their pen colours; click
it to jump. Space pauses, +/- change the speed (default: whole plot in
about 30 s). The total matches the plot-time estimate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
Search box over every command: patterns, actions, paper, pens, layers,
tabs, sources and the presets in presets/. Words filter, Up/Down/wheel
choose, Enter or a click runs, Esc closes. Shortcuts are shown next to
each command, and the panel hint now points to the palette.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
I (or the Output tab button, or the palette) saves a PNG of the plot on
paper at the real pen widths with a soft shadow and a caption: patterns,
paper, pens, metres of line and plot time. On the command line, --out
name.png writes the same image, e.g. for a gallery of thumbnails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
Preview on white, cream, kraft, grey, black or navy paper, with white,
gold and silver pens added for dark paper. The paper colour is used by
the preview, zoom, variations, simulation and PNG image (plot files stay
without a background) and is saved in presets; older presets open on
white. A pen that barely shows on the paper is struck through in the
swatches and named above the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
--set "<name>=<value>" changes a pattern parameter of the current layer,
a layer setting (Pattern, Pen colour, Pen width, ...) or a page setting
(Paper colour, Margin, ...) without a preset. Names match loosely,
choices take the option name, toggles on/off; unknown names, options and
out-of-range values stop with a clear error. --list prints every pattern,
parameter and setting with its range and default, --list json the same
for scripts. Also: pen swatches on the PNG card get a thin outline so a
white pen shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g4XoUPwffpdezjFy4s5DC
@Murphy23x Murphy23x changed the title Report a command-line error once when it happens inside a job UX round: drag & drop, zoom, variations, plot simulation, command palette, PNG cards, paper colours and more Nov 2, 2026
@Murphy23x
Murphy23x merged commit 600f27c into main Nov 2, 2026
4 checks passed
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.

2 participants