feat(ui): show the definition of each row for a name with several definitions

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
api, frontend

Research direction

Start in internal/uiserver/handlers.go, where the UI calls Callers, Callees and Impact, and in the uiv1.Location protobuf message, which needs a definition-label field. Read decision D8 in the archived change and the same-name-query-targets change (#318), which this depends on, before touching the response shapes. Done when each row carries its definition label, the three responses carry the definition list, the three requests accept a file input matching --file, and the Svelte views display both, with single-definition names unchanged.

Written by the indexing model from the issue text.

Description

area:ui enhancement priority:low
What exists today?

The graph UI calls the engine functions Callers, Callees and Impact through internal/uiserver/handlers.go. Each row is a uiv1.Location with a name, a kind, a file and a line.

How does it behave now?

The change same-name-query-targets (#318) makes those functions answer for every definition of a name. The CLI and the MCP tools then name the definition of each row and list the definitions. The UI gets the same rows, but uiv1.Location has no field for the definition, and the responses have no list of definitions. A UI row for a name with several definitions shows its own file and line. It does not show which definition it belongs to.

The UI requests also have no file input, so the UI has no way to select the definitions in one file.

How should it behave?
  • uiv1.Location carries the definition label of the row.
  • The callers, callees and impact responses carry the list of definitions.
  • The three requests accept a file, with the meaning of --file.
  • The Svelte views show the label and the list.

The design of the archived change records this cut in its decision D8.

What kind of improvement?

Other

Would this change existing behavior?

The protobuf messages gain fields, which is additive. The views show more text for a name with several definitions. A name with one definition looks the same.

Before submitting
  • I searched existing issues and this is not a duplicate
  • I checked that the current behavior is not a deliberate decision in openspec/specs/
Dominant language
Go
Stars
0
Forks
0
Avg merge
5h 16m
Merged PRs (30d)
107

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from seanb4t/codegraph-go

All issues in seanb4t/codegraph-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.