bambuddy/frontend
maziggy f421bb8160 Show the picked preset's real values in the process-settings panel
The panel baselined every field on the option schema's compiled-in
defaults, so a preset setting a 0.42mm line width displayed 0 -- the C++
default meaning "derive from the nozzle". Every field was affected; the
Line width group just made it obvious.

Bambuddy cannot answer this itself. A standard-tier pick is only an
{inherits: ...} stub on our side, and local/cloud presets are deltas whose
remainder lives in the profile tree bundled inside the running sidecar.
The values now come from the sidecar's POST /profiles/resolve, which runs
the same resolver /slice does against the same profiles, so what the panel
shows cannot disagree with what a slice produces. Deliberately not the
local orca_profiles resolver: it walks OrcaSlicer's published tree, which
can differ from the image actually installed.

An untouched field shows the preset's value and reverting returns to it.
isModified compares against that baseline too, so fields the preset moved
off the C++ default are no longer flagged as user edits, and values nobody
typed are no longer sent. When the values can't be read -- sidecar offline
or older than the endpoint -- the panel falls back to schema defaults and
says so rather than presenting them as the preset's.

Row layout, from screenshots:

- The control column is anchored to the right edge at a fixed width. It
  had been packed left after a fixed label column, leaving the values
  stranded mid-container with dead space beside them.
- Units are no longer truncated to "mm o...". The cap fitted the common
  "mm" but not "mm or %" or "mm/s² or %".
- The "from file" tick moved ahead of the control it qualifies; it used to
  sit past the unit at the row's right edge, reading as unrelated.

Both the unit and the control keep fixed widths, and the tick's slot is
reserved on rows without one -- sizing any of them to content makes each
row's input land at a different x and the column comes out ragged.

Also fixes a field that could not be cleared: emptying a free-text input
dropped the key, so it snapped back to the baseline and retyping appended
to it ("0.42" + "0.5" = "0.420.5"). The number branch was fixed earlier;
the text branch -- coFloatOrPercent, coString, the vector types -- was
not, and the regression test used a number input so it never caught it.

Requires a sidecar built from orca-slicer-api 4b664b7 or later. Older
images 404 the endpoint, which is handled as the fallback above.
2026-08-09 11:02:03 +02:00
..
docs [Fix] Virtual Printer FTP routed to wrong VP with different access codes (#735) 2026-03-18 09:04:31 +01:00
mockups - Refactored printer card's AMS section for better experience 2026-01-01 12:08:55 +01:00
public fix(a2l): transparent printer-card image + getPrinterImage resolver 2026-06-10 11:09:02 +02:00
scripts Sync 2026-08-09 10:00:53 +02:00
src Show the picked preset's real values in the process-settings panel 2026-08-09 11:02:03 +02:00
.gitignore Added screenshots 2025-11-28 10:23:59 +01:00
.npmrc Fix npm audit high-severity minimatch ReDoS (GHSA-3ppc-4f35-3m26) 2026-02-19 08:23:53 +01:00
eslint.config.js Improved frontend tests 2026-01-30 13:02:57 +01:00
index.html fix: unbreak CSP for sidebar iframes, service worker, and Google Fonts 2026-04-13 16:38:17 +02:00
package-lock.json chore(deps): clear every npm audit and pip-audit finding 2026-08-08 13:20:18 +02:00
package.json chore(deps): clear every npm audit and pip-audit finding 2026-08-08 13:20:18 +02:00
postcss.config.js Added screenshots 2025-11-28 10:23:59 +01:00
README.md Added screenshots 2025-11-28 10:23:59 +01:00
tailwind.config.js Add SpoolBuddy tag detection modal and fix NFC reader silent failure 2026-02-28 08:54:39 +01:00
tsconfig.app.json Fix docker build 2025-12-12 16:48:12 +01:00
tsconfig.json Added screenshots 2025-11-28 10:23:59 +01:00
tsconfig.node.json Added screenshots 2025-11-28 10:23:59 +01:00
vite.config.ts fix(frontend): revert base: '' so deep SPA routes load their assets on initial navigation (issue #1221) 2026-05-08 08:39:00 +02:00
vitest.config.ts feat: Centralise sidebar ordering and add page visibility options (#1673) 2026-06-17 12:04:57 +02:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])