You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement nodespace:// Link Navigation with Dynamic Tab Creation #297
Users can create nodespace://{node-uuid} links via the @mention system, but clicking these links currently does nothing. We need to implement a navigation handler that:
Intercepts clicks on nodespace:// links
Resolves the node UUID to determine the appropriate viewer type
Regular Click: Navigate within current tab (browser-like behavior) ✨
Cmd+Click: Create new tab or switch to existing tab for side-by-side viewing
Supports Cmd+Click for opening in a new tab vs. regular click for current tab
📝 Implementation Note: The final implementation uses in-tab navigation for regular clicks instead of tab switching. This provides a more intuitive browser-like experience where clicking links navigates within the current context, while Cmd+Click allows opening in new tabs for comparison.
This is the foundation for the entire tab management system - without link navigation, users cannot leverage the multi-tab architecture.
Current State
What Already Exists:
✅ nodespace://{uuid} links created by @mention system
✅ Basic tab system (tab-system.svelte) with keyboard navigation
✅ Tab store (navigation.ts) with addTab(), setActiveTab(), closeTab()
// ❌ BAD - Loads all viewers immediately, even unused onesimportTaskNodeViewerfrom'$lib/components/viewers/task-node-viewer.svelte';importTextNodeViewerfrom'$lib/components/viewers/text-node-viewer.svelte';importAIChatNodeViewerfrom'$lib/components/viewers/ai-chat-node-viewer.svelte';
Unused viewer components were imported at startup
One had a Svelte reactive loop bug (effect_update_depth_exceeded)
Should use plugin-driven lazy loading instead
3. Architectural Flaw: Hardcoded Imports
Viewers should be discovered via plugin registry, not hardcoded
Plugin system should dynamically load the correct viewer for each node type
Only DateNodeViewer should load on startup (for Today tab)
Recommended Approach for Fresh Implementation
Phase 1: Click Handler Only
Add global click handler in app-shell.svelte
Console.log nodespace:// clicks
No actual navigation yet
Test: Verify clicks are intercepted
Phase 2: Plugin-Based Viewer Discovery
Query plugin registry for available viewers
No hardcoded imports
Test: Verify correct viewer is identified for each node type
Phase 3: Tab Creation (Placeholder Content)
Create tabs dynamically
Render simple placeholder text (no actual viewer components)
Test: Verify tab switching works
Phase 4: Dynamic Viewer Loading
Use plugin registry to lazy-load viewer components
Test each viewer type individually
Key Principles
✅ Incremental implementation - Test each phase independently
✅ Plugin-driven - No hardcoded viewer imports
✅ Lazy loading - Only load what's needed, when it's needed
✅ Avoid module-level singletons - Use getter functions
✅ One change at a time - Don't compound architectural changes
This approach will prevent the cascading failures we encountered in PR #306.
Activity
feat: Implement nodespace:// link navigation with dynamic tab creation (
malibio commentedon Oct 20, 2025
Implementation Learnings from PR #306
PR #306 was closed due to fundamental architectural issues. Here are the critical lessons learned:
Critical Issues Discovered
1. Module-Level Singleton Exports Cause App Freeze
2. Top-Level Component Imports Load Everything Eagerly
effect_update_depth_exceeded)3. Architectural Flaw: Hardcoded Imports
Recommended Approach for Fresh Implementation
Phase 1: Click Handler Only
Phase 2: Plugin-Based Viewer Discovery
Phase 3: Tab Creation (Placeholder Content)
Phase 4: Dynamic Viewer Loading
Key Principles
This approach will prevent the cascading failures we encountered in PR #306.
Phase 1: Add global click handler for nodespace:// links (console.log…
Fix: Use backend adapter instead of direct Tauri invoke
Phase 1 improvements: Use capture phase and handle query parameters
Phase 1: Support node:// protocol (in addition to nodespace://)
Phase 2-3: Implement NavigationService with dynamic tab creation
Change @mention link protocol from node:// to nodespace://
Fix: Correct component architecture - TextNode wraps BaseNode
Simplify TextNode - remove header-specific logic
85 remaining items
refactor: Simplify date node handling - remove synthetic node creatio…
refactor: Unify tab architecture - viewers own their titles (issue #297)
refactor: Use stable 'daily-journal' tab ID and smart reuse (issue #297)
refactor: Unified NodeViewerProps with callback pattern (issue #297)
feat: Dynamic viewer routing via plugin registry (issue #297)
fix: DateNodeViewer reactivity and timezone bugs (issue #297)
feat: Tab reuse for all date links - only Cmd+Click creates new tabs …
feat: In-tab navigation - links navigate within current tab (issue #297)
fix: Tab state persistence - preserve navigation when switching tabs …
feat: BaseNodeViewer sets tab titles from node content (issue #297)
fix: Prevent infinite loop in DateNodeViewer reactivity (issue #297)
chore: Remove debug logging from NavigationService (issue #297)
refactor: Address code review recommendations for issue #297
Split-Pane Layout System (#367)
Viewer Coordination: Focus, Scroll, and Cursor Management (#373)