Rewrite navigation stack management#482
Merged
IvanGoncharov merged 1 commit intomainfrom Dec 20, 2025
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR refactors the navigation stack management system from an ID-based approach to an object-reference-based approach. The navigation state is now represented as a linked list structure (NavStack) that directly holds GraphQL type objects and type graph references, eliminating the need for ID-to-object lookups throughout the codebase.
- Introduces
NavStacktype as a discriminated union for type list and type views - Replaces
GraphSelectionwith direct type object references in callbacks - Updates all components to work with the new navigation model
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.ts | Removes optimization: { minimize: true } setting from standalone build configuration |
| src/graph/viewport.ts | Updates callbacks to use separate onSelectNode and onSelectEdge handlers; changes null checking from strict to loose equality |
| src/components/utils/SearchBox.tsx | Refactors to sync local state with external value prop; updates null handling for search values |
| src/components/settings/Settings.tsx | Adds undefined to typeGraph type to handle optional navigation stack |
| src/components/doc-explorer/TypeDoc.tsx | Updates onSelectEdge callback to include from/to type objects alongside edge ID |
| src/components/doc-explorer/OtherSearchResults.tsx | Adds null check for search value; updates callback signatures to match new pattern |
| src/components/doc-explorer/DocExplorer.tsx | Major refactoring to use NavStack instead of local state; simplifies navigation logic by consuming stack from props |
| src/components/Voyager.tsx | Core rewrite introducing NavStack type and management; implements new callback handlers for navigation, search, and selection |
| src/components/GraphViewport.tsx | Adapts to NavStack-based props; implements adapter functions to convert between string IDs and type objects for viewport callbacks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1841595 to
8cae713
Compare
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.
No description provided.