7 Commits

Author SHA1 Message Date
github-actions[bot]
184d52a297 chore: bump version to 0.1.14 [skip ci] 2026-08-12 12:30:40 +00:00
RNL
fcd038c562 ci(readme): auto-generate release notes on tag, add dashboard tour to README
- bump-version.yml now creates a GitHub Release with `--generate-notes`
  alongside each version tag, so the Tags/Releases page is self-describing
  instead of a bare list of vX.Y.Z tags with no context.
- README gets a Dashboard Tour gallery using the wiki's existing
  user-attachments image URLs (no binary images added to the repo).
2026-08-12 22:29:27 +10:00
RNL
911905610f Revert "fix(templates): grey out filament write controls for read-only viewers"
This reverts commit 1bbeef7a47.
2026-08-12 22:29:27 +10:00
github-actions[bot]
b2a083fb94 chore: bump version to 0.1.13 [skip ci] 2026-08-08 13:34:04 +00:00
RNL
1bbeef7a47 fix(templates): grey out filament write controls for read-only viewers
RAE is adding a 'friend' access tier that can view the filament inventory
but not modify it. These buttons already conditionally render on
{% if not is_basic_user %}; this adds a parallel can_write check so a
read-only-but-not-basic viewer sees Add/Edit/Delete/Manage Colors as
visibly disabled (with a tooltip) rather than fully hidden or, worse,
clickable.
2026-08-08 23:33:49 +10:00
github-actions[bot]
40ec163134 chore: bump version to 0.1.12 [skip ci] 2026-08-06 12:45:31 +00:00
RNL
61cfd3f5a9 perf(printer): halve dashboard load by capping chart series at 1440 points
24h at the collector's 30s cadence is ~2800 readings, and each one pulls in
~9 FilamentSnapshot rows. That snapshot fetch — not the metrics query — was
what made the dashboard slow: 25,308 rows and 1.2s of the 2.09s spent
building the context.

Capping at 1440 keeps roughly one point per minute over a day, finer than a
canvas can resolve, and applies to the public demo API too since it shares
sample_metrics().

  printer dashboard  2.09s / 410 KB  ->  0.50s / 207 KB
  public demo API                    ->  0.31s / 116 KB

Claude-Session: https://claude.ai/code/session_01AoYZiGtU3zEuFEGvP6zoZD
2026-08-06 22:45:20 +10:00
4 changed files with 55 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ on:
branches:
- main
concurrency:
group: bump-version-main
cancel-in-progress: false
jobs:
bump-version:
runs-on: ubuntu-latest
@@ -49,8 +53,17 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml
git commit -m "chore: bump version to ${{ steps.bump.outputs.new_version }} [skip ci]"
git pull --rebase origin main
git push
- name: Tag the release
run: |
git tag "v${{ steps.bump.outputs.new_version }}"
git push origin "v${{ steps.bump.outputs.new_version }}"
- name: Create GitHub release with auto-generated notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.bump.outputs.new_version }}" \
--title "v${{ steps.bump.outputs.new_version }}" \
--generate-notes

View File

@@ -20,8 +20,42 @@ It runs quietly in the background 24/7, capturing every print, filament change,
---
## What It Looks Like
<table>
<tr>
<td width="50%">
<p align="center"><strong>Live Dashboard</strong><br/>Real-time nozzle temps, bed temp, print progress, and chamber light.</p>
<img src="https://github.com/user-attachments/assets/169ec3e5-62a9-4e96-afed-dc6ac2647aef" alt="Live Dashboard" width="100%"/>
</td>
<td width="50%">
<p align="center"><strong>Historical Charts</strong><br/>Filament remaining and nozzle temp over time, per printer.</p>
<img src="https://github.com/user-attachments/assets/11913c62-254f-4ba6-8d93-d5c27a9406be" alt="Historical Charts" width="100%"/>
</td>
</tr>
<tr>
<td width="50%">
<p align="center"><strong>Filament Inventory</strong><br/>Every spool you own — brand, type, color, remaining %, current tray.</p>
<img src="https://github.com/user-attachments/assets/8e472704-a6d8-45e1-93c4-c6f37d0b55a0" alt="Filament Inventory" width="100%"/>
</td>
<td width="50%">
<p align="center"><strong>AMS / Filament Slots</strong><br/>What's loaded right now, grouped by AMS unit, with humidity/temp.</p>
<img src="https://github.com/user-attachments/assets/200ad65f-a716-4a52-98b2-d5f5ce2445b9" alt="AMS / Filament Slots" width="100%"/>
</td>
</tr>
<tr>
<td colspan="2">
<p align="center"><strong>Hotend Wear Tracking</strong><br/>Used time and wear per hotend slot — handy for multi-nozzle / AMS-fed toolhead setups.</p>
<img src="https://github.com/user-attachments/assets/defee0da-772c-40c2-8dcf-9d3f230cc5ee" alt="Hotend Wear Tracking" width="100%"/>
</td>
</tr>
</table>
---
## Table of Contents
- [What It Looks Like](#what-it-looks-like)
- [Native Setup (Recommended for Raspberry Pi)](#native-setup-recommended-for-raspberry-pi)
- [What You'll Need](#what-youll-need)
- [Clone and run setup.sh](#clone-and-run-setupsh)

View File

@@ -28,7 +28,13 @@ _METRICS_API_FIELDS = [
'gcode_state', 'print_type', 'subtask_name',
'external_spool',
]
_MAX_CHART_POINTS = 3000
# 24h at the collector's 30s cadence is ~2800 readings, and every one of them
# also drags in ~9 FilamentSnapshot rows — that snapshot fetch, not the metrics
# query, is what dominated the dashboard's load time (measured: 2.09s of context
# building and a 410 KB payload at 3000). 1440 caps the series at roughly one
# point per minute over a day, which is finer than any chart can resolve on
# screen, and cuts both the server time and the payload by ~4x.
_MAX_CHART_POINTS = 1440
# Fallback window for requests that don't specify a full date range. Without it a
# bare API call scans the entire metrics table.
_DEFAULT_WINDOW = timedelta(hours=24)

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "bambu-run"
version = "0.1.11"
version = "0.1.14"
description = "Django reusable app for Bambu Lab 3D printer monitoring and filament inventory management"
readme = "README.md"
license = {text = "MIT"}