Skip to content

Bug check: fix Esc quitting, slider value entry, strange attractor, CLI --set - #18

Merged
Murphy23x merged 21 commits into
mainfrom
dev
Nov 7, 2026
Merged

Murphy23x merged 21 commits into
mainfrom
dev

Conversation

@Murphy23x

Copy link
Copy Markdown
Owner

A full bug check of the app: the sketch was compiled with Processing 4.5.7 (as in CI), every feature was exercised through the command line and the GUI (on a virtual display with simulated mouse and keyboard), and every pattern parameter was tested at its minimum and maximum.

Fixed

  • Esc quit the whole app. Pressing Esc to close the pattern dropdown, or anywhere in the main view, closed the window. Esc now closes the dropdown or resets the zoom.
  • Typed slider values were appended to the old value. Double-clicking a slider showing 800 and typing 1500 gave 8001500 (clamped to 3000). The first key now replaces the value, and the old value shows as selected. This also makes the documented *2, /2, +10, --10 shortcuts work.
  • Strange attractor drew a solid black tangle. Successive points of these maps jump across the whole attractor, so joining them with lines can't show the shape. Each point is now a pen dot (stipple), and the default is 6,000 iterations.
  • CLI --set couldn't reach parameters with = in their name (Spacing (0=off), Ring gap (0=off), Row length (0=auto), Hatch (mm, 0=off)).
  • Export order: exports and PNG images now run after the layers are regenerated, so a change made in the same frame is included.
  • PNG proof card: a long caption shrinks instead of running into the pen swatches.
  • .gitignore: now covers G-code/HPGL/PNG exports and batch folders, not only exports/*.svg.

Verified working (no change needed)

  • All 35 patterns render correctly in SVG, G-code (Z axis and servo), HPGL and PNG.
  • 467 min/max parameter settings: no crashes, NaNs or slowdowns.
  • All 10 bundled presets load and render correctly.
  • File sources: CSV (including ; with decimal commas and newest-first dates), JSON, GPX, GeoJSON, Overpass, WAV, SVG with transforms and arcs, text, and grids.
  • Terrain fetch (live), watch folder with auto-export, batch export, and text and image masks.
  • Registration marks, pen test, and file per layer.
  • GUI: explore variations, simulation, command palette, zoom, font picker, locks, undo/redo, and session restore.
  • AI design: request format checked against the current Claude API; the response handling was tested with a local stand-in server.

Not tested live

  • Street fetch, weather fetch and place-name lookup: the test environment blocks those hosts. Their response parsing was tested offline with data in the same formats.
  • Drag and drop: not tested; the code was reviewed only.

Generated by Claude Code

claude and others added 21 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
- Esc no longer quits the app: it closes the pattern dropdown or resets
  the zoom (Processing exits on an unhandled Esc).
- Typing an exact slider value replaces the old value instead of being
  appended to it (800 + "1500" became 8001500, clamped to the maximum);
  this also makes the documented *2, /2, +10 and --10 work. The old
  value is shown selected.
- Strange attractor is drawn as pen dots: joining successive iterates of
  the Clifford / De Jong maps with lines gave a solid tangle instead of
  the attractor. Default iterations raised to 6000.
- Command line: --set works for parameters whose name contains '='
  ("Spacing (0=off)", "Ring gap (0=off)", "Row length (0=auto)", ...).
- Exports and PNG images are written after the layers are regenerated,
  so a change made in the same frame is included.
- PNG proof card: a long caption shrinks instead of running into the
  pen swatches.
- .gitignore covers every export format and batch folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014b7AZSxeUqFN8Y2JERR3pG
@Murphy23x
Murphy23x merged commit ee6b82f into main Nov 7, 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