home / skills / willsigmon / sigstack / navigation-debugger
This skill helps you diagnose and fix navigation issues in Leavn by validating notifications, AppCoordinator routing, and deep link handling.
npx playbooks add skill willsigmon/sigstack --skill navigation-debuggerReview the files below or copy the command above to add this skill to your agents.
---
name: Navigation Debugger
description: Debug Leavn navigation issues - NotificationCenter routing, deep links, tab selection, AppCoordinator, modal presentations
allowed-tools: Read, Edit, Grep
---
# Navigation Debugger
Fix navigation bugs in Leavn:
1. **Check notification handling**:
- Search for notification name in ContentView
- Verify .onReceive() handlers exist
- Check AppCoordinator navigation methods
2. **Common Leavn patterns**:
```swift
// Post navigation
NotificationCenter.default.post(
name: .OpenBibleReference,
userInfo: ["book": "Genesis", "chapter": 1]
)
// Handle in ContentView
.onReceive(NotificationCenter.default.publisher(for: .OpenBibleReference)) {
// Navigate to Bible
}
```
3. **Debug steps**:
- Add AppLog in notification handlers
- Verify userInfo parsing
- Check tab selection works
- Test deep link URLs
Use when: Navigation broken, wrong screen, deep links fail, tab routing issues
This skill helps debug navigation problems in Leavn apps by focusing on NotificationCenter routing, deep links, tab selection, AppCoordinator calls, and modal presentation flows. It provides a concise diagnostic checklist and practical steps to find where messages are lost, parsed incorrectly, or routed to the wrong destination. Use it to quickly pinpoint where navigation logic breaks and to verify event handling and state updates.
Inspect notification posting and receiving patterns, verify .onReceive handlers in ContentView, and trace AppCoordinator navigation methods to confirm they react to events as expected. Check userInfo parsing and ensure tab selection/state updates are applied on the main thread. Validate deep link parsing and test modal presentations to confirm view controllers are presented in the correct context.
What logs should I add to trace a notification?
Log entry and exit in the .onReceive handler and AppCoordinator navigation method, plus the raw userInfo payload and any parsed values.
How do I test deep links reliably?
Use deterministic URL payloads and run them in the simulator and device. Create unit tests for URL parsing and manual integration tests that assert tab selection and final view type.