Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
210657d
Implement new Fixed mode
luc-github Nov 11, 2026
7504d15
Refactor: mutualize panel shell, parametrize Jog SVG, dedupe MixedExt…
luc-github Nov 12, 2026
203f4e0
New Probe UI
luc-github Nov 13, 2026
863d270
Fix Tool change panel layout, empty toasts, and improve grblHAL simul…
luc-github Nov 14, 2026
28b70b4
Update .gitignore
luc-github Nov 14, 2026
042f8db
Implement common tool change flow (WebUI/pendant flow alignment)
luc-github Nov 14, 2026
14f8544
Refactor preferences internals and add HTTPS support for dev
luc-github Nov 14, 2026
74ed24c
Keep a single internal representation for preferences lists
luc-github Nov 14, 2026
11a25f7
Share the MachineSettings entry validation across targets
luc-github Nov 15, 2026
585f4c9
Replace eval() in connectionDepend with a small expression parser
luc-github Nov 15, 2026
b5a8a80
Extract the extension bridge from areas/index.js, share panels order …
luc-github Nov 15, 2026
e264792
Split the dashboard page into focused modules
luc-github Nov 15, 2026
bdfd9b5
Split the files panel and fix the grblHAL mock web root
luc-github Nov 15, 2026
94c136c
Update sizes tracker
luc-github Nov 15, 2026
307dbfd
Rework fixed canvas layout and unify panel drag & drop
luc-github Nov 15, 2026
48db159
Rework fixed canvas layout, unify panel drag & drop, fix pack scanners
luc-github Nov 16, 2026
233302f
Fix wss on https pages and add Caddy-based secure dev mode
luc-github Nov 16, 2026
33189ad
Fix mock auth bugs, configurable HostPath/web root, embedded HostPath…
luc-github Nov 17, 2026
352bd81
Add brotli compressed package generation
luc-github Nov 17, 2026
245e1fa
Remove embedded as now it has it own repository
luc-github Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ repomix-output.xml
generate-context.ps1
.env
languages/backup/
build_analysis/*
test/out/
31 changes: 31 additions & 0 deletions config/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# HTTPS front for the dev/mock servers (test https / wss / br behaviour)
# Started by `npm run dev-xxx secure` (see config/dev.js), or by hand:
# caddy run --config config/Caddyfile
# - https://localhost:8443 -> webpack dev server 8088 (dev bundle)
# - https://localhost -> same, on default port 443 (http://localhost redirects)
# - https://localhost:8445 -> mock HTTP server 8080 (Flash/index.html.br or .gz)
# - wss://localhost:8444 -> mock WebSocket server 8089
# (the mock reports WebSocketPort 8444 when WS_PUBLIC_PORT=8444)
# Caddy uses its local CA and installs it in the Windows trust store on first
# run (confirm the Windows dialog), so no certificate warning in Chrome/Edge.
{
local_certs
}

https://localhost:8443 {
reverse_proxy localhost:8088
}

# Default port (443), like a real HTTPS reverse proxy without port in the URL.
# Caddy also listens on 80 and redirects http://localhost to https://localhost.
https://localhost {
reverse_proxy localhost:8088
}

https://localhost:8444 {
reverse_proxy localhost:8089
}

https://localhost:8445 {
reverse_proxy localhost:8080
}
111 changes: 111 additions & 0 deletions config/build-icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/**
* Regenerates src/components/Icons/index.js: scans src/ for imports from
* "preact-feather" (aliased to the local registry at build time) and
* embeds only the SVG children data of the icons actually used.
* Run: node config/build-icons.js (after adding/removing an icon import)
*/
const fs = require("fs")
const path = require("path")

const SRC = path.join(__dirname, "..", "src")
const FEATHER = path.join(
__dirname,
"..",
"node_modules",
"preact-feather",
"dist",
"icons"
)
const OUT = path.join(SRC, "components", "Icons", "index.js")

const walk = (dir, out = []) => {
for (const f of fs.readdirSync(dir)) {
const p = path.join(dir, f)
if (fs.statSync(p).isDirectory()) walk(p, out)
else if (/\.[jt]sx?$/.test(f)) out.push(p)
}
return out
}

const used = new Set()
const importRe = /import\s*\{([^}]*)\}\s*from\s*["']preact-feather["']/g
for (const f of walk(SRC)) {
const txt = fs.readFileSync(f, "utf8")
let m
while ((m = importRe.exec(txt))) {
m[1].split(",")
.map((s) => s.trim())
.filter(Boolean)
.forEach((n) => used.add(n.split(" as ")[0].trim()))
}
}

const byNorm = {}
for (const f of fs.readdirSync(FEATHER).filter((f) => f.endsWith(".js")))
byNorm[f.replace(/\.js$/, "").replace(/-/g, "")] = f

const entries = []
for (const name of [...used].sort()) {
const file = byNorm[name.toLowerCase()]
if (!file) throw new Error("Icon not found in preact-feather: " + name)
const src = fs.readFileSync(path.join(FEATHER, file), "utf8")
const children = [...src.matchAll(/h\("(\w+)", (\{[^{}]*\})\)/g)].map(
(mm) => [mm[1], mm[2]]
)
if (!children.length)
throw new Error("No SVG children parsed for " + name)
entries.push({ name, children })
}

const header = `/*
index.js - ESP3D local icon set (drop-in replacement for preact-feather)

Icon path data derived from Feather Icons (https://feathericons.com, MIT License).
A single shared SVG wrapper + per-icon child table, instead of one full
Preact component per icon, to reduce bundle size.

GENERATED FILE - regenerate with: node config/build-icons.js
*/
import { h } from "preact"

const makeIcon = (children) => {
const Icon = (props) => {
const { color, size, ...rest } = props || {}
return h(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
width: size || 24,
height: size || 24,
viewBox: "0 0 24 24",
fill: "none",
stroke: color || "currentColor",
"stroke-width": "2",
"stroke-linecap": "round",
"stroke-linejoin": "round",
...rest,
},
children.map(([tag, attrs]) => h(tag, attrs))
)
}
return Icon
}

`

let out = header
for (const e of entries) {
const kids = e.children
.map(
([t, a]) =>
"[" +
JSON.stringify(t) +
", " +
a.replace(/\s+/g, " ").replace(/\{ /g, "{").replace(/ \}/g, "}") +
"]"
)
.join(",")
out += "export const " + e.name + " = /*#__PURE__*/ makeIcon([" + kids + "])\n"
}
fs.writeFileSync(OUT, out)
console.log("Generated", OUT, "-", entries.length, "icons")
11 changes: 5 additions & 6 deletions config/buildlangpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
Copyright (c) 2021 Luc Lebosse. All rights reserved.

This code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
version 3 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with This code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
General Public License for more details.
You should have received a copy of the GNU General Public
License along with This code; if not, see <https://www.gnu.org/licenses/>.
*/
const chalk = require("chalk")
const path = require("path")
Expand Down
11 changes: 5 additions & 6 deletions config/buildtemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
Copyright (c) 2021 Luc Lebosse. All rights reserved.

This code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
version 3 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with This code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
General Public License for more details.
You should have received a copy of the GNU General Public
License along with This code; if not, see <https://www.gnu.org/licenses/>.
*/
const chalk = require("chalk")
const path = require("path")
Expand Down
11 changes: 5 additions & 6 deletions config/checkpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
Copyright (c) 2021 Luc Lebosse. All rights reserved.

This code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
version 3 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with This code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
General Public License for more details.
You should have received a copy of the GNU General Public
License along with This code; if not, see <https://www.gnu.org/licenses/>.
*/
const chalk = require("chalk")
const path = require("path")
Expand Down
107 changes: 107 additions & 0 deletions config/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
* Dev launcher: mock server + webpack dev server (+ Caddy HTTPS front)
*
* node config/dev.js <Target> <Subtarget> [secure] [auth] [root=<subdir>]
* npm run dev-cnc-grblhal -> http://localhost:8088
* npm run dev-cnc-grblhal secure -> https://localhost:8443
* npm run dev-cnc-grblhal auth -> mock with authentication (admin/admin)
* npm run dev-cnc-grblhal root=www -> override the target webRoot
* (HostPath simulation, fixtures must
* exist under server/<T>/<S>/Flash/www)
*
* secure mode needs Caddy (https://caddyserver.com, `winget install CaddyServer.Caddy`):
* https://localhost:8443 -> webpack dev server 8088 (dev bundle)
* https://localhost:8445 -> mock server 8080 (packaged Flash/index.html.br|.gz)
* wss://localhost:8444 -> mock WebSocket 8089
* The mock then reports WebSocketPort 8444, so the plain http:// URLs do not
* get a working WebSocket in this mode.
*/
const { spawn, spawnSync } = require("child_process")
const path = require("path")
const fs = require("fs")

const args = process.argv.slice(2)
const secure = args.includes("secure")
const auth = args.includes("auth")
const rootArg = args.find((a) => a.startsWith("root="))
const [target = "Printer3D", subtarget = "Marlin"] = args.filter(
(a) => a !== "secure" && a !== "auth" && !a.startsWith("root=")
)

const env = {
...process.env,
TARGET_ENV: target,
SUBTARGET_ENV: subtarget,
}
if (auth) env.AUTH = "1"
//root=<subdir> overrides the target webRoot AND the HostPath reported by
//ESP800 - normalized here so targets can use it as-is
if (rootArg) {
let w = rootArg.substring("root=".length)
if (!w.startsWith("/")) w = "/" + w
env.WEBROOT = w.replace(/\/+$/, "") || "/"
}

const commands = ['"npm run server"', '"npm run front"']
const names = ["server", "front"]

// Caddy location: CADDY env var, PATH, or the winget install folder (the
// PATH updated by winget is not seen by terminals of an already running VS Code)
function findCaddy() {
const candidates = [process.env.CADDY, "caddy"]
const wingetDir = path.join(
process.env.LOCALAPPDATA || "",
"Microsoft/WinGet/Packages"
)
if (process.env.LOCALAPPDATA && fs.existsSync(wingetDir)) {
fs.readdirSync(wingetDir)
.filter((d) => d.startsWith("CaddyServer.Caddy"))
.forEach((d) => candidates.push(path.join(wingetDir, d, "caddy.exe")))
}
return candidates.find(
(c) =>
c &&
spawnSync(`"${c}"`, ["version"], { shell: true }).status === 0
)
}

if (secure) {
const caddy = findCaddy()
if (!caddy) {
console.error(
"secure mode needs Caddy: winget install CaddyServer.Caddy (or set CADDY=<path to caddy.exe>)"
)
process.exit(1)
}
env.SECURE = "1"
env.WS_PUBLIC_PORT = "8444"
if (caddy !== "caddy") {
// make the found caddy reachable as "caddy" for the child processes
const key =
Object.keys(env).find((k) => k.toUpperCase() === "PATH") || "PATH"
env[key] = path.dirname(caddy) + path.delimiter + (env[key] || "")
}
commands.push('"caddy run --config config/Caddyfile --adapter caddyfile"')
names.push("caddy")
console.log(
"Secure mode: https://localhost or https://localhost:8443 (dev) / https://localhost:8445 (packaged) / wss://localhost:8444"
)
}

const options = [
secure ? "secure" : null,
rootArg ? `webRoot=${env.WEBROOT}` : null,
auth ? "auth (admin/admin)" : null,
].filter(Boolean)
if (options.length) console.log("Options: " + options.join(", "))

const concurrently = path.join(
__dirname,
"../node_modules/.bin/concurrently"
)
const child = spawn(
`"${concurrently}"`,
["--kill-others-on-fail", "--names", names.join(","), ...commands],
{ stdio: "inherit", shell: true, env, cwd: path.join(__dirname, "..") }
)
child.on("exit", (code) => process.exit(code ?? 0))
11 changes: 5 additions & 6 deletions config/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
Copyright (c) 2021 Luc Lebosse. All rights reserved.

This code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
version 3 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with This code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
General Public License for more details.
You should have received a copy of the GNU General Public
License along with This code; if not, see <https://www.gnu.org/licenses/>.
*/
const chalk = require("chalk")
const path = require("path")
Expand Down
Loading
Loading