Skip to content

Fix/rm render#34

Merged
kooksee merged 7 commits intov2from
fix/rm_render
Mar 3, 2026
Merged

Fix/rm render#34
kooksee merged 7 commits intov2from
fix/rm_render

Conversation

@kooksee
Copy link
Collaborator

@kooksee kooksee commented Feb 28, 2026

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/rm_render

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the dixhttp dependency visualization server by introducing advanced UI features such as node grouping, prefix filtering, and group subgraph exploration. It also adds support for deploying the visualization under a custom base path and allows backend registration of group rules. Concurrently, the dixrender package for DOT graph generation has been removed, streamlining the project's rendering capabilities to focus on the interactive web UI. The changes aim to provide a more powerful and flexible dependency visualization experience.

Highlights

  • Enhanced UI Features: Introduced Group Rules (Prefix Aggregation), Prefix Filter, Group Subgraph visualization, and SVG export functionality to the dependency visualization UI.
  • Base Path Support: The HTTP server now supports mounting the UI and API under a configurable base path, which is beneficial for deployments behind gateways or reverse proxies.
  • Backend Group Rule Registration: Added the ability to register group rules programmatically on the backend, allowing for predefined and persistent grouping configurations.
  • Detailed Provider Information: Extended dixinternal.ProviderDetails to include package path information for output types, function names, and input types, providing richer data for visualization.
  • Removal of dixrender Package: The dixrender package, previously used for DOT format graph rendering, has been removed, streamlining the project's rendering capabilities to focus on the interactive web UI.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • dixhttp/README.md
    • Added documentation for Group Rules, Prefix Filter, Group Subgraph, and Base Path configuration.
    • Updated API examples to include GET /api/group-rules and enhanced provider JSON structure.
  • dixhttp/README_zh.md
    • Added Chinese documentation for Group Rules, Prefix Filter, Group Subgraph, and Base Path configuration.
    • Updated API examples in Chinese.
  • dixhttp/server.go
    • Implemented base path support with ServerOption and WithBasePath.
    • Introduced GroupRule struct and associated functions for managing group rules.
    • Modified setupRoutes to handle base paths and added a new /api/group-rules endpoint.
    • Updated HandleIndex to replace __DIX_BASE_PATH__ in the HTML template.
    • Extended ProviderInfo with OutputPkg, FunctionPkg, and InputPkgs.
  • dixhttp/template.html
    • Added UI controls for group aggregation, prefix filtering, and group subgraph viewing.
    • Implemented client-side JavaScript logic for new visualization features and SVG export.
    • Updated API calls to use a dynamic API_BASE path.
    • Enhanced node data to include packagePath for improved grouping and filtering.
    • Added a 'Group Detail' panel for selected group nodes.
  • dixinternal/api.go
    • Extended ProviderDetails with OutputPkg, FunctionPkg, and InputPkgs.
    • Modified GetProviderDetails to extract and include package path information for types and functions.
    • Added helper functions resolveTypePkgPath and resolveFuncPkgPath for package path resolution.
  • dixrender/renderer.go
    • Removed the entire dixrender package.
  • example/cycle/main.go
    • Removed a call to dixglobal.Graph().
  • example/go.mod
    • Updated module dependencies and removed unused indirect requirements.
  • example/go.sum
    • Updated checksums to reflect changes in go.mod.
  • example/handler/main.go
    • Removed calls to dixglobal.Graph().
  • example/struct-out/main.go
    • Removed a call to dixglobal.Graph().
Activity
  • The pull request introduces significant new features and refactors existing code.
  • It involves changes across multiple components: documentation, HTTP server logic, UI templates, and internal API structures.
  • The removal of the dixrender package suggests a consolidation of rendering efforts towards the web UI.
  • The changes to go.mod and go.sum indicate dependency updates.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request represents a significant enhancement by replacing the previous rendering mechanism with a comprehensive, interactive HTTP-based visualization tool. The changes introduce powerful features like node grouping, prefix filtering, and base path support, backed by a well-structured backend and a feature-rich frontend. The overall implementation is robust and thoughtfully designed. I have one minor suggestion to refine the prefix matching logic for improved clarity and correctness.

if (!p) continue;
const target = pkgPath || normalized;
if (this.isPathLikePrefix(p)) {
if (target.startsWith(p) || target.includes(p)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The condition target.startsWith(p) || target.includes(p) is logically equivalent to just target.includes(p), as startsWith is a more specific case of includes. For matching "path-like" prefixes, using only startsWith is more precise and aligns better with user expectations for prefix filtering. This change will prevent unintended matches where a prefix appears in the middle of a path string, making the grouping behavior more predictable and accurate.

Suggested change
if (target.startsWith(p) || target.includes(p)) {
if (target.startsWith(p)) {

@kooksee kooksee merged commit cbd40cc into v2 Mar 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant