Files
bambuddy/frontend
maziggy 4cbbd52aa0 fix(slicer): drop the legacy library:read from the slice gate (#2725)
The desktop handoff accepted library:read alongside read_all/read_own, on
    the reasoning that default groups do not carry it and requiring it would
    lock out Operators and Viewers. The permission grants nothing in that
    position: the slicer-token endpoint gates on
    require_ownership_permission(LIBRARY_READ_ALL, LIBRARY_READ_OWN), and
    neither that dependency nor User.has_permission expands the legacy name,
    so a group holding only library:read gets a 403 there. It cannot reach
    the File Manager to try, either - GET /library/folders gates on the same
    pair - and the library:read -> library:read_own migration in
    core/database.py runs only over the groups named in DEFAULT_GROUPS, so a
    custom role that still carries it stays stuck rather than being upgraded.
    custom role that still carries it stays stuck rather than being upgraded.

    Accepting it only enabled a menu item the server refuses, and the failure
    is indistinguishable from "no slicer installed" once the catch hands the
    unauthenticated URL over. Removed, with the comment recording the reason
    so the next reader does not re-add it, and a test that pins it.

    ---

    refactor(slicer): share one sliceable-file-type rule (#2725)

    The File Manager and the 3D preview decide the same thing about the same
    file and each held its own list of extensions - which is how they came to
    disagree, offering a desktop handoff for an STL whose own preview showed
    "Open in Slicer" greyed out. Making the two lists identical fixed the
    symptom and left the drift, so SLICEABLE_FILE_TYPES now lives in
    utils/slicer.ts with isSliceableFileType for a stored file_type and
    isSliceableFilename for a name.

    The filename form still rules out the compound extensions explicitly,
    since .gcode.3mf ends with .3mf; the type form does not need to, because
    classify_file_type stores that one whole.

    Both test files mocked the whole slicer module, which would have replaced
    the new predicates with undefined - switched to importOriginal so only
    openInSlicer is stubbed. That is the better shape regardless: the tests
    now exercise the rule the component runs instead of a copy declared
    beside them.

    Carries the rebuilt bundle. The CSS hash moves with it - the split button
    introduces Tailwind classes the previous build had no reason to emit.
2026-08-15 14:21:17 +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...
    },
  },
])