Skip to content

Conversation

@smartwatermelon
Copy link
Owner

smartwatermelon and others added 4 commits September 15, 2025 14:48
This commit addresses multiple issues discovered during clean boot testing:

## Enhanced User Feedback
- **Homebrew installations**: Added real-time progress counters (X/Y) and size hints
  for formulae and casks, eliminating long periods of silent installation
- **Package operations**: Enhanced feedback for cleanup and diagnostic operations
- **Terminal profiles**: Improved graceful handling of optional profile imports

## Bug Fixes and Reliability
- **SSH migration**: Added StrictHostKeyChecking=no for automated server-to-server
  transfers, with comprehensive documentation of security context
- **Migration validation**: Changed hostname resolution failures from warnings to
  hard errors to prevent invalid migration attempts
- **Mount status**: Corrected mount verification from error to warning level since
  test_mount() is a pre-check before actual mounting
- **iTerm2 preferences**: Simplified preference handling for better reliability
- **Output redirection**: Standardized to &>/dev/null for complete output suppression

## Deployment Improvements
- **Script permissions**: Added find command to ensure all .sh files are executable
  in deployment packages, preventing permission-related failures
- **iTerm2 file paths**: Corrected to use proper com.googlecode.iterm2.plist naming
- **Dock configuration**: Enhanced dockutil dependency checking and installation
- **Command line tools**: Improved output redirection consistency

## Optional Feature Handling
- **Terminal profiles**: Implemented graceful degradation for optional profile imports
  - New check_optional_success() function for non-blocking operations
  - Always return success since profiles are cosmetic enhancements
  - Clear distinction between critical errors and optional warnings

## Documentation Updates
- **SSH security**: Added comprehensive documentation of StrictHostKeyChecking=no
  usage in migration scenarios with security context explanation
- **File path corrections**: Updated documentation to reflect actual file names

## Code Quality
- **Unused function removal**: Removed check_terminal_window_exists() from first-boot.sh
- **Shellcheck compliance**: All modified scripts pass shellcheck validation
- **Markdown formatting**: Applied markdownlint fixes

All changes maintain backward compatibility and follow established error handling
patterns. Ready for 1.0 release deployment.

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

Co-Authored-By: Claude <noreply@anthropic.com>
…ndow

## Problem Fixed
The original code used `close (last window)` which could close the wrong window,
often the calling script's terminal, because "last window" refers to the highest
index in AppleScript's windows collection, not the most recently created window.

## Solution Implemented
- **Window ID tracking**: Capture existing window IDs before opening profile
- **Differential detection**: Identify new window by comparing ID lists
- **Precise targeting**: Close only the window that didn't exist before
- **Timeout protection**: 5-second maximum wait with 0.5s polling intervals
- **Status reporting**: Returns "success" or "timeout" for proper error handling

## Technical Details
- Replaced 55 lines of complex window counting logic with 29 lines of reliable
  AppleScript that tracks window IDs
- Uses `open POSIX file` for proper file handling
- Includes comprehensive error handling and logging
- Maintains existing profile configuration workflow

## Benefits
- ✅ Prevents closing the calling script's terminal window
- ✅ Ensures only the temporary profile window is closed
- ✅ More reliable window detection and management
- ✅ Better error handling and user feedback
- ✅ Safer operation that won't disrupt user's workflow

This fix resolves a critical usability issue where terminal profile imports
could unexpectedly close the user's active terminal session.

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

Co-Authored-By: Claude <noreply@anthropic.com>
## New Documentation Added

### Apple First-Boot Dialog Guide
- **New file**: `docs/setup/apple-first-boot-dialogs.md`
- **Complete walkthrough** of Apple Setup Assistant dialogs for both admin and operator accounts
- **Critical FileVault warning**: Emphasizes disabling FileVault for proper auto-login functionality
- **Detailed recommendations** for each dialog step with rationale
- **Separate sections** for initial admin setup and operator first login

### Safari Extension Syncing
- **Added to**: `docs/setup/first-boot.md` in Post-Setup Configuration section
- **Step-by-step instructions** for enabling Safari extension sync across devices
- **Practical context**: Useful for accessing web interfaces (Plex, Transmission, etc.)
- **Reference link**: iOS.Gadgethacks.com guide for detailed instructions

### Known Issues Documentation
- **Added to**: `docs/setup/first-boot.md` in new Known Issues section
- **iTerm2 Profile Syncing**: Documents limitation and workarounds
- **Background Item Notifications**: Explains unavoidable macOS notifications during setup
- **Clear impact assessment**: Distinguishes between cosmetic and functional issues

## Documentation Integration
- **Cross-references added** to link new Apple dialog guide from existing docs
- **first-boot.md**: Links to dialog guide in "Before You Begin" section
- **operator.md**: Links to operator-specific dialogs in "Initial Operator Login" section
- **Consistent formatting** and navigation structure maintained

## Benefits
- ✅ Users have clear guidance for navigating Apple's Setup Assistant
- ✅ Critical FileVault configuration properly documented and emphasized
- ✅ Known limitations are transparent with available workarounds
- ✅ Post-setup configuration options clearly documented
- ✅ Improved user experience through comprehensive guidance

This documentation fills important gaps in the setup process, particularly around
Apple's native dialogs and post-setup configuration options.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@smartwatermelon smartwatermelon merged commit a338d8a into main Sep 16, 2025
16 checks passed
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