diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 40a8ac7..995f6d3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,70 +1,91 @@ -name: Bug Report -description: Report a bug or issue with CodeIntel +name: ๐Ÿ› Bug Report +description: Something isn't working as expected title: "[Bug]: " -labels: ["bug", "needs-triage"] +labels: ["bug", "triage"] body: - type: markdown attributes: value: | - Thanks for taking the time to report a bug! Please fill out the details below. + Thanks for taking the time to report a bug! Please fill out the sections below. - type: textarea - id: description + id: summary attributes: - label: Bug Description - description: What happened? What did you expect to happen? - placeholder: Describe the bug clearly and concisely + label: Bug Summary + description: A clear and concise description of what the bug is. + placeholder: "When I do X, Y happens instead of Z" validations: required: true - type: textarea - id: reproduction + id: reproduce attributes: label: Steps to Reproduce description: How can we reproduce this issue? placeholder: | - 1. Run command... - 2. Click on... - 3. See error... + 1. Go to '...' + 2. Click on '...' + 3. See error validations: required: true - type: textarea - id: logs + id: expected attributes: - label: Error Logs - description: Paste any relevant error messages or logs - render: shell - placeholder: Paste logs here + label: Expected Behavior + description: What should happen? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happens? Include error messages, logs, screenshots. + validations: + required: true - type: dropdown id: component attributes: label: Component - description: Which part of CodeIntel is affected? + description: Which part of the system is affected? options: - - Backend API - - Frontend UI + - Backend - API + - Backend - Indexing + - Backend - Search + - Backend - Dependency Analyzer + - Backend - DNA Extractor + - Frontend - Dashboard + - Frontend - Search UI - MCP Server - - Dependency Analysis - - Search/Indexing + - Infrastructure - Other validations: required: true - - type: input - id: version + - type: dropdown + id: severity attributes: - label: Version - description: Which version of CodeIntel are you using? - placeholder: v0.2.0 or commit SHA + label: Severity + description: How severe is this bug? + options: + - Critical - System unusable + - High - Major feature broken + - Medium - Feature impaired but workaround exists + - Low - Minor issue + validations: + required: true - type: textarea - id: environment + id: logs attributes: - label: Environment - description: System information - placeholder: | - - OS: macOS 14.1 - - Python: 3.11.5 - - Node: 20.10.0 + label: Relevant Logs + description: Paste any relevant logs here (Railway logs, browser console, etc.) + render: shell + + - type: textarea + id: context + attributes: + label: Additional Context + description: Any other context, screenshots, or information. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..74e41ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: ๐Ÿ’ฌ Questions & Discussions + url: https://github.com/OpenCodeIntel/opencodeintel/discussions + about: Ask questions or start a discussion instead of opening an issue + - name: ๐Ÿ“– Documentation + url: https://github.com/OpenCodeIntel/opencodeintel#readme + about: Check the README and docs before reporting issues diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 13f688c..2b435db 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,19 +1,19 @@ -name: Feature Request +name: โœจ Feature Request description: Suggest a new feature or enhancement title: "[Feature]: " -labels: ["enhancement", "needs-discussion"] +labels: ["enhancement", "triage"] body: - type: markdown attributes: value: | - Have an idea to make CodeIntel better? We'd love to hear it! + Thanks for suggesting a feature! Please describe your idea clearly. - type: textarea id: problem attributes: label: Problem Statement - description: What problem does this feature solve? - placeholder: Describe the pain point or use case + description: What problem does this feature solve? Who benefits? + placeholder: "As a [user type], I want [goal] so that [benefit]" validations: required: true @@ -21,8 +21,7 @@ body: id: solution attributes: label: Proposed Solution - description: How would you solve this? - placeholder: Describe your ideal solution + description: How should this work? Be specific. validations: required: true @@ -30,30 +29,63 @@ body: id: alternatives attributes: label: Alternatives Considered - description: Any other approaches you've thought about? - placeholder: Other ways to solve this + description: What other solutions did you consider? Why is your proposal better? - type: dropdown id: component attributes: label: Component - description: Which part would this affect? + description: Which part of the system would this affect? options: - - MCP Tools - - Search & Indexing - - Dependency Analysis - - Code Style Analysis - - Frontend UI - - Performance - - Documentation - - Other + - Backend - API + - Backend - Indexing + - Backend - Search + - Backend - Analysis (Dependencies/DNA/Style) + - Frontend - Dashboard + - Frontend - Search UI + - MCP Server + - New Component + - Multiple Components validations: required: true - - type: checkboxes - id: contribution + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature? + options: + - Critical - Blocking major use case + - High - Significant user value + - Medium - Nice to have + - Low - Minor improvement + validations: + required: true + + - type: dropdown + id: effort attributes: - label: Contribution - description: Would you be interested in implementing this? + label: Estimated Effort + description: How much work do you think this requires? options: - - label: I'd like to work on this feature + - Small (< 1 day) + - Medium (1-3 days) + - Large (1-2 weeks) + - XL (> 2 weeks) + - Unknown + + - type: textarea + id: mockups + attributes: + label: Mockups / Examples + description: Any wireframes, mockups, or examples from other products? + + - type: textarea + id: acceptance + attributes: + label: Acceptance Criteria + description: How do we know this feature is complete? + placeholder: | + - [ ] User can do X + - [ ] System responds with Y + - [ ] Performance meets Z threshold diff --git a/.github/ISSUE_TEMPLATE/tech_debt.yml b/.github/ISSUE_TEMPLATE/tech_debt.yml new file mode 100644 index 0000000..65b550c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/tech_debt.yml @@ -0,0 +1,98 @@ +name: ๐Ÿ”ง Technical Debt / Refactor +description: Code quality improvements, refactoring, or architectural changes +title: "[Tech Debt]: " +labels: ["tech-debt", "refactor"] +body: + - type: markdown + attributes: + value: | + Use this template for internal improvements that don't directly add features but improve code quality, maintainability, or performance. + + - type: textarea + id: current + attributes: + label: Current State + description: What's the current implementation and why is it problematic? + placeholder: | + The current implementation does X which causes: + - Problem 1 + - Problem 2 + validations: + required: true + + - type: textarea + id: proposed + attributes: + label: Proposed Change + description: What should we change and why is it better? + validations: + required: true + + - type: textarea + id: impact + attributes: + label: Impact Analysis + description: What files/components are affected? What could break? + placeholder: | + Files affected: + - file1.py + - file2.py + + Risk areas: + - ... + validations: + required: true + + - type: dropdown + id: type + attributes: + label: Type of Change + options: + - Refactor - Same behavior, cleaner code + - Performance - Speed or resource optimization + - Architecture - Structural changes + - Dependencies - Update/replace dependencies + - Testing - Add/improve tests + - Documentation - Code docs, comments, README + validations: + required: true + + - type: dropdown + id: priority + attributes: + label: Priority + options: + - Critical - Blocking development + - High - Causing frequent issues + - Medium - Improving maintainability + - Low - Nice to have cleanup + validations: + required: true + + - type: dropdown + id: effort + attributes: + label: Estimated Effort + options: + - Small (< 1 day) + - Medium (1-3 days) + - Large (1-2 weeks) + - XL (> 2 weeks) + validations: + required: true + + - type: textarea + id: migration + attributes: + label: Migration Plan + description: If this is a breaking change, how do we migrate? + placeholder: | + 1. Step 1 + 2. Step 2 + 3. Verification + + - type: textarea + id: tests + attributes: + label: Testing Strategy + description: How do we verify this doesn't break anything? diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 23e1e90..c121561 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,43 +1,52 @@ -## Description +## Summary - + -## Motivation +## Related Issue - - + +Closes # ## Type of Change -- [ ] Bug fix (non-breaking change that fixes an issue) -- [ ] New feature (non-breaking change that adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] Documentation update -- [ ] Performance improvement -- [ ] Code refactoring +- [ ] ๐Ÿ› Bug fix (non-breaking change that fixes an issue) +- [ ] โœจ New feature (non-breaking change that adds functionality) +- [ ] ๐Ÿ’ฅ Breaking change (fix or feature that would cause existing functionality to change) +- [ ] ๐Ÿ”ง Refactor (code change that neither fixes a bug nor adds a feature) +- [ ] ๐Ÿ“ Documentation (changes to docs only) +- [ ] ๐Ÿงช Test (adding or updating tests) -## Testing +## Changes Made - + -- [ ] Added new tests -- [ ] All existing tests pass -- [ ] Tested manually with the following scenarios: +- +- +- + +## Testing Done + + + +- [ ] Unit tests pass locally +- [ ] Tested manually in development +- [ ] Tested in staging/production environment + +## Screenshots / Logs + + ## Checklist - [ ] My code follows the project's code style - [ ] I have commented my code where necessary -- [ ] I have updated the documentation accordingly -- [ ] My changes generate no new warnings +- [ ] I have updated documentation if needed +- [ ] My changes don't introduce new warnings - [ ] I have added tests that prove my fix/feature works -- [ ] New and existing tests pass locally -- [ ] I have checked my code for security issues - -## Screenshots (if applicable) +- [ ] All existing tests pass - +## Deployment Notes -## Additional Context + - +None diff --git a/backend/services/dependency_analyzer.py b/backend/services/dependency_analyzer.py index 47d57aa..bad75a8 100644 --- a/backend/services/dependency_analyzer.py +++ b/backend/services/dependency_analyzer.py @@ -227,11 +227,11 @@ def _resolve_import_to_file( ) -> str: """Resolve an import to an actual file in the repo""" - # External dependency check - if not import_path.startswith('.') and not import_path.startswith('/'): - # Might still be internal for Python packages - if '/' not in import_path: - return None + # Skip obvious external packages (stdlib, third-party without dots) + # But allow dotted imports like 'starlette.exceptions' to be resolved below + if not import_path.startswith('.') and '.' not in import_path and '/' not in import_path: + # Single-word imports (os, sys, json) are always external + return None source_path = Path(source_file) source_dir = source_path.parent