Files
bambuddy/backend
maziggy 7fa27f83e1 Let a print with no 3MF be given its filament weight (issue #1820)
When the sliced file stays somewhere Bambuddy cannot read, the archive is
    built from the printer's report alone and carries no weight. Nothing could
    supply one afterwards: rescan reads the figure out of the 3MF, and that
    archive has no file to read. The reporter's H2S print left 46.16 g on the
    spool with nothing recording it, and he corrected Spoolman by hand.

    Edit Archive now has a Filament used (g) field. It is written to the
    archive's most recent run as well, because the Projects roll-up and the
    Prometheus counter sum PrintLogEntry rather than the cards - correcting
    only the archive would fix the display and leave every aggregate reading
    the old figure, or none at all.

    But not over a figure the run measured for itself. A run's grams come from
    the tracked spool delta when there is one and only fall back to copying
    the archive's estimate when there is not, so mirroring unconditionally
    would overwrite a measurement with a typed estimate. The mirror now takes
    a run that has no figure, or one holding exactly what this archive held -
    which also makes the undo complete, since clearing the archive clears the
    copy it made and leaves a measured run alone.

    The field is text rather than a number input. A number input reports an
    empty string for anything the browser judges malformed, a decimal comma in
    a locale that does not expect one included, and that reads here as "the
    user cleared it" - it would have wiped a good figure while the field still
    showed what was typed. Filtering on the way in keeps what is displayed and
    what would be sent the same string, and clamps it to the range the API
    accepts: this modal has no error surface, so a refused save looks like
    nothing happened at all.

    Saving also invalidates the archive's runs query. The Print Log this modal
    renders at its top reads them separately and kept serving the pre-edit row,
    so a correction looked like it had not taken - true for the status and
    failure-reason mirrors since #1444 as well.

    Second half of the same report: the internal-storage probe (#2856) logged
    which file it found but not where. On a printer that keeps uploads for
    weeks - the reporter has months of them in /cache - a reprint of a name
    that was re-sliced but never re-sent can match an older copy, and without
    the directory that mismatch is invisible rather than merely rare. The
    download helper returns the path that served the file instead of a bare
    flag; every caller only ever tested it for truth.
2026-08-19 09:31:20 +02:00
..