fix: tunnel reconnection stability and manual pairing reliability#2
Open
comlibmb wants to merge 4 commits into
Open
fix: tunnel reconnection stability and manual pairing reliability#2comlibmb wants to merge 4 commits into
comlibmb wants to merge 4 commits into
Conversation
- Add TunnelNotifier with URL format normalization (wss://) and 5x retry with exponential backoff - Preserve pairing_code in Supabase during tunnel restarts (don't overwrite with null) - Distinguish graceful disconnect from network interruption (keep sessions 5min TTL) - Add session TTL mechanism: clearAllTakenOver runs on timeout, cancelSessionTTL on reconnect - Add connected event listener to cancel session TTL when mobile reconnects Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded Supabase URL and anon key with FORKOFF_SUPABASE_URL and FORKOFF_SUPABASE_ANON_KEY environment variables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add dotenv to load .env file - Import dotenv/config in entry point - Supabase URL/key no longer hardcoded in source Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Users who put phone away for 10-15 minutes should not lose taken-over sessions. Previous 5-minute TTL was too short for real-world usage. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Multiple fixes for tunnel reconnection stability when using cloudflared quick tunnels.
Changes
Tunnel Notifier (
src/tunnel-notifier.ts)wss://format before storing in Supabasepairing_codeon tunnel restart (don't overwrite to null)Session Preservation (
src/index.ts,src/tools/claude-process.ts)Environment Variables (
src/tunnel-notifier.ts,src/index.ts)FORKOFF_SUPABASE_URL,FORKOFF_SUPABASE_ANON_KEY).envfile loading.env.exampletemplateBug Fixes
pairing_codeto be cleared from Supabase, breaking manual pairingTest Plan