Commit Graph
4501 Commits
Author SHA1 Message Date
maziggy 117fe5d764 Report a refused RFID refresh, and fall back to M620 R (#3206)
ams_get_rfid was published and reported as success without reading the
    printer's answer. X1Plus on base 01.08.02.00 answers FAIL / ERROR STATE,
    so the user saw "Refreshing" and the K profile was re-applied to a slot
    that was never read.

    - Wait for the ams_get_rfid answer (matched by sequence_id).
    - On a refusal from an idle X1/P1/A1, send the legacy M620 R<ams*4+slot>
      gcode Bambu Studio uses for those models, AMS units 0-3 only. Never
      during a job, never on newer-protocol models; printers that accept
      ams_get_rfid never see it.
    - Refused: the route returns 400 with the printer's reason and no PA
      re-apply is scheduled. No answer still counts as accepted.
    - Log the answers at INFO so refusals reach support bundles.
2026-10-01 13:04:12 +02:00
maziggy 888f6c4325 Make the {finish_photo_url} link open with authentication on
With authentication on, {finish_photo_url} pointed at the archive photo
    route, which needs a media token. A link tapped in Telegram, CallMeBot
    or a Home Assistant notification has none, so it only ever answered 401.

    _finish_photo_for_notification() now builds the link and the attachment
    bytes. With authentication off the link is the archive URL, unchanged.
    With it on, the photo is also saved through the notification photo
    store from #3199, and the link points there. That is an unguessable
    name that opens this one photo, for 3 days. If the auth check fails,
    it is treated as on. With auth on and the photo missing, no link is
    set rather than one that 401s. Photos over 2.5 MB are still linked but
    not attached, as before.
2026-10-01 13:03:46 +02:00
maziggy d06a741330 Post work PR #3199 2026-10-01 13:02:41 +02:00
maziggy 8c7dcebcc4 Speed up frontend typecheck and lint, and fail test_frontend.sh on any error
tsc -b re-checked every file on every run: the configs named a
    tsBuildInfoFile but never switched incremental on, and with noEmit there
    are no outputs for -b to compare against. Enabling incremental in
    tsconfig.app.json and tsconfig.node.json makes later runs reuse the
    cache (28 s -> 0.5 s when nothing changed).

    eslint ran on one thread with no cache. The lint script now uses
    --concurrency auto and --cache in node_modules/.cache/eslint/
    (42 s -> 14 s on a first run, 1.3 s after that). The config isn't
    type-aware, so the cache is safe.

    test_frontend.sh runs typecheck and lint in parallel, then the tests,
    and exits 1 if any step fails. Before, a type or lint error scrolled
    past and the exit code only reflected the tests.
2026-10-01 13:02:18 +02:00
maziggy 73d10ad65a Add feature: Attach camera snapshots to notifications (issue #3089) (#3199) 2026-10-01 13:01:57 +02:00
maziggy 1400e50a0d Give the two stock alerts something that fires them (issue #2955) (#3196) 2026-10-01 13:01:21 +02:00
maziggy dc80b6a91b Merge commit 'e30db2566ed89e68f3bf9a1a39fe2baf8ff6889e' into 1.2.5.7 2026-10-01 13:00:26 +02:00
maziggy e634550de7 Add "Combine to 3MF" for slicing several STLs on one plate (#3162) 2026-10-01 13:00:10 +02:00
maziggy 1cc4bae5d2 Report a refused RFID refresh, and fall back to M620 R (#3206)
ams_get_rfid was published and reported as success without reading the
printer's answer. X1Plus on base 01.08.02.00 answers FAIL / ERROR STATE,
so the user saw "Refreshing" and the K profile was re-applied to a slot
that was never read.

- Wait for the ams_get_rfid answer (matched by sequence_id).
- On a refusal from an idle X1/P1/A1, send the legacy M620 R<ams*4+slot>
  gcode Bambu Studio uses for those models, AMS units 0-3 only. Never
  during a job, never on newer-protocol models; printers that accept
  ams_get_rfid never see it.
- Refused: the route returns 400 with the printer's reason and no PA
  re-apply is scheduled. No answer still counts as accepted.
- Log the answers at INFO so refusals reach support bundles.
2026-10-01 09:40:00 +02:00
maziggy 919aa69f83 Make the {finish_photo_url} link open with authentication on
With authentication on, {finish_photo_url} pointed at the archive photo
route, which needs a media token. A link tapped in Telegram, CallMeBot
or a Home Assistant notification has none, so it only ever answered 401.

_finish_photo_for_notification() now builds the link and the attachment
bytes. With authentication off the link is the archive URL, unchanged.
With it on, the photo is also saved through the notification photo
store from #3199, and the link points there. That is an unguessable
name that opens this one photo, for 3 days. If the auth check fails,
it is treated as on. With auth on and the photo missing, no link is
set rather than one that 401s. Photos over 2.5 MB are still linked but
not attached, as before.
2026-10-01 09:16:49 +02:00
maziggy ee77704d3e Post work PR #3199 2026-10-01 09:01:49 +02:00
maziggy ae03710c48 Speed up frontend typecheck and lint, and fail test_frontend.sh on any error
tsc -b re-checked every file on every run: the configs named a
tsBuildInfoFile but never switched incremental on, and with noEmit there
are no outputs for -b to compare against. Enabling incremental in
tsconfig.app.json and tsconfig.node.json makes later runs reuse the
cache (28 s -> 0.5 s when nothing changed).

eslint ran on one thread with no cache. The lint script now uses
--concurrency auto and --cache in node_modules/.cache/eslint/
(42 s -> 14 s on a first run, 1.3 s after that). The config isn't
type-aware, so the cache is safe.

test_frontend.sh runs typecheck and lint in parallel, then the tests,
and exits 1 if any step fails. Before, a type or lint error scrolled
past and the exit code only reflected the tests.
2026-10-01 08:58:15 +02:00
Benji 7f64e2ba8b Add feature: Attach camera snapshots to notifications (issue #3089) (#3199) 2026-10-01 08:43:44 +02:00
maziggy ebc089f289 Updated CHANGELOG 2026-10-01 08:30:17 +02:00
Kouki Ojima 318430f0f4 Give the two stock alerts something that fires them (issue #2955) (#3196) 2026-10-01 08:28:12 +02:00
maziggy e30db2566e Post work PR #3162 2026-10-01 08:16:03 +02:00
adman234 b67c9b572c Add "Combine to 3MF" for slicing several STLs on one plate (#3162) 2026-10-01 08:11:19 +02:00
maziggy cdb7deb6c4 Updated CHANGELOG 2026-09-30 16:34:31 +02:00
maziggy e7ca347de4 Start queued jobs in list order, whether pinned or "Any <model>" (#3200) 2026-09-30 16:29:07 +02:00
maziggy 13f1ed5c9a Post work PR #3192 2026-09-30 16:28:53 +02:00
maziggy c3b735b716 Keep the settings rail's icons when a tab label is long (#3192) 2026-09-30 16:28:40 +02:00
maziggy dc1265a678 Post work PR #3184 2026-09-30 16:28:27 +02:00
maziggy 3fe4cedba5 Show resolved filament colour and AMS mapping on queue cards (#3184) 2026-09-30 16:28:15 +02:00
maziggy de47c1a534 Post work PR #3183 2026-09-30 16:28:01 +02:00
maziggy 4d17da7229 Add opt-in portrait and landscape stream overlay artwork (#3183) 2026-09-30 16:27:47 +02:00
maziggy fdf062a64a Add layers, job id, HMS faults and serial to the API-key printer status (#2919) 2026-09-30 16:27:31 +02:00
maziggy e05900d3af Remove leftover Web Push code and the unused pywebpush dependency (#3171) 2026-09-30 16:27:16 +02:00
maziggy 22436a3416 Choose what a spool label shows, preview it, and save it as PNG (#2981, #2980) 2026-09-30 16:26:58 +02:00
maziggy 3c164afa24 Match a Bambu roll to its own product line, not just its colour (issue #2907) (#2944) 2026-09-30 16:26:40 +02:00
maziggy 36a53075ca Updated BACKERS 2026-09-30 16:26:23 +02:00
maziggy 177f136ea3 Resolve LDAP groups on lldap and OpenLDAP (#3197)
lldap and OpenLDAP's memberof overlay omit memberOf from "*", so every
    lldap login fell through to the default group. Request memberOf by name
    when the schema defines it, and on non-AD directories also search the
    directory root for groupOfNames/groupOfUniqueNames entries listing the
    user, since groups often sit outside the user search base and the
    overlay tracks only one group class.

    Also: skip ldap3's anonymous schema read after StartTLS, which AD and
    Samba AD reject, so StartTLS works there; reword a server's StartTLS
    refusal with an LDAPS hint; stop the bundle sanitizer masking part of
    an OID as an IP; skip the sync right after auto-provisioning so the
    default-group warning logs once.
2026-09-30 16:26:10 +02:00
maziggy a26dd51e5a Use the Spoolman spool's own initial_weight as its label weight (#3194)
Spoolman keeps a full spool's net weight on the spool (initial_weight)
    and falls back to the filament's weight, but Bambuddy read only the
    filament, so a 250 g spool of a 1000 g filament showed and synced as
    1000 g. The list, weigh, AMS sync, SpoolBuddy scale, remain-% tracking,
    fill bar and cost now share one lookup. Create writes initial_weight,
    and a label-weight edit writes it instead of patching or duplicating the
    filament. The spool form's cost per kg is converted at the spool's size
    to and from Spoolman's per-spool price.
2026-09-30 16:25:56 +02:00
maziggy 5e5fcbba26 Use the vendor's empty spool weight as tare in Spoolman mode (#3195)
Spoolman resolves a spool's tare from the spool, then the filament, then
    the vendor's empty_spool_weight. Bambuddy skipped the vendor and fell
    back to 250 g, so weighing a spool whose tare was set only on its vendor
    gave the wrong remaining weight. The inventory weigh action, the
    SpoolBuddy scale and the displayed core weight now share one lookup, and
    "keep old weight" on a filament change stamps a vendor-inherited tare.
2026-09-30 16:25:40 +02:00
maziggy b06c9fcfc6 security(frontend): pin brace-expansion to 5.0.12+
Raise the brace-expansion override from ^5.0.9 to ^5.0.12. Earlier
    versions can run out of stack on deeply nested brace groups and take
    quadratic time on the {a},b} rewrite. brace-expansion is a dev-only
    transitive dependency of eslint (through minimatch) and only expands
    the fixed globs in eslint.config.js.
2026-09-30 16:25:19 +02:00
maziggy 3d2f737de2 security(frontend): pin js-yaml to 5.4.1+
Raise the js-yaml override from ^5.2.3 to ^5.4.1. Versions up to 5.4.0
    do not count empty mappings towards maxTotalMergeKeys, so a small YAML
    file can keep the CPU busy for a long time. js-yaml is a dev-only
    transitive dependency of eslint and only parses our own ESLint configs.
2026-09-30 16:25:05 +02:00
maziggy 835049dd43 Map the P-series model codes to the right printers
C11 is the P1P, C12 the P1S, C13 the X1E and N7 the P2S, as the virtual
    printer and a real P1P 3MF already say. The frontend map had them shifted,
    so discovery pre-filled a P1S as a P1P and an X1E as a P2S. The backend
    map read C11/C12 as X1C/X1 and lacked N7, the firmware check sent C13 to
    the P2S line, and the capability lists never matched BL-P001 because
    their lookup strips the dash.

    -----

    Post work PR #3134
2026-09-30 16:24:42 +02:00
maziggy 0f32b71827 fix: display friendly legacy printer model names in stream overlay (#3134) 2026-09-30 16:24:23 +02:00
maziggy 79d210e8e1 Post work PR #3122 2026-09-30 16:24:00 +02:00
maziggy d09f9d8cc1 Sync OIDC provider groups to BamBuddy groups on every login (issue #3107) (#3122) 2026-09-30 16:23:47 +02:00
maziggy a5965cac34 Post work PR #2994 2026-09-30 16:23:33 +02:00
maziggy d30e0e685b Material number as a first-class spool field (#2994) 2026-09-30 16:23:17 +02:00
maziggy 451be985fb Give the Low Filament notification something that fires it (issue #2913) (#2940) 2026-09-30 16:22:49 +02:00
maziggy df9802492c Count camera reconnects in a row, not for the life of the stream 2026-09-30 16:22:34 +02:00
maziggy b5441cd269 Hold an automatic slot unlink until the slot stays empty (issue #3186) 2026-09-30 16:22:22 +02:00
maziggy 383e47ca49 Let number fields be cleared and retyped (issue #3182) 2026-09-30 16:22:07 +02:00
maziggy 4b63362e5a Keep the type check out of npm run build so installs fit in 2 GB (issue #3181) 2026-09-30 16:21:52 +02:00
maziggy 9d3e6d4deb Post work PR #3117 2026-09-30 16:21:36 +02:00
maziggy 2557b13b9a fix(auth): render Remember Me on SSO sign in page when local login is disabled (#2784) (#3117) 2026-09-30 16:21:13 +02:00
maziggy 9b0992d071 Post work PR #2998 2026-09-30 16:21:00 +02:00
maziggy 9ea0ba4d31 Improve spool ID search and AMS assignment (issue #2978) (#2998) 2026-09-30 16:20:46 +02:00