Skip to content

Commit 8d3425b

Browse files
committed
2 parents 80e1098 + eaaf948 commit 8d3425b

File tree

3 files changed

+109
-6
lines changed

3 files changed

+109
-6
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Describe the bug
10+
<!-- A clear and concise description of what the bug is -->
11+
12+
## To Reproduce
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Enter dimensions '...'
16+
3. Select printer '...'
17+
4. Click on '...'
18+
5. See error
19+
20+
## Expected behavior
21+
<!-- A clear and concise description of what you expected to happen -->
22+
23+
## Actual behavior
24+
<!-- What actually happened instead -->
25+
26+
## Screenshots
27+
<!-- If applicable, add screenshots to help explain your problem -->
28+
29+
## Configuration
30+
<!-- Please provide the following information -->
31+
- Drawer dimensions: [e.g., 22.5" x 16.5" x 3"]
32+
- Unit system: [inches/millimeters]
33+
- Printer selected: [e.g., Prusa MK3S+, Custom]
34+
- Custom printer dimensions (if applicable): [e.g., 250mm x 210mm x 210mm]
35+
- Half-size bins enabled: [yes/no]
36+
- Number of drawers: [e.g., 1]
37+
38+
## Browser Information
39+
<!-- Please complete the following information -->
40+
- Browser: [e.g., Chrome, Firefox, Safari]
41+
- Version: [e.g., 120.0]
42+
- Operating System: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
43+
44+
## Console Errors
45+
<!-- If there are any errors in the browser console, please paste them here -->
46+
```
47+
Paste any console errors here
48+
```
49+
50+
## Additional context
51+
<!-- Add any other context about the problem here -->

.github/pull_request_template.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## Description
2+
<!-- Provide a brief description of the changes in this PR -->
3+
4+
## Type of Change
5+
<!-- Mark the relevant option with an "x" -->
6+
- [ ] Bug fix (non-breaking change which fixes an issue)
7+
- [ ] New feature (non-breaking change which adds functionality)
8+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
9+
- [ ] Documentation update
10+
- [ ] Performance improvement
11+
- [ ] Code refactoring
12+
13+
## Related Issue
14+
<!-- Link to the issue this PR addresses, if applicable -->
15+
Fixes #(issue number)
16+
17+
## Changes Made
18+
<!-- List the specific changes made in this PR -->
19+
-
20+
-
21+
-
22+
23+
## Testing
24+
<!-- Describe the tests you ran to verify your changes -->
25+
- [ ] All existing tests pass
26+
- [ ] Added new tests for new functionality
27+
- [ ] Tested manually in browser
28+
- [ ] Tested with different drawer dimensions
29+
- [ ] Tested with custom printer settings
30+
- [ ] Tested with half-size bins enabled/disabled
31+
32+
## Screenshots
33+
<!-- If applicable, add screenshots to help explain your changes -->
34+
35+
## Checklist
36+
<!-- Mark completed items with an "x" -->
37+
- [ ] My code follows the project's code style guidelines
38+
- [ ] I have performed a self-review of my code
39+
- [ ] I have commented my code, particularly in hard-to-understand areas
40+
- [ ] I have made corresponding changes to the documentation
41+
- [ ] My changes generate no new warnings
42+
- [ ] I have added tests that prove my fix is effective or that my feature works
43+
- [ ] New and existing unit tests pass locally with my changes
44+
- [ ] I have used `unitMath` service for all calculations (no native JS math operations)
45+
- [ ] I have used `@/` import paths consistently

CLAUDE.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Gridfinity Space Optimizer is a React-based web application for calculating optimal Gridfinity storage system layouts. It helps users determine the best configuration of Gridfinity bins to fit their drawer dimensions and 3D printer build volumes.
88

9-
## Recent Major Changes (Updated: Current Session)
9+
## Recent Major Changes (Updated: August 2025)
1010

1111
### ✅ MathJS Integration for Precision
1212
- **CRITICAL**: All calculations now use `unitMath` service (`src/services/unitMath.ts`) for BigNumber precision
@@ -29,7 +29,7 @@ Gridfinity Space Optimizer is a React-based web application for calculating opti
2929
- ✅ All test files migrated to TypeScript
3030
- ✅ Type definitions created for all core data structures
3131
- ✅ ESLint configured for TypeScript support
32-
- ✅ All 168 tests passing
32+
- ✅ All 187 tests passing
3333
- All console.log statements removed from production code
3434
- Import paths standardized to use `@/` alias consistently
3535
- ESLint configuration supports both TypeScript and JavaScript
@@ -67,7 +67,7 @@ npm run preview
6767
- **React Router** - Single-page routing
6868
- **Tailwind CSS** - Utility-first styling
6969
- **Shadcn/ui** - Component library built on Radix UI primitives
70-
- **React Query** - Server state management
70+
- **React Query** - Server state management (installed but not actively used)
7171
- **MathJS** - Arbitrary precision arithmetic
7272

7373
### Application Structure
@@ -94,6 +94,7 @@ The app follows a standard React SPA pattern with component-based architecture:
9494
- `PrinterSettings.tsx` - 3D printer selection with predefined build volumes
9595
- `BinOptions.tsx` - Toggle for half-size bin preferences
9696
- `DrawerOptions.tsx` - Number of identical drawers
97+
- `CustomPrinterDialog.tsx` - Dialog for entering custom printer dimensions
9798

9899
3. **Results Display**
99100
- `GridfinityResults.tsx` - Shows calculated bin quantities
@@ -138,7 +139,7 @@ Uses Shadcn/ui components (`src/components/ui/`) - pre-built accessible componen
138139
- **Testing**: Vitest test framework with React Testing Library
139140
- Run tests: `npm test`
140141
- Update snapshots: `npx vitest --run -u`
141-
- 168 tests currently passing
142+
- 187 tests currently passing
142143
- ESLint configured for TypeScript/TSX and JavaScript/JSX with max warnings set to 0
143144
- Development server runs on port 8080 (configured in vite.config.js)
144145
- Uses Vite's hot module replacement for rapid development
@@ -155,14 +156,15 @@ Uses Shadcn/ui components (`src/components/ui/`) - pre-built accessible componen
155156
- `usePersistedState` - Generic hook for localStorage persistence
156157
- `useLegacyMigration` - Handles migration from old localStorage format
157158
- `useCustomPrinter` - Manages custom printer dimensions
159+
- `use-toast` - Toast notification system
158160

159161
## Current Refactor Status
160162

161163
See `REFACTOR_PLAN.md` for details:
162164
- ✅ Phase 1: Clean Up & Stabilize - COMPLETED
163165
- ✅ Phase 2: State Management - COMPLETED
164166
- ✅ Phase 3: Feature Enhancements - COMPLETED
165-
- ⏸️ Phase 4: Architecture with TypeScript - IN PROGRESS
167+
- Phase 4: Architecture with TypeScript - COMPLETED
166168
- ❌ Phase 5-6: Not started yet
167169

168170
See `docs/REFACTOR_PLAN_MATHJS.md` for MathJS integration:
@@ -216,4 +218,9 @@ import { something } from '@/lib/utils';
216218
1. **Memory issues during tests**: Tests sometimes run out of memory due to large calculations
217219
2. **Snapshot tests**: Will fail when precision calculations change - update with `npx vitest --run -u`
218220
3. **localStorage migration**: Legacy settings are migrated on first load - don't break this!
219-
- always add tests for new features or changes to the algorithms
221+
- Always add tests for new features or changes to the algorithms
222+
223+
## GitHub Templates
224+
225+
- **Pull Request Template**: `.github/pull_request_template.md` - Standardized PR checklist
226+
- **Bug Report Template**: `.github/ISSUE_TEMPLATE/bug_report.md` - Structured bug reporting format

0 commit comments

Comments
 (0)