Merged
Conversation
- use-external-api.ts: Replace window with globalThis (S7764)
- Updated sendMessageToParent to use globalThis.parent ?? globalThis
- Updated sendEventToParent to use globalThis.parent ?? globalThis
- Changed window.addEventListener to globalThis.addEventListener
- Reduce Cognitive Complexity in use-external-api.ts (S3776)
- Extracted 7 action handlers into separate functions
- Simplified switch statement with 12 cases to more maintainable structure
- Complexity reduced from 24 to 15
- api-test.html: Fix text contrast and accessibility (S7924, S6853)
- Increased .log-entry .ts color from #64748b to #94a3b8 for better contrast
- Added for/id linking for all form labels:
- Simulator URL input
- Sketch Code textarea
- Timeout input
- Pin and Value inputs
- Serial Data input
All tests passing (1413/1413), TypeScript clean
Exception Handling (javascript:S2486): - Enhanced catch block to log error details: name and message - api-test.html: connectSimulator() exception now properly documented Code already improved in previous commit: - globalThis preference (javascript:S7764) - Default parameters (javascript:S7760) - Ternary extraction (javascript:S3358) - String#replaceAll() (javascript:S7781) - Element.dataset (javascript:S7761) - Nested functions (javascript:S7735) - Text contrast improvements (css:S7924) External API tests: 35/35 passing All changes validated and merged
- Contrast (S7924): button.primary darkened #0c86c7→#0369a1 (contrast 5.1:1) - Contrast (S7924): status badges changed from semi-transparent to opaque .status.connected: #14532d / #bbf7d0 (contrast 6.7:1) .status.disconnected: #7f1d1d / #fecaca (contrast 5.3:1) - Negated condition (S7735): 'data !== undefined ?' flipped to 'data === undefined ?' - Redundant jump (S3626): removed unnecessary 'return' at end of else block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.