Commit Graph

151 Commits

Author SHA1 Message Date
30071469bc chore: Add Claude Code project configuration
Add .claude directory with settings and memory files for
consistent AI-assisted development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:38:33 -05:00
c9a2583f26 feat: Add MCP inventory management tools
Add comprehensive MCP tools for inventory management:
- list_suppliers, add_supplier
- list_materials, add_material, search_materials
- list_stock_items, add_stock_item
- list_supplier_offerings, add_supplier_offering
- add_stock_with_offering (convenience method)

Features:
- Dimension-based material search with tolerance
- Auto-generate size strings from dimensions
- Parse size strings to typed dimensions
- Type/Grade support for material categorization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:38:27 -05:00
0e5b63c557 refactor: Update controllers for new Material model
MaterialsController:
- Update to use MaterialShape enum
- Add Type and Grade to imports
- Fix display name formatting

SeedController:
- Update seed data to use MaterialShape enum
- Add MaterialType assignments

CuttingTool:
- Add Notes property

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:38:21 -05:00
6388e003d3 feat: Update UI for Jobs and enhanced Materials
Navigation:
- Rename Projects to Jobs in NavMenu
- Add new icon for multi-material boxes

Home page:
- Update references from Projects to Jobs

Materials pages:
- Add Type and Grade columns to index
- Shape-specific dimension editing with typed inputs
- Error handling with detailed messages

Stock pages:
- Show Shape, Type, Grade, Size columns
- Display QuantityOnHand with badges

Shared components:
- LengthInput: Add nullable binding mode for optional dimensions
- LengthInput: Format on blur for better UX
- CutListReport: Update for Job model references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:38:15 -05:00
c5da5dda98 feat: Update service layer for new data model
MaterialService:
- Include Dimensions in queries
- Add CreateWithDimensionsAsync for typed dimension creation
- Add UpdateWithDimensionsAsync with optional size regeneration
- Add dimension search methods by value with tolerance
- Sort by SortOrder for numeric ordering

StockItemService:
- Add stock transaction methods (AddStock, UseStock, AdjustStock)
- Add GetAverageCost and GetLastPurchasePrice for costing
- Add GetTransactionHistory for audit

CutListPackingService:
- Update to use JobPart instead of ProjectPart
- Support job-specific stock (JobStock) with priorities
- Fall back to all available stock when no job stock configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:38:06 -05:00
21cddb22c7 chore: Remove deprecated Project entities and pages
Remove files superseded by the Job model:
- Project, ProjectPart entities (replaced by Job, JobPart, JobStock)
- ProjectService (replaced by JobService)
- Projects UI pages (replaced by Jobs pages)
- MaterialStockLength entity (consolidated into StockItem)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:37:57 -05:00
3b036308c8 refactor: Update Material and StockItem entities
Material entity changes:
- Shape property now uses MaterialShape enum
- Add Type (MaterialType) and Grade properties
- Add SortOrder for numeric sorting
- Add Dimensions navigation property (1:1)
- Replace ProjectParts with JobParts collection

StockItem entity changes:
- Add QuantityOnHand for inventory tracking
- Add Notes field
- Add Transactions navigation property

DbContext updates:
- Configure MaterialDimensions TPH inheritance
- Add enum-to-string conversions for MaterialShape and MaterialType
- Configure shared column names for TPH properties
- Add indexes on primary dimension columns
- Update all entity relationships for Job model

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:37:51 -05:00
4f6d986dc9 feat: Add material dimensions with typed properties
Implement TPH inheritance for material dimensions:
- MaterialShape enum with display names and parsing
- MaterialType enum (Steel, Aluminum, Stainless, etc.)
- MaterialDimensions base class with derived types per shape
- Auto-generate size strings from typed dimensions
- SortOrder field for numeric dimension sorting

Each shape has specific dimension properties:
- RoundBar: Diameter
- RoundTube: OuterDiameter, Wall
- FlatBar: Width, Thickness
- SquareBar/Tube: Size, Wall
- RectangularTube: Width, Height, Wall
- Angle: Leg1, Leg2, Thickness
- Channel: Height, Flange, Web
- IBeam: Height, WeightPerFoot
- Pipe: NominalSize, Wall, Schedule

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:37:43 -05:00
254066c989 feat: Add stock transaction tracking system
- Add StockTransaction entity for audit trail
- Track received, used, adjusted, scrapped, and returned stock
- Include unit price tracking for cost analysis
- Link transactions to jobs and suppliers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:37:31 -05:00
ce14dd50cb refactor: Rename Project to Job with enhanced model
Rename the Project concept to Job for clarity:
- Add Job, JobPart, JobStock entities
- JobStock supports both inventory stock and custom lengths
- Add JobNumber field for job identification
- Add priority-based stock allocation for cut optimization
- Include Jobs UI pages (Index, Edit, Results)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:37:24 -05:00
dfc767320a fix: Improve architectural unit parsing and formatting
- Add fallback to parse plain decimal inches without unit symbols
- Fix fraction-only display to show "1/2" instead of "0-1/2"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:37:15 -05:00
5cc088ea6b feat: Add Stock Items UI and update Supplier offerings
- Add Stock Items index page listing all stock items
- Add Stock Items edit page with supplier offerings management
- Update Suppliers edit page to manage offerings (select from stock
  items instead of material+length)
- Add Stock Items navigation link to sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:32:32 -05:00
6797d1e4fd feat: Update service layer for new stock model
- Add StockItemService for CRUD operations on stock items
- Update SupplierService to manage SupplierOfferings instead of
  SupplierStock (GetOfferingsForSupplierAsync, AddOfferingAsync, etc.)
- Update CutListPackingService to use StockItems for available lengths
- Register StockItemService in Program.cs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:32:25 -05:00
c4fc88f7d2 chore: Add migration for StockItem and SupplierOffering
Migration drops SupplierStocks table and creates StockItems and
SupplierOfferings tables with appropriate indexes and foreign keys.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:32:20 -05:00
9929d82768 refactor: Replace SupplierStock with StockItem/SupplierOffering model
- Remove SupplierStock entity
- Update Material navigation from SupplierStocks to StockItems
- Update Supplier navigation from Stocks to Offerings
- Update ApplicationDbContext with new DbSets and configurations
- Add unique constraints: StockItem(MaterialId, LengthInches) and
  SupplierOffering(SupplierId, StockItemId)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:32:14 -05:00
0ded77ce8b feat: Add StockItem and SupplierOffering entities
Introduce new data model that separates stock catalog (StockItem) from
supplier-specific pricing/catalog info (SupplierOffering). StockItem
represents a Material+Length combination, while SupplierOffering links
suppliers to stock items with part numbers, descriptions, and pricing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:32:07 -05:00
8e73d630d5 chore: Change development port to 5009
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:57:13 -05:00
079f5b1085 style: Update sidebar color and optimize print layout
Changes sidebar gradient to neutral gray and adds compact print styles
for better paper usage when printing reports.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:57:02 -05:00
97fa90357b fix: Minor UI improvements to layout and LengthInput
Removes unnecessary top row link and adds default placeholder to
LengthInput component.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:56:47 -05:00
bf6c4764ed feat: Add custom print title JS function
Adds printWithTitle function to set document title before printing for
better file naming when saving as PDF.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:56:37 -05:00
ed911a13ba feat: Redesign Results page for multi-material output
Updates Results page to display packing results grouped by material,
showing in-stock vs. to-be-purchased breakdown with order summaries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:56:28 -05:00
c99de55fe1 feat: Update Project pages for multi-material parts
Redesigns Project Edit with a tabbed interface and adds material
selection (shape -> size) when adding parts. Updates Index to show
customer instead of material.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:56:19 -05:00
8b16cbd79f feat: Add stock lengths management UI to Material Edit page
Extends the Material Edit page with a side panel to manage available
stock lengths, including quantity tracking and CRUD operations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:56:06 -05:00
cad5ab790a chore: Register API controllers in Program.cs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:55:57 -05:00
f8020549fe feat: Add REST API controllers for materials
Adds MaterialsController with bulk import support and SeedController
for development data seeding.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:55:48 -05:00
66ed19a1ac feat: Implement multi-material packing with inventory awareness
Refactors CutListPackingService to:
- Pack parts grouped by material type
- Distinguish between in-stock and to-be-purchased bins
- Use material stock lengths for finite inventory
- Use supplier stock for unlimited purchase options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:55:38 -05:00
051b866c6d refactor: Remove stock bin management from ProjectService
Removes project-level stock bin methods since stock is now derived from
material stock lengths. Updates queries to include Material on parts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:55:28 -05:00
3d80adbfff feat: Add stock length management to MaterialService
Adds CRUD methods for managing material stock lengths, including
duplicate checking and quantity tracking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:55:18 -05:00
b7b98d4338 chore: Update DbContext for new entity relationships
Updates ApplicationDbContext to configure MaterialStockLength and
revised ProjectPart relationships.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:55:07 -05:00
ced272d3e3 feat: Support multi-material project parts
Each project part now references its own material, allowing a single
project to use multiple material types. Removes ProjectStockBin entity
since stock is now derived from material stock lengths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:54:59 -05:00
35b26e673e feat: Add Customer field to Project entity
Adds a customer name field to projects for better job tracking and
identification on reports.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:54:48 -05:00
cca569ae81 feat: Add MaterialStockLength entity for inventory tracking
Introduces a new entity to track available stock lengths per material,
enabling in-stock vs. purchase-needed distinction during optimization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:54:23 -05:00
fa36d82285 feat: Add material shape dropdown and Save As button to MainForm
UI improvements:
- Add material shape dropdown (Round Tube, Square Tube, Angle, etc.)
- Add Save As toolbar button for saving to a new file
- Simplify toolbar button styling (show text with icons)
- Expose SelectedMaterialShape property for report generation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:56:42 -05:00
b0c9470bb7 feat: Add cut method and material shape to saved reports
Include cutting tool name and material shape in the text report output.
This provides better context when reviewing saved cut lists.

Changes:
- BinFileSaver: Add CutMethod and MaterialShape properties
- ResultsForm: Pass cut method and material to file saver
- IMainView: Extend ShowResults with additional parameters
- MainFormPresenter: Use document name for save filename if available

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:56:33 -05:00
9868df162d feat: Add CutList.Web Blazor Server application
Add a new web-based frontend for cut list optimization using:
- Blazor Server with .NET 8
- Entity Framework Core with MSSQL LocalDB
- Full CRUD for Materials, Suppliers, Projects, and Cutting Tools
- Supplier stock length management for quick project setup
- Integration with CutList.Core for bin packing optimization
- Print-friendly HTML reports with efficiency statistics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:56:21 -05:00
6db8ab21f4 feat: Improve document management with Save/Save As and keyboard shortcuts
- Track file path after save/load so Save doesn't prompt again
- Add Save As (Ctrl+Shift+S) to always prompt for location
- Update window title to show current filename
- Generate incremental default filenames (CutList_1.json, etc.)
- Add keyboard shortcuts: Ctrl+S (Save), Ctrl+O (Open), Ctrl+N (New)
- Enter key in items grid moves to Length column on next row

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 16:20:59 -05:00
b19ecf3610 refactor: Redesign nesting engines with pipeline pattern and add exhaustive search
- Rename Result to PackResult to avoid confusion with Result<T>
- Add PackingRequest as immutable configuration replacing mutable engine state
- Add PackingStrategy enum (AdvancedFit, BestFit, Exhaustive)
- Implement pipeline pattern for composable packing steps
- Rewrite AdvancedFitEngine as stateless using pipeline
- Rewrite BestFitEngine as stateless
- Add ExhaustiveFitEngine with symmetry breaking for optimal solutions
  - Tries all bin assignments to find minimum bins
  - Falls back to AdvancedFit for >20 items
  - Configurable threshold via constructor
- Update IEngine/IEngineFactory interfaces for new pattern
- Add strategy parameter to MCP tools

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:16:40 -05:00
6e8469be4b refactor: Extract duplicate code in MainForm and CutListTools
Consolidate duplicate logic to reduce code smells identified by Roslyn Bridge:
- Extract FlushPendingEdits() helper from Save() and Run() methods
- Simplify ClearData() to delegate to LoadDocumentData()
- Extract ConvertParts(), ConvertStockBins(), RunPackingAlgorithm() helpers
- Move DTO classes to separate Models.cs file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:18:23 -05:00
046976c429 refactor: Replace hash code magic number with named constant
Add HashMultiplier constant to BinComparer, BinItem, MultiBin, and Tool

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:07:52 -05:00
4d208f6411 feat: Add CutList.Mcp project for MCP server integration
Add new MCP (Model Context Protocol) server project that exposes cut
list optimization tools for AI assistants. Implements tools for:
- create_cutlist: Optimized bin packing with parts and stock bins
- parse_length: Parse architectural format to decimal inches
- format_length: Format inches to feet/inches/fractions
- create_cutlist_report: Generate formatted printable text report

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:11:22 -05:00
88d67336d9 refactor: Relocate BinFileSaver to CutList.Core with report generation
Move BinFileSaver from CutList/Services to CutList.Core namespace for
reuse by MCP server. Add GenerateReport() method that returns formatted
text instead of only writing to file. Refactor to use TextWriter base
class for flexibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:11:12 -05:00
04494a6744 chore: Remove unused using statements
Cleanup of unnecessary imports across the codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:08:49 -05:00
410b4ba550 chore: Regenerate MainForm designer files
Designer-generated changes from Visual Studio, includes updated
control sizing and removal of duplicate metadata entries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:08:11 -05:00
3ee3ba7556 refactor: Update using statements for relocated types
Updates imports across the codebase to reference the new namespaces
for Formatting utilities, Document, BinFileSaver, and Toolbox.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:07:59 -05:00
8bbab7beda fix: Allow empty or null names for BinItem
Removes validation that required non-empty item names, as parts
may legitimately have no label assigned.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:07:48 -05:00
9abda896ea refactor: Relocate Document, BinFileSaver, and Toolbox to proper folders
- Move Document.cs from Forms to Models namespace
- Move BinFileSaver.cs and Toolbox.cs from Forms to Services namespace
- Better separation of concerns between UI and business logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:07:37 -05:00
4f6854baf8 refactor: Move formatting utilities to CutList.Core.Formatting namespace
Consolidates ArchUnits, FormatHelper, and Fraction classes into a
dedicated Formatting namespace for better organization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:07:25 -05:00
7071068e5a Add CLAUDE.md for Claude Code guidance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:56:11 -05:00
f25e31698f Rename SawCut library to CutList.Core
Rename the core library project from SawCut to CutList.Core for consistent
branding across the solution. This includes:
- Rename project folder and .csproj file
- Update namespace from SawCut to CutList.Core
- Update all using statements and project references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:31:30 -05:00
AJ
c612a40a46 Fix example data dialog to respect 'No' response
Previously, clicking "No" in the confirmation dialog would still proceed to
load example data. Now both Cancel and No properly abort the operation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 18:04:17 -05:00