feat(typescript-beta): strengthen typescript grammar detection and in… - #1264
Conversation
…clude next js endpoint detection as a starting example
|
Connected to Huly®: UNOPL-1411 |
|
Claude finished @JayGhiya's task —— View job Code Review Complete ✅I've completed a thorough review of this TypeScript framework detection implementation. Here's my comprehensive feedback: Review Checklist:
🟢 StrengthsArchitecture & Design
Implementation Quality
Test Coverage
🟡 Areas for ImprovementError Handling & Robustness
Code Quality & Maintainability
Performance Considerations
🟢 Security Assessment
🟢 Framework Definition QualityThe Next.js framework definition in
🔧 Specific RecommendationsHigh Priority
Medium Priority
Low Priority
📊 Overall AssessmentThis is a high-quality implementation that demonstrates:
The code is production-ready with the minor improvements noted above. The TypeScript framework detection capability will be a valuable addition to the codebase. Recommendation: ✅ Approve with suggested improvements to be addressed in follow-up work. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0489d94e0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,7 @@ | |||
| (export_statement | |||
| declaration: (function_declaration | |||
| name: (identifier) @export_name @function_name | |||
There was a problem hiding this comment.
Capture export name separately from declaration name
The query binds @export_name and @function_name to the exact same identifier node, so construct_query.export_name_regex cannot actually filter an exported symbol independently of the declaration name. This breaks the schema contract for cases like function handler() {} with export { handler as GET }, where export-name matching should work but will never be detected with the current pattern.
Useful? React with 👍 / 👎.
| if self.context.framework_detection_service is not None: | ||
| detections = await self.context.framework_detection_service.detect_features( |
There was a problem hiding this comment.
Restrict Next.js handler detection to route.ts files
Framework detection is invoked for every .ts file without any file-convention gate, but the new Next.js feature definition describes App Router handlers in route.ts; this means any non-route module that imports next/server and exports GET/POST can be misclassified as an HTTP endpoint startpoint. That creates false positives in downstream framework usage data unless detection is constrained by filename/path (or equivalent context) before calling the detector.
Useful? React with 👍 / 👎.
feat(typescript-beta): strengthen typescript grammar detection and in…
…clude next js endpoint detection as a starting example