Point API client at the deployed service port and clear logging
providers to prevent interference with MCP stdio transport.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display raw inches in parentheses next to the architectural format
in both Parts and Stock tables for easier reference.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap job editor initialization in try/catch to display errors instead of
crashing the circuit. Make LoadSavedResults async. Add a simple Error
page for the production exception handler.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace AddDbContext with AddDbContextFactory for Blazor Server circuit
safety — each service method now creates a short-lived DbContext via the
factory. Configure Windows Service hosting with ContentRootPath and
remove HSTS/HTTPS redirect for reverse-proxy deployment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all project TFMs to net10.0, EF Core to 10.0.4, add
Microsoft.Extensions.Hosting.WindowsServices, and suppress WFO1000
warning for WinForms project.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the single CatalogMaterialDto + CatalogDimensionsDto (bag of nullable
fields) with per-shape DTOs that have strongly-typed dimension properties.
Catalog JSON now groups materials by shape key instead of a flat array.
Delete the old SeedController/SeedDataDtos (superseded by CatalogService).
Scraper updated to emit the new grouped format, resume by default, and
save items incrementally.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch MaterialDimensions inheritance from TPH (single table with discriminator)
to TPC (table per concrete type) with individual tables per shape. Add Swagger
for dev API exploration, expand SeedController with export/import endpoints and
Alro catalog JSON dataset, and include Python scraper for Alro catalog PDFs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Part form now supports adding multiple parts at once via a table with
add/remove row controls; edit mode stays single-row
- Shape and size dropdowns lock when editing an existing part
- Results tab replaces split in-stock/purchase cards with a unified table
per material showing source badges (Stock/Purchase) for each bar
- New Purchase List card summarizes materials to order with quantities
- Print styles use repeating thead headers per material for multi-page
cut lists; large cards can now break across pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the standalone ExportData console app and hardcoded SeedController
with generic GET /api/catalog/export and POST /api/catalog/import endpoints.
Import uses upsert semantics with per-item error handling, preserving
existing inventory quantities.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Export tool queries all active materials, stock items, suppliers, and
offerings from the database and writes a clean JSON file for version
control. Includes 616 materials and 810 stock items with part numbers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add HTTP client methods for job CRUD, parts, stock, packing, and
cutting tool endpoints. Includes response DTOs for all job-related
API responses.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document new Job entity fields, serialization DTOs, JobService
optimization methods, and merged Results tab in Edit page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PowerShell script to publish CutList.Web, register as a Windows
Service with auto-restart on failure, and optionally open firewall.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move optimization results UI from separate Results.razor page into
the Edit.razor tabbed editor. Results are now loaded from saved JSON
on page load instead of re-running on every visit. Remove the
standalone optimize button from Jobs index.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SavedOptimizationResult DTO layer with SerializeResult and
LoadSavedResult methods for JSON round-trip persistence, since
Core types use encapsulated collections that aren't serializable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add OptimizationResultJson and OptimizedAt columns to Job table.
JobService now saves/clears optimization results and auto-clears
stale results when parts, stock, or cutting tool change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Precompute suffix sums of remaining item volumes and use them
to prune branches that cannot beat the current best solution.
Raises DefaultMaxItems from 20 to 25 (~84ms worst case).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comprehensive rewrite covering all three projects, entity definitions,
service APIs, page routes, shared components, and key patterns including
purchase flow and job locking conventions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add "Add to Order List" button on Results page that creates PurchaseItems
from optimization results and locks the job. Add Orders Index page with
tabbed view (Pending/Ordered/All), supplier assignment, status
transitions, and MaterialFilter. Add manual order item creation page.
Add Orders link to navigation menu.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Locked jobs show a warning banner with unlock button on the Edit page.
All form fields, part/stock add/edit/delete buttons are disabled via
fieldset when locked. Jobs Index shows a lock icon badge next to locked
job numbers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PurchaseItem entity with status tracking (Pending/Ordered/Received),
supplier and job relationships. Add LockedAt timestamp to Job entity for
controlling editability after materials are ordered. Includes
PurchaseItemService (CRUD + bulk create), JobService Lock/Unlock methods,
EF Core migrations, and DI registration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The print CSS was hiding all .card elements, which contained the
actual results content. Replaced with compact print-friendly styles:
summary cards display as an inline row, redundant stock summary is
hidden, and spacing is tightened throughout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate MaterialFilter component for filtering by shape,
type, grade, and free-text search. Pagination now reflects
filtered results.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Bootstrap Icons for Edit, Delete, Copy, and Optimize actions
to reduce table column widths and improve visual consistency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate Pager component into Jobs, Materials, Stock, Suppliers,
and Tools index pages with a page size of 25. Handles page
adjustment on delete when the last page becomes empty.
Also removes the Description column from the Materials table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shared Blazor component with page windowing, ellipsis for large
page counts, and "Showing X-Y of Z" summary text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds brief explanatory paragraphs to Jobs, Materials, and Stock index
pages to help users understand each section's purpose.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace default Bootstrap grays with warm off-whites and subtle borders.
Adds consistent styling for cards, forms, headings, and tables.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows importing multiple stock items from inventory at once, matching
against materials already in the job's parts list. Includes select
all/none, quantity, and priority controls.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix two data issues preventing material loading:
- Update MaterialDimensions DimensionType from class names (e.g.
'AngleDimensions') to configured short names (e.g. 'Angle')
- Set empty Material.Type values to 'Steel' and change column default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace direct EF Core/DbContext usage in MCP tools with HTTP calls
to the CutList.Web REST API via new ApiClient. Removes CutList.Web
project reference from MCP, adds Microsoft.Extensions.Http instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add controllers for suppliers, stock items, jobs, cutting tools, and
packing. Refactor MaterialsController to use MaterialService with
dimension-aware CRUD, search, and bulk operations. Extract DTOs into
dedicated files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Disable Shape dropdown on existing materials since changing shape would
require completely different dimension properties.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace inline part form with Bootstrap modal dialog for better UX
- Add SortOrder to material dropdown ordering in Parts and Stock tabs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SortOrder as secondary ordering key after Shape across all material
queries (list_materials, search methods)
- Default material type to "Steel" when not specified in add_stock_with_offering
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
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>
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>
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>
- 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>
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>
- 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>
- 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>
- 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>
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>
- 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>
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>
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>
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>
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>
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>
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>
Adds MaterialsController with bulk import support and SeedController
for development data seeding.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
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>
Adds CRUD methods for managing material stock lengths, including
duplicate checking and quantity tracking.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates ApplicationDbContext to configure MaterialStockLength and
revised ProjectPart relationships.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
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>
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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>
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>
- 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>
Consolidates ArchUnits, FormatHelper, and Fraction classes into a
dedicated Formatting namespace for better organization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
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>
Changes default precision from 1/32" to 1/16" for cleaner measurements and
simplifies output by omitting unnecessary fraction components.
- Change default precision from 32 to 16
- Return whole numbers without "-0/N" suffix when fraction rounds to zero
- Update documentation to reflect new default precision
This makes measurements more readable (e.g., "12" instead of "12-0/16") while
maintaining sufficient precision for typical woodworking applications.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Improves the exported text file format with better organization, visual
hierarchy, and comprehensive summary information.
- Add header with creation timestamp and overall statistics
- Redesign bar sections with clearer labels and formatting
- Replace verbose item format with tabular layout (QTY/Length/Tag)
- Add final summary section with totals and best/worst utilization
- Use Unicode box-drawing characters for visual separation
- Fix namespace references (SawCut.FormatHelper → FormatHelper)
- Add null safety with DefaultIfEmpty for empty bin collections
- Make _bins field readonly for immutability
The new format is more professional and easier to scan visually, making it
simpler for operators to execute the cut list.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements grouping of identical bins (same items in same order) to reduce
visual clutter in the results grid. Instead of showing 10 identical bins as
separate rows, they now appear as a single row with a count.
- Add BinComparer for deep equality comparison of bins
- Add BinGroup to represent grouped bins with count
- Update ResultsForm to display grouped bins in grid
- Add Count column to show how many of each bin pattern
- Maintain original bins list for file export
This improves readability when the optimizer generates multiple identical
cutting patterns.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove redundant Document initialization in MainForm
- Update CutListService to use SetBins method for MultiBinEngine
- Update MultiBinEngine instantiation to follow proper initialization pattern
- Ensure spacing is set after bins are configured
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Generate 25 random parts with lengths between 1-60 inches
- Add one stock bin of 144" with quantity 9999
- Use random quantities between 1-100 for parts
- Clear existing data when requested
- Update run button state after loading
- Add helper method GetRandomLength for generating test data
This completes the MVP pattern migration by moving example data
generation logic from the view to the presenter.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add backing fields for PartsToNest and StockBins collections
- Ensure collections are never null through property setters
- Add read-only views of collections via new properties
- Improve XML documentation
- Make LastFilePath internally settable for better control
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>