feat(playground): add inspector panel for AST/Type/Symbol/Signature/Flow info#448
feat(playground): add inspector panel for AST/Type/Symbol/Signature/Flow info#448
Conversation
Summary of ChangesHello @fansenze, 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 Playground's capabilities by adding an interactive Inspector panel. This new feature provides deep insights into the internal representation and semantic analysis of TypeScript code, making it easier for users to understand how the linter processes their code and to debug complex type-related issues. The implementation spans both the Go backend for data extraction and the React frontend for a rich, interactive visualization. Highlights
Using Gemini Code AssistThe 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
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 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
|
79a5aca to
2c6141d
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a powerful new Inspector panel to the Playground, which is a fantastic addition for exploring code structure. The backend changes in Go are extensive, with a new inspector package to build detailed AST information and caching to improve performance. The frontend is also significantly enhanced with a new resizable split-pane layout, tabbed editors for configuration, and a detailed, lazy-loading inspector UI. The overall architecture is well-thought-out. I've identified a couple of potential issues related to data handling between Go and JavaScript that could lead to bugs, and some opportunities to improve code maintainability by reducing duplication. Overall, this is a great feature enhancement.
Deploying rslint with
|
| Latest commit: |
6b9136c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://abe76016.rslint.pages.dev |
| Branch Preview URL: | https://feat-playground-inspector.rslint.pages.dev |
04a25d8 to
5f99b21
Compare
…Flow info Add a new inspector module that builds code inspection information for the Playground: - NodeInfo: AST node details with kind, flags, position, and child properties - TypeInfo: TypeScript type information with flags, properties, and signatures - SymbolInfo: Symbol table information with declarations and members - SignatureInfo: Function/method signature details - FlowInfo: Control flow analysis information Features: - Lazy loading support with shallow/full info building - External file support (e.g., lib.d.ts) via fileName field - Helper functions for finding nodes at position and getting type/signature/flow info
5f99b21 to
6b9136c
Compare
Summary
Add a new Inspector panel to the Playground for viewing detailed code structure information:
Changes
Go Backend (
internal/inspector/)inspectormodule with builders for Node/Type/Symbol/Signature/Flow infoFrontend (
website/theme/components/Playground/)API Layer
getAstInfoIPC endpointSnapshot
Node / Type / Symbol
Signature
FlowNode
Checklist