vibetunnel/mac
Helmut Januschka fc162ad55c
Prevent recursive VibeTunnel sessions (GitHub #95) (#104)
* Prevent recursive VibeTunnel sessions (GitHub #95)

Added detection and prevention of nested VibeTunnel sessions to avoid
recursive 'vt' command execution.

Changes:
- Set INSIDE_VIBETUNNEL and VIBETUNNEL_SESSION environment variables when creating PTY sessions
- Added check in vt script to detect if already inside a VibeTunnel session
- Shows helpful error message when recursive session is attempted

This prevents the confusing behavior where users could run 'vt' inside a
VibeTunnel session, creating nested terminal instances. Now users get a
clear error message explaining they're already in a VibeTunnel session.

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

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

* Improve recursive session prevention based on PR feedback

- Consolidate to single environment variable VIBETUNNEL_SESSION_ID
- Add session ID for debugging purposes as requested
- Show session ID in error message for better user feedback
- Remove redundant environment variables (INSIDE_VIBETUNNEL, VIBETUNNEL_SESSION)

This addresses feedback from PR #104 to use a single, more informative
environment variable that serves both purposes: preventing recursion
and providing debugging information.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-27 21:05:36 +02:00
..
docs Updated docs wrt node tests 2025-06-23 18:02:15 +02:00
scripts fish hashing 2025-06-25 05:14:16 +02:00
VibeTunnel Prevent recursive VibeTunnel sessions (GitHub #95) (#104) 2025-06-27 21:05:36 +02:00
VibeTunnel-Mac.xcodeproj Add comprehensive server tests and switch to Biome linter (#73) 2025-06-24 18:51:38 +02:00
VibeTunnelTests Migrate to Microsoft node-pty v1.1.0-beta34 (#87) 2025-06-26 23:10:05 +02:00
.gitignore Add appcast for beta 3 release 2025-06-23 04:32:38 +02:00
.swiftformat Move files to apple subdir 2025-06-22 14:35:42 +02:00
.swiftlint.yml Move files to apple subdir 2025-06-22 14:35:42 +02:00
CHANGELOG.md prep b4 2025-06-25 03:52:15 +02:00
Package.swift Burn everything with fire that is not node or swift. 2025-06-21 14:39:44 +02:00
README.md refactor: major project restructuring - move macOS app to mac/ directory 2025-06-20 13:20:01 +02:00
VibeTunnel-Info.plist refactor: major project restructuring - move macOS app to mac/ directory 2025-06-20 13:20:01 +02:00

VibeTunnel macOS App

This directory contains the macOS version of VibeTunnel.

Quick Start

Building

# Using Xcode
xcodebuild -workspace VibeTunnel.xcworkspace -scheme VibeTunnel build

# Using build script
./scripts/build.sh

Running Tests

xcodebuild -workspace VibeTunnel.xcworkspace -scheme VibeTunnel test

Creating Release

./scripts/build.sh --configuration Release --sign
./scripts/create-dmg.sh build/Build/Products/Release/VibeTunnel.app

Project Structure

mac/
├── VibeTunnel/           # Source code
│   ├── Core/            # Core services and models
│   ├── Presentation/    # Views and UI components
│   └── Utilities/       # Helper utilities
├── VibeTunnelTests/     # Unit tests
├── scripts/             # Build and release scripts
├── docs/                # macOS-specific documentation
└── private/             # Signing keys (not in git)

Scripts

  • build.sh - Build the app with optional signing
  • create-dmg.sh - Create a DMG for distribution
  • release.sh - Full release process
  • monitor-ci.sh - Monitor CI build status
  • sign-and-notarize.sh - Code signing and notarization

Documentation

See docs/ for macOS-specific documentation:

  • Code signing setup
  • Release process
  • Sparkle update framework
  • Development signing

CI/CD

The app is built automatically on GitHub Actions:

  • On every push to main
  • On pull requests
  • For releases (tagged with v*)

See .github/workflows/swift.yml for the build configuration.