Im frustrated when I have a series of prints planned, with one or more filaments, or a failure and I need to reprint, and I cant remember if Ive decremented the weight for each print.
Solution
Track all spool weight/length adjustments with history.
Update use_spool_weight and use_spool_length to record adjustments
Add optional comment parameter to use endpoints
Add GET /api/v1/spool/{id}/adjustments endpoint
Frontend Changes
Add "Adjustment History" section to spool show page
Add comment field to adjustment dialog
Priority
Medium - requires migration and new table
## Problem
From user feedback:
> Im frustrated when I have a series of prints planned, with one or more filaments, or a failure and I need to reprint, and I cant remember if Ive decremented the weight for each print.
## Solution
Track all spool weight/length adjustments with history.
### New Database Table
**`SpoolAdjustment` in `spoolman/database/models.py`:**
```python
class SpoolAdjustment(Base):
__tablename__ = "spool_adjustment"
id: Mapped[int] = mapped_column(primary_key=True)
spool_id: Mapped[int] = mapped_column(ForeignKey("spool.id", ondelete="CASCADE"))
timestamp: Mapped[datetime] = mapped_column(default=datetime.utcnow)
adjustment_type: Mapped[str] # "weight" or "length"
value: Mapped[float] # Amount adjusted (negative = used, positive = added)
comment: Mapped[Optional[str]]
spool: Mapped["Spool"] = relationship(back_populates="adjustments")
```
### API Changes
- Update `use_spool_weight` and `use_spool_length` to record adjustments
- Add optional `comment` parameter to use endpoints
- Add `GET /api/v1/spool/{id}/adjustments` endpoint
### Frontend Changes
- Add "Adjustment History" section to spool show page
- Add comment field to adjustment dialog
## Priority
Medium - requires migration and new table
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
From user feedback:
Solution
Track all spool weight/length adjustments with history.
New Database Table
SpoolAdjustmentinspoolman/database/models.py:API Changes
use_spool_weightanduse_spool_lengthto record adjustmentscommentparameter to use endpointsGET /api/v1/spool/{id}/adjustmentsendpointFrontend Changes
Priority
Medium - requires migration and new table