Skip to content

fix(navigator): resolve symbol usages and prevent repetitive items - #22

Merged
spelech merged 3 commits into
mainfrom
fix/codebase-navigator-linking
Sep 18, 2026
Merged

spelech merged 3 commits into
mainfrom
fix/codebase-navigator-linking

Conversation

@spelech

@spelech spelech commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

This pull request fixes the Codebase Navigator.
The list previously showed the same symbol multiple times.
The list also failed to open target files when users clicked symbol dependencies.

Problem Description

  1. The query for callers included outgoing calls made by the current symbol.
    Because of this error, the list showed the current symbol many times.
  2. The query for callees did not include the target file path.
    Therefore, users could not click a callee to open its file.
  3. The outline query used loose path matching.
    Symbols from different files with identical names appeared in one outline.
  4. Repeated calls to one symbol created duplicate cards in the list.

Solution and Technical Changes

  1. Fix Incoming Callers Query (app/services/navigator.py):

    • Remove the condition that matched source symbol identifiers.
    • Match only relationships where the target symbol matches the selected symbol.
    • Filter records by the selected repository.
  2. Resolve Target File Paths for Callees (app/services/navigator.py):

    • Join the ast_symbols table to resolve the file path of each callee.
    • Sort internal symbols to the top of the list.
  3. Group Repeated Calls (app/services/navigator.py, NavigatorInspector.tsx):

    • Group duplicate calls by symbol name.
    • Show call count badges and all call line numbers in the interface.
  4. Add Callee Click Navigation (NavigatorInspector.tsx, navigator.css):

    • Allow user clicks on callees that have a known file path.
    • Add jump indicators and keyboard controls for accessibility.
  5. Tighten Outline Path Matching (app/services/navigator.py):

    • Use exact path matching with directory boundary checks.

Verification

  • Backend Tests:

    • Executed pytest tests/backend/test_navigator_service.py tests/backend/test_navigator_router.py.
    • All 17 tests passed.
    • Verified with real source code from app/services/navigator.py and app/api/routers/navigator.py.
  • Frontend Tests:

    • Executed vitest run src/tests/Navigator* src/tests/CodeNavigator.test.tsx.
    • All 31 tests passed.

Antigravity Agent added 3 commits September 17, 2026 21:48
…ilepaths

- Remove erroneous OR source_symbol_id condition that classified outgoing calls as incoming callers
- Join ast_symbols to resolve target_filepath and target_symbol_id for outgoing callees
- Group repeated caller and callee occurrences by symbol and provide call_count and all_lines
- Prioritize resolved internal codebase symbols to the top of callees list
- Scope queries to repo and tighten file outline filepath matching
…counts in inspector

- Make callee items clickable when target_filepath is present with Jump indicator and keyboard support
- Display call_count and multiple line numbers for grouped calls and imports
- Update types and CSS for clickable callee items and badges
- Add test coverage for onSelectCallee cross-file navigation
@spelech
spelech merged commit 88192a7 into main Sep 18, 2026
15 checks passed
@spelech
spelech deleted the fix/codebase-navigator-linking branch September 18, 2026 03:15
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