Skip to content

feat: add click-to-line navigation and highlighting for debug issues#325

Open
Medora140 wants to merge 19 commits into
imDarshanGK:mainfrom
Medora140:feature/debug-click-navigation
Open

feat: add click-to-line navigation and highlighting for debug issues#325
Medora140 wants to merge 19 commits into
imDarshanGK:mainfrom
Medora140:feature/debug-click-navigation

Conversation

@Medora140
Copy link
Copy Markdown

Description

Implemented IDE-like click-to-line navigation for debug results to improve debugging workflow and editor usability.

Features Added

  • Clicking a debug issue jumps to the corresponding line in the editor
  • Smooth auto-scrolling to the target line
  • Temporary editor highlight animation
  • Keyboard accessibility support (Enter / Space)
  • Active issue card visual state
  • Responsive line height calculation
  • Event delegation to avoid duplicate listeners

Additional Fixes

  • Fixed upstream merge regressions causing API status elements to break
  • Restored missing API configuration row
  • Fixed duplicate footer structure
  • Restored explanation panel visibility issues
  • Improved accessibility and focus states

Related Issue

Fixes #262

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Screenshots (if frontend change)

Before:

  • Clicking debug issues did nothing
  • Users had to manually locate issues inside the editor

After

  • Clicking a debug issue instantly navigates to the correct line
  • Editor auto-scrolls smoothly
  • Selected issue is visually highlighted
  • Improved IDE-like debugging experience
image

Test evidence

Frontend tested locally

pytest -v
================================ test session starts =================================
platform win32 -- Python 3.12.4, pytest-9.0.3, pluggy-1.6.0 -- C:\Users\Medora Gomes\Desktop\GSSOC\AI-dev-assistant\AI-dev-assistant\venv\Scripts\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\Medora Gomes\Desktop\GSSOC\AI-dev-assistant\AI-dev-assistant
plugins: anyio-4.13.0, asyncio-1.3.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 93 items                                                                    

backend/tests/test_digest.py::test_subscribe_success PASSED                     [  1%]
backend/tests/test_digest.py::test_subscribe_duplicate_returns_409 PASSED       [  2%]
backend/tests/test_digest.py::test_subscribe_re_activates_after_unsubscribe PASSED [  3%]
backend/tests/test_digest.py::test_unsubscribe_success PASSED                   [  4%]
backend/tests/test_digest.py::test_unsubscribe_wrong_token PASSED               [  5%]
backend/tests/test_digest.py::test_unsubscribe_nonexistent PASSED               [  6%]
backend/tests/test_digest.py::test_get_unsubscribe_link PASSED                  [  7%]
backend/tests/test_digest.py::test_invalid_email PASSED                         [  8%]
backend/tests/test_digest.py::test_subscribe_stores_token PASSED                [  9%]
backend/tests/test_endpoints.py::test_root PASSED                               [ 10%]
backend/tests/test_endpoints.py::test_health PASSED                             [ 11%]
backend/tests/test_endpoints.py::test_rate_limit_headers_on_success_response PASSED [ 12%]
backend/tests/test_endpoints.py::test_rate_limit_returns_429_with_retry_after_header PASSED [ 13%]
backend/tests/test_endpoints.py::test_explanation_python PASSED                 [ 15%]
backend/tests/test_endpoints.py::test_explanation_no_language_hint PASSED       [ 16%]
backend/tests/test_endpoints.py::test_explanation_rust PASSED                   [ 17%]
backend/tests/test_endpoints.py::test_explanation_detects_rust_without_hint PASSED [ 18%]
backend/tests/test_endpoints.py::test_explanation_accepts_rust_hint_alias PASSED [ 19%]
backend/tests/test_endpoints.py::test_explanation_empty_code PASSED             [ 20%]
backend/tests/test_endpoints.py::test_explanation_too_long PASSED               [ 21%]
backend/tests/test_endpoints.py::test_explanation_typescript PASSED             [ 22%]
backend/tests/test_endpoints.py::test_explanation_java PASSED                   [ 23%]
backend/tests/test_endpoints.py::test_explanation_cpp PASSED                    [ 24%]
backend/tests/test_endpoints.py::test_explanation_cyclomatic_fields_present PASSED [ 25%]
backend/tests/test_endpoints.py::test_explanation_cyclomatic_simple PASSED      [ 26%]
backend/tests/test_endpoints.py::test_explanation_cyclomatic_moderate PASSED    [ 27%]
backend/tests/test_endpoints.py::test_explanation_cyclomatic_high PASSED        [ 29%]
backend/tests/test_endpoints.py::test_explanation_cyclomatic_very_high PASSED   [ 30%]
backend/tests/test_endpoints.py::test_debug_detects_zero_division PASSED        [ 31%]
backend/tests/test_endpoints.py::test_debug_detects_hardcoded_secret PASSED     [ 32%]
backend/tests/test_endpoints.py::test_debug_detects_bare_except PASSED          [ 33%]
backend/tests/test_endpoints.py::test_debug_detects_eval PASSED                 [ 34%]
backend/tests/test_endpoints.py::test_debug_clean_code PASSED                   [ 35%]
backend/tests/test_endpoints.py::test_debug_javascript PASSED                   [ 36%]
backend/tests/test_endpoints.py::test_debug_java PASSED                         [ 37%]
backend/tests/test_endpoints.py::test_debug_cpp PASSED                          [ 38%]
backend/tests/test_endpoints.py::test_explanation_php PASSED                    [ 39%]
backend/tests/test_endpoints.py::test_explanation_detects_php_without_hint PASSED [ 40%]
backend/tests/test_endpoints.py::test_debug_php PASSED                          [ 41%]
backend/tests/test_endpoints.py::test_debug_php_buggy_patterns PASSED           [ 43%]
backend/tests/test_endpoints.py::test_debug_rust PASSED                         [ 44%]
backend/tests/test_endpoints.py::test_debug_rust_buggy_patterns PASSED          [ 45%]
backend/tests/test_endpoints.py::test_debug_kotlin PASSED                       [ 46%]
backend/tests/test_endpoints.py::test_debug_cpp_syntax_errors PASSED            [ 47%]
backend/tests/test_endpoints.py::test_debug_issue_has_required_fields PASSED    [ 48%]
backend/tests/test_endpoints.py::test_js_ts_security_patterns PASSED            [ 49%]
backend/tests/test_endpoints.py::test_suggestions_returns_score PASSED          [ 50%]
backend/tests/test_endpoints.py::test_suggestions_perfect_score PASSED          [ 51%]
backend/tests/test_endpoints.py::test_full_analyze PASSED                       [ 52%]
backend/tests/test_endpoints.py::test_full_analyze_uses_cache_for_identical_inputs PASSED [ 53%]
backend/tests/test_endpoints.py::test_analyze_cache_expires PASSED              [ 54%]
backend/tests/test_endpoints.py::test_memory_cache_evicts_least_recently_used_entries PASSED [ 55%]
backend/tests/test_endpoints.py::test_full_analyze_all_languages PASSED         [ 56%]
backend/tests/test_endpoints.py::test_missing_code_field PASSED                 [ 58%]
backend/tests/test_endpoints.py::test_unicode_code PASSED                       [ 59%]
backend/tests/test_endpoints.py::test_single_line_code PASSED                   [ 60%]
backend/tests/test_endpoints.py::test_explanation_swift PASSED                  [ 61%]
backend/tests/test_endpoints.py::test_explanation_swift_with_hint PASSED        [ 62%]
backend/tests/test_history.py::test_save_history PASSED                         [ 63%]
backend/tests/test_history.py::test_get_history PASSED                          [ 64%]
backend/tests/test_history.py::test_get_history_pagination PASSED               [ 65%]
backend/tests/test_history.py::test_search_history PASSED                       [ 66%]
backend/tests/test_history.py::test_delete_history PASSED                       [ 67%]
backend/tests/test_history.py::test_delete_nonexistent PASSED                   [ 68%]
backend/tests/test_history.py::test_history_entry_fields PASSED                 [ 69%]
backend/tests/test_history.py::test_search_no_results PASSED                    [ 70%]
backend/tests/test_ping.py::test_ping PASSED                                    [ 72%]
backend/tests/test_python_ast_analyzer.py::test_detects_missing_bracket_syntax_error PASSED [ 73%]
backend/tests/test_python_ast_analyzer.py::test_detects_invalid_indentation_syntax_error PASSED [ 74%]
backend/tests/test_python_ast_analyzer.py::test_detects_division_by_zero_expression PASSED [ 75%]
backend/tests/test_python_ast_analyzer.py::test_detects_division_by_zero_inside_function_call PASSED [ 76%]
backend/tests/test_python_ast_analyzer.py::test_detects_out_of_range_list_index PASSED [ 77%]
backend/tests/test_python_ast_analyzer.py::test_detects_out_of_range_string_index PASSED [ 78%]
backend/tests/test_python_ast_analyzer.py::test_detects_string_integer_concatenation PASSED [ 79%]
backend/tests/test_share.py::test_create_and_fetch_share PASSED                 [ 80%]
backend/tests/test_share.py::test_expired_share_returns_404 PASSED              [ 81%]
tests/test_api_integration.py::test_debugging_endpoint_with_line_numbers PASSED [ 82%]
tests/test_api_integration.py::test_suggestions_endpoint_with_line_ranges PASSED [ 83%]
tests/test_api_integration.py::test_analyze_endpoint_integration PASSED         [ 84%]
tests/test_api_integration.py::test_context_in_response PASSED                  [ 86%]
tests/test_api_integration.py::test_line_numbers_are_correct PASSED             [ 87%]
tests/test_line_references.py::test_format_code_snippet PASSED                  [ 88%]
tests/test_line_references.py::test_find_lines_matching_pattern PASSED          [ 89%]
tests/test_line_references.py::test_find_function_lines_python PASSED           [ 90%]
tests/test_line_references.py::test_find_undocumented_lines PASSED              [ 91%]
tests/test_line_references.py::test_bug_detection_has_line_numbers PASSED       [ 92%]
tests/test_line_references.py::test_suggestions_include_line_ranges PASSED      [ 93%]
tests/test_line_references.py::test_magic_numbers_detection_with_lines PASSED   [ 94%]
tests/test_line_references.py::test_documentation_quality_with_lines PASSED     [ 95%]
tests/test_line_references.py::test_response_schema PASSED                      [ 96%]
tests/test_line_references.py::test_line_numbers_are_one_based PASSED           [ 97%]
tests/test_line_references.py::test_empty_code_edge_case PASSED                 [ 98%]
tests/test_line_references.py::test_large_code_performance PASSED               [100%]

================================= 93 passed in 4.39s =================================

@Medora140 Medora140 requested a review from imDarshanGK as a code owner May 25, 2026 14:41
@github-actions github-actions Bot added type:frontend Frontend related tasks type:backend Backend related tasks testing labels May 25, 2026
@imDarshanGK imDarshanGK added type:enhancement Documentation related changes level:intermediate Intermediate tasks gssoc2026 Official GSSoC 2026 issue and removed type:backend Backend related tasks testing labels May 26, 2026
@imDarshanGK
Copy link
Copy Markdown
Owner

@Medora140 update the branch with the latest main changes.

@github-actions github-actions Bot added type:backend Backend related tasks testing labels May 26, 2026
@Medora140
Copy link
Copy Markdown
Author

Hi @imDarshanGK, All merge conflicts have been resolved and the click-to-line debug navigation feature is now fully implemented and tested locally.

Please let me know if any additional changes are needed. Thanks!

@imDarshanGK
Copy link
Copy Markdown
Owner

@Medora140 update the branch with the latest main changes.

@imDarshanGK
Copy link
Copy Markdown
Owner

@Medora140 update your branch with the latest main changes and resolve conflicts

@imDarshanGK
Copy link
Copy Markdown
Owner

@Medora140 resolve conflicts

@imDarshanGK
Copy link
Copy Markdown
Owner

@Medora140
image

@Medora140
Copy link
Copy Markdown
Author

Hi @imDarshanGK,

I’m currently having semester exams, so my response time may be slightly delayed. Could you please allow me around 2 days to fully sync with the latest main branch, resolve the remaining frontend static check issues, and clean up the merge conflicts properly?

I’m actively working on the fixes and will update the PR as soon as possible. Thanks for your patience!

Medora140 and others added 4 commits May 30, 2026 22:54
Resolve index.html conflicts by preserving security-utils integration, API fallback, and delegated issue-card navigation with line highlighting.

Co-authored-by: Cursor <cursoragent@cursor.com>
…nflicts.

Preserve click-to-line navigation and security-utils integration while adopting upstream file-upload label and API fallback improvements.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc2026 Official GSSoC 2026 issue level:intermediate Intermediate tasks type:backend Backend related tasks type:enhancement Documentation related changes type:frontend Frontend related tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Click-to-Line Highlighting for Debug Results

3 participants