Repository navigation
Conversation
closes #297) **Core Functionality:** - ✅ NavigationService for node resolution and tab management - ✅ Global click handler intercepts nodespace:// links - ✅ Dynamic tab creation based on node type - ✅ Switch to existing tab vs create new (Cmd+Click behavior) - ✅ Support for all viewer types (date, task, text, ai-chat) **Implementation Details:** 1. **NavigationService** (`src/lib/services/navigation-service.ts`) - Singleton pattern for centralized navigation logic - Resolves node UUID from SharedNodeStore - Generates human-readable tab titles (truncates at 40 chars) - Maps node types to appropriate viewers - Handles date formatting (Today, Tomorrow, Yesterday, YYYY-MM-DD) 2. **Global Click Handler** (`src/lib/components/layout/app-shell.svelte`) - Intercepts clicks on nodespace:// links throughout the app - Extracts node UUID from link href - Detects Cmd/Ctrl+Click for new tab behavior - Delegates to NavigationService for tab creation 3. **Tab Interface Enhancement** (`src/lib/stores/navigation.ts`) - Extended Tab interface with richer content structure - Added 'node' tab type for generic node viewers - Content includes nodeId and nodeType for routing 4. **Dynamic Tab Routing** (`src/routes/+page.svelte`) - Routes based on tab type (date, node, placeholder) - For 'node' type, sub-routes based on nodeType - Error handling for unknown node types - Proper prop passing to each viewer (nodeId) **Test Coverage (26 tests):** - ✅ 14 unit tests for NavigationService - ✅ 12 integration tests for end-to-end link navigation - Tests cover: node resolution, tab creation, switching, Cmd+Click, error handling, performance **Acceptance Criteria Met:** - [x] Clicking nodespace:// link creates/switches to tab - [x] Tab title generated from node content - [x] Regular click switches to existing tab (no duplicates) - [x] Cmd+Click opens node in new tab - [x] Works for all node types (date, task, text, ai-chat) - [x] Error handling for non-existent/malformed UUIDs - [x] Links work globally throughout the UI - [x] Performance: <100ms navigation time **Performance:** - All navigation operations complete in <100ms - In-memory node lookups via SharedNodeStore - No unnecessary database queries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Collaborator
Author
|
Closing this PR due to fundamental architectural issues discovered during implementation. Will reopen with a simpler, incremental approach that uses plugin-driven viewer loading instead of hardcoded imports. |
malibio
added a commit
that referenced
this pull request
Oct 20, 2025
… only) - Add click event listener in app-shell.svelte onMount - Intercept nodespace:// links and prevent default navigation - Validate UUID format with regex - Detect Cmd+Click / Ctrl+Click for new tab intent - Log click details to console (no actual navigation yet) - Clean up event listener on component destroy This is Phase 1 of the incremental implementation approach based on learnings from PR #306. No module-level singleton exports, no viewer imports - just basic click interception. Related to #297
malibio
added a commit
that referenced
this pull request
Oct 20, 2025
**NavigationService (/src/lib/services/navigation-service.ts):** - Lazy initialization getter function (avoids module-level singleton freeze from PR #306) - Async node resolution: checks SharedNodeStore first, fetches from backend if needed - Automatic tab title generation from node content (date formatting, text truncation) - Duplicate tab prevention (switches to existing tab unless Cmd+Click) - Supports both node:// and nodespace:// protocols **Tab System Updates:** - Updated Tab interface to support 'node' type (navigation.ts:6) - Updated +page.svelte routing to render TextNodeViewer for text nodes - Placeholder rendering for unsupported node types with node ID display - Empty state handling when no tab selected **Integration:** - Click handler now calls NavigationService.navigateToNode() (app-shell.svelte:78-82) - Backend node fetching with SharedNodeStore caching - Type-safe content property access with runtime guards **Verified with Chrome DevTools:** ✅ Tab creation: 3 → 4 tabs ✅ New tab: "Test Container Node" ✅ Console: "[NavigationService] Created new tab: Test Container Node" ✅ All quality checks passed Closes #297 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
malibio
added a commit
that referenced
this pull request
Feb 4, 2026
… only) - Add click event listener in app-shell.svelte onMount - Intercept nodespace:// links and prevent default navigation - Validate UUID format with regex - Detect Cmd+Click / Ctrl+Click for new tab intent - Log click details to console (no actual navigation yet) - Clean up event listener on component destroy This is Phase 1 of the incremental implementation approach based on learnings from PR #306. No module-level singleton exports, no viewer imports - just basic click interception. Related to #297
malibio
added a commit
that referenced
this pull request
Feb 4, 2026
**NavigationService (/src/lib/services/navigation-service.ts):** - Lazy initialization getter function (avoids module-level singleton freeze from PR #306) - Async node resolution: checks SharedNodeStore first, fetches from backend if needed - Automatic tab title generation from node content (date formatting, text truncation) - Duplicate tab prevention (switches to existing tab unless Cmd+Click) - Supports both node:// and nodespace:// protocols **Tab System Updates:** - Updated Tab interface to support 'node' type (navigation.ts:6) - Updated +page.svelte routing to render TextNodeViewer for text nodes - Placeholder rendering for unsupported node types with node ID display - Empty state handling when no tab selected **Integration:** - Click handler now calls NavigationService.navigateToNode() (app-shell.svelte:78-82) - Backend node fetching with SharedNodeStore caching - Type-safe content property access with runtime guards **Verified with Chrome DevTools:** ✅ Tab creation: 3 → 4 tabs ✅ New tab: "Test Container Node" ✅ Console: "[NavigationService] Created new tab: Test Container Node" ✅ All quality checks passed Closes #297 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
malibio
added a commit
that referenced
this pull request
Feb 5, 2026
… only) - Add click event listener in app-shell.svelte onMount - Intercept nodespace:// links and prevent default navigation - Validate UUID format with regex - Detect Cmd+Click / Ctrl+Click for new tab intent - Log click details to console (no actual navigation yet) - Clean up event listener on component destroy This is Phase 1 of the incremental implementation approach based on learnings from PR #306. No module-level singleton exports, no viewer imports - just basic click interception. Related to #297
malibio
added a commit
that referenced
this pull request
Feb 5, 2026
**NavigationService (/src/lib/services/navigation-service.ts):** - Lazy initialization getter function (avoids module-level singleton freeze from PR #306) - Async node resolution: checks SharedNodeStore first, fetches from backend if needed - Automatic tab title generation from node content (date formatting, text truncation) - Duplicate tab prevention (switches to existing tab unless Cmd+Click) - Supports both node:// and nodespace:// protocols **Tab System Updates:** - Updated Tab interface to support 'node' type (navigation.ts:6) - Updated +page.svelte routing to render TextNodeViewer for text nodes - Placeholder rendering for unsupported node types with node ID display - Empty state handling when no tab selected **Integration:** - Click handler now calls NavigationService.navigateToNode() (app-shell.svelte:78-82) - Backend node fetching with SharedNodeStore caching - Type-safe content property access with runtime guards **Verified with Chrome DevTools:** ✅ Tab creation: 3 → 4 tabs ✅ New tab: "Test Container Node" ✅ Console: "[NavigationService] Created new tab: Test Container Node" ✅ All quality checks passed Closes #297 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
malibio
added a commit
that referenced
this pull request
Feb 26, 2026
… only) - Add click event listener in app-shell.svelte onMount - Intercept nodespace:// links and prevent default navigation - Validate UUID format with regex - Detect Cmd+Click / Ctrl+Click for new tab intent - Log click details to console (no actual navigation yet) - Clean up event listener on component destroy This is Phase 1 of the incremental implementation approach based on learnings from PR #306. No module-level singleton exports, no viewer imports - just basic click interception. Related to #297
malibio
added a commit
that referenced
this pull request
Feb 26, 2026
**NavigationService (/src/lib/services/navigation-service.ts):** - Lazy initialization getter function (avoids module-level singleton freeze from PR #306) - Async node resolution: checks SharedNodeStore first, fetches from backend if needed - Automatic tab title generation from node content (date formatting, text truncation) - Duplicate tab prevention (switches to existing tab unless Cmd+Click) - Supports both node:// and nodespace:// protocols **Tab System Updates:** - Updated Tab interface to support 'node' type (navigation.ts:6) - Updated +page.svelte routing to render TextNodeViewer for text nodes - Placeholder rendering for unsupported node types with node ID display - Empty state handling when no tab selected **Integration:** - Click handler now calls NavigationService.navigateToNode() (app-shell.svelte:78-82) - Backend node fetching with SharedNodeStore caching - Type-safe content property access with runtime guards **Verified with Chrome DevTools:** ✅ Tab creation: 3 → 4 tabs ✅ New tab: "Test Container Node" ✅ Console: "[NavigationService] Created new tab: Test Container Node" ✅ All quality checks passed Closes #297 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
Closes #297