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

未关闭
#322 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
api, frontend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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/
主要语言
Go
星标
0
派生
0
平均合并
7 小时 42 分钟
30 天内合并 PR
111

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

seanb4t/codegraph-go 的其他 Issue

查看 seanb4t/codegraph-go 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。