Commit Graph

108 Commits

Author SHA1 Message Date
tanner 0ea5212778 test: Add tests for leading zero visual input handling
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 5dd0272350 fix: Prevent multiple leading zeros in number input
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 8de4d70c8b test: Add chaos tests for number input, decimals, and leading zeros
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 7a3e5cd868 fix: Prevent multiple decimal points in number input
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 8ed03143bd fix: Set haptic feedback duration for button presses to 30ms 2026-06-13 16:13:48 -06:00
tanner 95cc91781d feat: Add haptic feedback for number, decimal, and backspace
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 1a2fa25ea7 fix: Use buttonPress() for trig functions in tests
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner df0a2c03fc test: Expect 0 for sin/tan(PI) results due to float correction
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner d2c4be15d0 test: Expand Pi button test coverage
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 3937109edb feat: Replace percent button with Pi button, update logic and tests
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 98fdddac5d fix: Correct negative zero logic for +/- and update test
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 73cd819e94 fix: Convert scientific notation to decimal for test input
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner abe931d61d style: Improve readability of edge case numbers in tests 2026-06-13 16:13:48 -06:00
tanner 0bf1220c62 test: Add extensive edge case tests and expand number generation
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner e32b274e5c fix: Update checkDisplay logic and backspace/trig test assertions
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 2088081bb8 test: Improve output validation by spying on raw display numbers
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 2754d4f52a test: Improve display truncation handling for large numbers
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 04efe1b4d9 fix: Adjust test stringWidth mock to prevent truncation issues
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 728687ab37 fix: Adjust test stringWidth mock for display precision
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 77288c92af fix: Prevent displayOutput from clearing state on Infinity/NaN
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner e8a361210d test: Correct infinity string comparison in checkDisplay
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 255984e52f fix: Apply negation to current number when new number is pressed
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 20ce84ed89 test: Replace static tests with comprehensive programmatic test suite
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 31531ff118 fix: Increase test tolerance for float comparisons
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 37867a095b fix: Improve display comparison for floating point and truncation
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 83a50fa06a Revert to calc before tests 2026-06-13 16:13:48 -06:00
tanner ab8f7e78b8 fix: Round floats for improved precision in fixFloat
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 6fc30311f3 fix: Correct process mock and use buttonPress for multi-char commands
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner a59b92572b fix: Reset angle mode on AC and parse float for square root
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 2c91af6759 fix: Parse numeric input for scientific ops and expose operators to tests
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 6ae1b173bd feat: Update logging endpoint and add buzz on success 2026-06-13 16:13:48 -06:00
tanner f94d5c2105 fix: Capture correct display output in g.drawString mock
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 913156ca3c fix: Expose buttonPress function for testing
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner a5adeb379c fix: Mock FontDylex7x13 module in Node.js test runner
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 281187fd91 test: Add full simulation tests for calculator
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner f5abf6eb48 test: Add calculator tests 2026-06-13 16:13:48 -06:00
tanner 810e43bcfd feat: Add HTTP POST for calculation logs with error display
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 1c511d3441 fix: Correct expression display on repeated '=' press
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 3b66810ba1 feat: Add send function to log calculation history and result
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner ebb1550fc7 fix: Relax scientific notation display trigger
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 6b7285a017 refactor: Remove unnecessary number display formatting 2026-06-13 16:13:48 -06:00
tanner 85185dbbaa fix: Replace regex with manual thousands separator
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 5cb5ee604b fix: Ensure thousands separators display without premature scientific notation
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner e57e09eb17 style: Use comma as thousands separator 2026-06-13 16:13:48 -06:00
tanner f3fdf4e5ab feat: Dynamically adjust result display width based on font
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 2106a4298e refactor: Use Dylex7x13 font for calculator UI 2026-06-13 16:13:48 -06:00
tanner ca2265e8aa feat: Add thousands separator to calculator output
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner b86f6720bc fix: Correctly parse leading zeros for decimal input
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 8c7c488967 refactor: Simplify math operations, remove custom precision functions
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00
tanner 3507d8938e fix: Parse scientific notation in getIntWithPrecision
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-06-13 16:13:48 -06:00