-
-
Notifications
You must be signed in to change notification settings - Fork 542
Rewrite navigation stack management #482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.