-
Notifications
You must be signed in to change notification settings - Fork 0
Implementation of Enhanced Visualization UI with Selection Row #133
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
base: develop
Are you sure you want to change the base?
Implementation of Enhanced Visualization UI with Selection Row #133
Conversation
# Motivation The **Codegen on OSS** package provides a pipeline that: - **Collects repository URLs** from different sources (e.g., CSV files or GitHub searches). - **Parses repositories** using the codegen tool. - **Profiles performance** and logs metrics for each parsing run. - **Logs errors** to help pinpoint parsing failures or performance bottlenecks. <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> see [codegen-on-oss/README.md](https://github.com/codegen-sh/codegen-sdk/blob/acfe3dc07b65670af33b977fa1e7bc8627fd714e/codegen-on-oss/README.md) # Testing <!-- How was the change tested? --> `uv run modal run modal_run.py` No unit tests yet 😿 # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [x] I have updated the documentation or added new documentation as needed
Original commit by Tawsif Kamal: Revert "Revert "Adding Schema for Tool Outputs"" (codegen-sh#894) Reverts codegen-sh#892 --------- Co-authored-by: Rushil Patel <[email protected]> Co-authored-by: rushilpatel0 <[email protected]>
Original commit by Ellen Agarwal: fix: Workaround for relace not adding newlines (codegen-sh#907)
Reviewer's GuideIntroduces interactive selection support in the visualization system by extending the backend manager with selection state, utility functions, and API endpoints, and adding corresponding frontend components, styles, tests, and documentation for the new selection row UI. Sequence Diagram for Initial Data Loading in Visualization UIsequenceDiagram
participant VUI as VisualizationUI (Frontend)
participant API as VisualizationAPI (Backend)
participant FS as Filesystem
VUI->>API: GET /api/visualization/graph
API->>FS: Read graph.json
FS-->>API: graph.json content
API-->>VUI: Respond with graph data
VUI->>API: GET /api/visualization/selection
API->>FS: Read selection.json (if exists)
FS-->>API: selection.json content
API-->>VUI: Respond with selection data
VUI->>VUI: Set graphData & selectedElement state
VUI->>VUI: Render graph & SelectionRow
Updated Class Diagram for Visualization Backend ComponentsclassDiagram
class VisualizationManager {
+RepoOperator op
+Dict~str, SelectedElement~ selected_elements
+str viz_path
+str viz_file_path
+str selection_file_path
+__init__(op: RepoOperator)
+clear_graphviz_data() void
+write_graphviz_data(G, root) void
+select_element(element: Editable) SelectedElement
+deselect_element(element_id: str) void
+clear_selection() void
+get_selected_elements() Dict~str, SelectedElement~
+get_selected_element(element_id: str) SelectedElement
+get_selected_element_methods(element_id: str) List~str~
+get_selected_element_related(element_id: str) List~str~
-_write_selection_data() void
}
note for VisualizationManager "Manages visualization graph and selection state.\nNew attributes: selected_elements, selection_file_path.\nNew methods for selection management."
class SelectedElement {
+ElementType type
+str id
+str name
+list~str~ methods
+list~str~ related_elements
}
note for SelectedElement "New dataclass to represent a selected element in the UI."
class ElementType {
<<Enumeration>>
SYMBOL
FILE
FUNCTION
CLASS
}
note for ElementType "New enum for types of selectable elements."
VisualizationManager "1" *-- "0..*" SelectedElement : stores/manages
SelectedElement "1" *-- "1" ElementType : has type
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I see a check failed - I'm on it! 🫡 |
I'm looking into the failing mypy check on PR #133. Let me examine the logs to identify the specific issue and fix it. |
I'm continuing to work on fixing the failing check for PR #133. I'll identify and fix the specific mypy type checking issues. |
✅ Fixed the failing mypy check in this commit. The issue was a type annotation problem in the The changes have been pushed to the PR branch and should resolve the mypy check failure. |
This PR implements an enhanced visualization UI with a selection row that shows corresponding methods when selecting Symbols, Files, Functions, or Classes.
Features Implemented
Selection Row UI Component: Added a new UI component that displays information about the selected element, including its methods and related elements.
Interactive Selection: Implemented functionality to select elements in the visualization and display their details in the selection row.
Relationship Visualization: Added support for visualizing relationships between selected elements.
Navigation Features: Implemented interactive features to navigate between related elements.
Implementation Details
Backend Changes
VisualizationManager
with selection functionalityFrontend Components
VisualizationUI.tsx
)SelectionRow.tsx
)Documentation and Tests
How to Use
The enhanced visualization UI can be accessed through the Codegen web interface. Users can:
Closes ZAM-421.
💻 View my work • About Codegen
Summary by Sourcery
Implement interactive selection functionality in the code visualization system by adding a selection row UI with method and related-element tabs, extending the VisualizationManager and API to track and persist selected elements, and providing utility functions for element metadata.
New Features:
Enhancements:
Documentation:
Tests:
Chores: