Skip to content

Conversation

@takaokouji
Copy link

Summary

This PR merges the latest upstream changes from MIT's scratch-gui into smalruby3-gui, bringing important bug fixes, new features, and improvements.

Key Changes

🐛 Bug Fixes & Improvements

  • Enhanced sprite deletion with confirmation prompts
  • Improved library component styling and functionality
  • Better error handling and user experience

🎨 UI/UX Enhancements

  • Added new debug modal with debugging tips and strategies
  • New theme logos (cat, nineties, oldtimey, prehistoric)
  • Updated menu bar with improved styling
  • Enhanced delete confirmation prompts for better user interaction

🔧 Development & Infrastructure

  • Updated CI/CD workflow configuration
  • Added commitlint for better commit message standards
  • Updated dependencies in package.json and package-lock.json
  • Enhanced test coverage with updated test files

📁 New Components

  • debug-modal: Interactive debugging assistance with tips and strategies
  • delete-confirmation-prompt: Better user confirmation for destructive actions
  • Various new SVG icons for improved visual consistency

Files Changed

  • CI/CD: .github/workflows/ci-cd.yml, .github/workflows/commitlint.yml
  • Core Components: GUI, menu bar, library, sprite selector
  • New Features: Debug modal, delete confirmation prompt
  • Assets: New theme logos and debugging icons
  • Tests: Updated integration and unit tests
  • Dependencies: Updated package.json and package-lock.json

Testing

  • Updated existing test suites to accommodate new components
  • Enhanced integration tests for sprite management
  • Added test cases for new debugging and confirmation features

Compatibility

This merge maintains compatibility with existing Smalruby 3 functionality while incorporating beneficial upstream improvements.

🤖 Generated with Claude Code

takaokouji and others added 4 commits June 30, 2025 00:42
- Remove duplicate 'no-warning-comments' rule in src/.eslintrc.js
- Use commonHtmlWebpackPluginOptions in webpack.config.js HtmlWebpackPlugin instances

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove duplicate mock file causing Jest warnings
- Add missing urlFor method to SeleniumHelper class
- Fix 'urlFor is not a function' errors in Ruby tab tests

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

Co-Authored-By: Claude <noreply@anthropic.com>
@takaokouji
Copy link
Author

🔧 CI Test Fixes Applied

This update resolves the integration test failures that were blocking the CI:

Issues Fixed:

  1. Duplicate mock file warning: Removed the duplicate mock file at src/lib/themes/dark/__mocks__/index.js that was causing Jest warnings
  2. urlFor is not a function errors: Added the missing urlFor method to the SeleniumHelper class

Changes Made:

  • ✅ Removed duplicate mock file: src/lib/themes/dark/__mocks__/index.js
  • ✅ Added urlFor method to SeleniumHelper class with proper documentation
  • ✅ Added urlFor to the bindAll array for proper method binding

Test Status:

  • The urlFor is not a function errors affecting 25+ Ruby tab integration tests should now be resolved
  • Tests can now successfully load the built HTML file at the correct path
  • Docker-based testing should work correctly after running the build

The integration tests should now pass in the CI environment! 🎉

🤖 Generated with Claude Code

takaokouji and others added 2 commits August 23, 2025 22:34
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add main branch to push triggers for compatibility
- Fix deprecated set-output syntax to use $GITHUB_OUTPUT
- Correct GitHub expression syntax for hotfix branch detection
- Standardize test result file naming (.xml extension)

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

Co-Authored-By: Claude <noreply@anthropic.com>
@takaokouji
Copy link
Author

🔧 CI/CD Workflow Improvements

Updated the CI/CD workflow configuration for better maintainability and compatibility:

Changes Made:

  • Branch compatibility: Added main branch to push triggers (now supports both main and master)
  • Deprecated syntax fix: Updated ::set-output to modern $GITHUB_OUTPUT syntax
  • Expression syntax: Fixed GitHub expression syntax for hotfix branch detection
  • Standardized naming: Changed integration test output from results.txt to integration-results.xml for consistency

Technical Details:

  • Before: branches: [master, develop, hotfix/*]

  • After: branches: [main, master, develop, hotfix/*]

  • Before: echo "::set-output name=BRANCH_NAME::..."

  • After: echo "BRANCH_NAME=..." >> $GITHUB_OUTPUT

  • Before: ${{contains(github.ref, 'hotfix')}}

  • After: ${{ contains(github.ref, 'hotfix') }} == 'true'

These improvements ensure the workflow follows GitHub Actions best practices and maintains compatibility with both legacy and modern branch naming conventions.

🤖 Generated with Claude Code

- Replace file-based mocks with inline Jest mocks to avoid module name conflicts
- Update themes.test.js and monitor.test.jsx to use proper inline mock definitions
- Remove physical __mocks__ directories that were causing Jest duplication warnings
- Ensure tests use expected mock values instead of actual theme values

Fixes unit tests that were failing due to mock configuration issues after
upstream merge integration.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@takaokouji
Copy link
Author

🔧 Unit Test Mock Issues Fixed

Resolved the unit test failures that were occurring due to theme mocking conflicts:

Problem Analysis:

  • The deletion of src/lib/themes/dark/__mocks__/index.js caused Jest to use actual theme values instead of test mocks
  • Jest was detecting duplicate module names between default and dark theme mocks
  • Tests were expecting specific mock values but receiving actual theme implementation values

Solution Applied:

  • Replaced file-based mocks with inline jest.mock() definitions in test files
  • Removed physical __mocks__ directories to eliminate Jest module name conflicts
  • Updated test expectations to use proper inline mock values

Tests Fixed:

  • test/unit/util/themes.test.js - All 5 failing assertions now pass
  • test/unit/components/monitor.test.jsx - Theme color selection tests now pass

Technical Details:

Before (file-based mocks):

src/lib/themes/dark/__mocks__/index.js  ← Caused conflicts

After (inline mocks):

jest.mock('../../../src/lib/themes/dark', () => ({
  blockColors: { motion: { primary: '#AAAAAA' }, ... }
}));

The unit test failures have been resolved and should now pass in CI! 🎉

🤖 Generated with Claude Code

@takaokouji takaokouji merged commit 2a0897d into develop Aug 23, 2025
2 checks passed
@takaokouji takaokouji deleted the merge/scratch-gui branch August 23, 2025 14:23
github-actions bot pushed a commit that referenced this pull request Aug 23, 2025
…-gui

feat: merge upstream scratch-gui updates
github-actions bot pushed a commit that referenced this pull request Aug 24, 2025
…-gui

feat: merge upstream scratch-gui updates
github-actions bot pushed a commit that referenced this pull request Aug 24, 2025
…-gui

feat: merge upstream scratch-gui updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants