github / github/copilot-cli

/diff viewer shows only leaf filename in tab bar — ambiguous for lib.rs, mod.rs, etc.

未关闭
#2,910 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area:terminal-rendering
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the feature or problem you'd like to solve

The `/diff` viewer's file navigator tab bar shows only the leaf filename (`lib.rs`, `mod.rs`) instead of the full or distinguishing path. In Rust projects (and other ecosystems with convention-based filenames), dozens of files share the same leaf name, making it impossible to tell which file is which.

### Proposed solution

Show the full relative path — or at minimum a disambiguated path suffix — in the `/diff` file navigator tab bar.

Currently the tab label is the *only* file identifier, with no tooltip or secondary path display. If two changed files share a basename (e.g., `crates/driver/src/lib.rs` and `crates/runtime/src/lib.rs`), both tabs show `lib.rs` with no way to distinguish them.

**Suggested approach:** Show the full relative path in the tab label, or use VS Code-style automatic path disambiguation — when two tabs share a filename, append enough parent directory segments to distinguish them (e.g., `driver/src/lib.rs` vs `runtime/src/lib.rs`).

### Example prompts or workflows

1. Open a Rust workspace with multiple crates, make changes in two different `lib.rs` files, run `/diff` — both tabs show `lib.rs`, no way to know which is which.
2. Same problem with `mod.rs`, `main.rs`, `build.rs` across crates in a workspace.

### Additional context

This is especially painful in Rust where `lib.rs`, `mod.rs`, `main.rs`, and `build.rs` are convention-based names repeated across every crate in a workspace. Go (`main.go`), Python (`__init__.py`), and Java (`Application.java`) have similar patterns.

贡献指南

打开贡献指南

调研方向

从 /diff 的文件导航器标签栏开始,使用具有相同基名的已更改文件(例如 crates/driver/src/lib.rs 和 crates/runtime/src/lib.rs)重现该问题。确定现有的标签文本入口点,并通过显示这些文件的完整或足够的相对路径,使标签能够区分这些文件;当重复的基名不再产生歧义时即完成。

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

评估

技术栈
shell
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
58/100

把新 issue 发到你的邮箱

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