Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions PR_EMOJI_COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Pull Request: Fix Emoji Display Compatibility Across Platforms

## Summary
This PR addresses emoji rendering issues that prevent airport icons from displaying properly on macOS and other operating systems.

## Problem
- Airport icons (🏢, 🚁) and aircraft icons (✈️) were not displaying on macOS
- Users couldn't see or select airports due to missing visual indicators
- Font rendering differences between operating systems caused display issues

## Solution
- **Enhanced Font Support**: Added comprehensive emoji font family stack for cross-platform compatibility
- **Fallback Labels**: Added text labels (APT, HELI) that appear if emojis don't render
- **Improved Icon Rendering**: Updated both JavaScript and CSS for better emoji support

## Changes Made

### `js/main.js`
- Added emoji font family support for airport icons
- Included fallback text labels for airport types
- Enhanced aircraft and route marker icon rendering
- Added platform-specific emoji font stacks

### `css/main.css`
- Added emoji font family declarations for `.airport-icon` and `.aircraft-icon`
- Ensured consistent emoji rendering across different browsers and OS

## Testing
- ✅ Tested on macOS Safari, Chrome, Firefox
- ✅ Verified airport icons display with fallback text
- ✅ Confirmed aircraft and route markers render properly
- ✅ Ensured backward compatibility with Windows

## Benefits
- **Cross-Platform**: Works on Windows, macOS, and Linux
- **Accessibility**: Fallback text ensures airports are always visible
- **User Experience**: Users can now see and select airports regardless of emoji support
- **Future-Proof**: Robust font stack handles various emoji implementations

## Files Changed
- `js/main.js` - 15 lines modified, 6 lines added
- `css/main.css` - 2 lines added

## Screenshots
*[Add screenshots showing before/after emoji display]*

## Related Issues
- Fixes airport icon visibility on macOS
- Improves cross-platform compatibility
- Enhances user experience for airport selection
81 changes: 81 additions & 0 deletions PR_MACOS_LAUNCHER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Pull Request: Add macOS Launcher Compatibility

## Summary
This PR adds macOS support for the Aerofly Moving Map application, enabling macOS users to run the application with proper server startup and path handling.

## Problem
- Application was Windows-only with `.bat` launcher script
- Python script used Windows-specific paths for SimAPI files
- macOS users couldn't run the application without manual configuration
- No equivalent launcher script for macOS

## Solution
- **Cross-Platform Path Handling**: Updated Python script to support both Windows and macOS paths
- **macOS Launcher Script**: Created `start_aerofly_map.sh` equivalent to Windows batch file
- **Proper Path Detection**: Automatic detection of operating system for correct file paths

## Changes Made

### `python/udp_to_websocket.py`
- Added cross-platform path detection for SimAPI files
- Windows: Uses `LOCALAPPDATA` environment variable
- macOS: Uses `~/Library/Application Support/` directory
- Maintains backward compatibility with existing Windows installations

### `start_aerofly_map.sh` (New File)
- macOS equivalent to `start_aerofly_map.bat`
- Starts UDP to WebSocket server in background
- Starts HTTP server on port 8080
- Automatically opens browser to application
- Proper process management and cleanup

## Technical Details

### Path Handling
```python
# Windows: %LOCALAPPDATA%/SayIntentionsAI/
# macOS: ~/Library/Application Support/SayIntentionsAI/
```

### Launcher Features
- Background server startup
- Automatic browser opening
- Process ID tracking for cleanup
- Error handling and status reporting

## Testing
- ✅ Tested on macOS (Python 3.12.5)
- ✅ Verified SimAPI file creation in correct macOS location
- ✅ Confirmed HTTP server starts on port 8080
- ✅ Tested WebSocket server functionality
- ✅ Verified backward compatibility with Windows paths

## Benefits
- **macOS Support**: Enables macOS users to run the application
- **Cross-Platform**: Single codebase supports both Windows and macOS
- **User-Friendly**: Simple `./start_aerofly_map.sh` command
- **Maintainable**: Clean separation of platform-specific logic

## Files Changed
- `python/udp_to_websocket.py` - 8 lines modified, 1 line added
- `start_aerofly_map.sh` - 40 lines (new file)

## Usage
```bash
# Make executable
chmod +x start_aerofly_map.sh

# Run application
./start_aerofly_map.sh
```

## Dependencies
- Python 3.7+ (already required)
- `websockets` package (already required)
- No additional dependencies needed

## Notes
- Maintains full backward compatibility with Windows
- No changes to existing Windows functionality
- SimAPI files created in platform-appropriate locations
- Launcher script follows macOS conventions
107 changes: 107 additions & 0 deletions PR_MACOS_SHUTDOWN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Pull Request: Add macOS Shutdown Script and Cross-Platform Shutdown Handling

## Summary
This PR adds macOS shutdown functionality to complement the existing Windows shutdown script, enabling the "Exit Application" button to work properly on macOS systems.

## Problem
- The original repository added an "Exit Application" button that calls `kill_aerofly_bridge.bat` for Windows
- macOS users couldn't use the Exit Application button as there was no equivalent shutdown script
- The Python script was hardcoded to only execute Windows batch files

## Solution
- **macOS Shutdown Script**: Created `kill_aerofly_bridge.sh` equivalent to Windows batch file
- **Cross-Platform Detection**: Updated Python script to detect operating system and use appropriate shutdown script
- **Backward Compatibility**: Maintains full compatibility with existing Windows functionality

## Changes Made

### `kill_aerofly_bridge.sh` (New File)
- macOS equivalent to `kill_aerofly_bridge.bat`
- Stops Python servers and processes on ports 8080 and 8765
- Uses macOS/Linux commands (`pkill`, `lsof`, `kill`)
- Nuclear option: Kills terminal processes running the launcher script
- Force kill with SIGKILL (-9) for immediate termination
- Proper error handling and user feedback

### `python/udp_to_websocket.py`
- Added platform detection using `platform.system()`
- Supports Windows (.bat), macOS (.sh), and Linux (.sh) shutdown scripts
- Automatic script selection based on operating system
- Non-blocking script execution using `subprocess.Popen()` to prevent deadlock
- Enhanced error handling and logging

## Technical Details

### Platform Detection
```python
system = platform.system().lower()
if system == "windows":
script_name = "kill_aerofly_bridge.bat"
elif system == "darwin": # macOS
script_name = "kill_aerofly_bridge.sh"
else: # Linux or other Unix-like systems
script_name = "kill_aerofly_bridge.sh"
```

### Non-Blocking Execution
```python
# Use Popen instead of run to avoid deadlock
process = subprocess.Popen([script_path], shell=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
```

### Shutdown Script Features
- **Process Management**: Kills Python processes related to the application
- **Port Cleanup**: Stops processes on ports 8080 and 8765
- **Nuclear Option**: Kills terminal processes running the launcher script
- **Force Termination**: Uses SIGKILL (-9) for immediate shutdown
- **Error Handling**: Graceful handling of missing processes
- **User Feedback**: Clear status messages during shutdown

## Testing
- ✅ Tested on macOS (Python 3.12.5)
- ✅ Verified shutdown script executes properly
- ✅ Confirmed process termination on relevant ports
- ✅ Tested platform detection logic
- ✅ Verified backward compatibility with Windows
- ✅ Confirmed Exit Application button works correctly
- ✅ Tested non-blocking script execution (no deadlock)
- ✅ Verified nuclear option kills terminal processes

## Benefits
- **macOS Support**: Enables Exit Application button on macOS
- **Cross-Platform**: Single codebase supports Windows, macOS, and Linux
- **User Experience**: Consistent shutdown behavior across platforms
- **Immediate Shutdown**: Force termination prevents hanging or delays
- **Complete Cleanup**: Nuclear option ensures all processes are terminated
- **Maintainable**: Clean separation of platform-specific logic

## Files Changed
- `kill_aerofly_bridge.sh` - 36 lines (new file)
- `python/udp_to_websocket.py` - 59 lines modified

## Usage
```bash
# Make executable
chmod +x kill_aerofly_bridge.sh

# Manual execution
./kill_aerofly_bridge.sh

# Or use the Exit Application button in the web interface
```

## Integration
- Works seamlessly with existing "Exit Application" button
- No changes required to web interface
- Automatic platform detection and script selection
- Maintains existing Windows functionality

## Notes
- Maintains full backward compatibility with Windows
- No changes to existing Windows functionality
- Shutdown script follows macOS/Linux conventions
- Enhanced error handling and logging for better debugging
- Nuclear option matches Windows approach for complete shutdown
- Non-blocking execution prevents deadlock scenarios
82 changes: 82 additions & 0 deletions PULL_REQUEST_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Pull Request Summary

We've prepared two focused pull requests to improve the Aerofly Moving Map application:

## 📋 **Pull Request #1: Emoji Compatibility Fix**

**Branch:** `emoji-compatibility-fix`
**Files:** `js/main.js`, `css/main.css`

**Purpose:** Fix emoji display issues that prevent airport icons from showing on macOS and other platforms.

**Key Changes:**
- Add comprehensive emoji font family support
- Include fallback text labels (APT, HELI) for accessibility
- Improve cross-platform emoji rendering
- Ensure airport icons are always visible and selectable

**Benefits:** All users benefit from better emoji support and accessibility.

---

## 🖥️ **Pull Request #2: macOS Launcher Compatibility**

**Branch:** `macos-launcher-compatibility`
**Files:** `python/udp_to_websocket.py`, `start_aerofly_map.sh`

**Purpose:** Enable macOS users to run the application with proper launcher and path handling.

**Key Changes:**
- Add cross-platform path detection for SimAPI files
- Create macOS launcher script equivalent to Windows batch file
- Maintain backward compatibility with Windows
- Enable proper server startup on macOS

**Benefits:** macOS users can now run the application without manual configuration.

---

## 🚀 **How to Submit These Pull Requests**

### Step 1: Fork the Repository
1. Go to the original repository on GitHub
2. Click "Fork" to create your own copy

### Step 2: Push Your Branches
```bash
# Add your fork as remote
git remote add my-fork https://github.com/YOUR_USERNAME/REPO_NAME.git

# Push both branches
git push my-fork emoji-compatibility-fix
git push my-fork macos-launcher-compatibility
```

### Step 3: Create Pull Requests
1. Go to your forked repository on GitHub
2. Click "Compare & pull request" for each branch
3. Use the templates from `PR_EMOJI_COMPATIBILITY.md` and `PR_MACOS_LAUNCHER.md`
4. Submit the pull requests

---

## 📁 **Files Not Included in PRs**

The following files were created for local use only and are **NOT** included in the pull requests:
- `README_macOS.md` - Local documentation
- `check_dependencies.py` - Local utility script

These can be added later if the developer wants them, or kept as local resources.

---

## ✅ **Current Status**

Both branches are ready with:
- ✅ Proper commit messages
- ✅ Focused changes
- ✅ Pull request templates
- ✅ Testing completed
- ✅ Backward compatibility maintained

The changes are minimal, focused, and beneficial to the community while maintaining the existing functionality.
Loading