github / github/app

Agent-created ignored artifacts are hidden from Files and cannot be opened fr...

未关闭
#3,281 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

# Agent-created ignored artifacts are hidden from Files and cannot be opened from chat

## Summary

Repository files under a gitignored directory are completely omitted from the GitHub Copilot Files navigator. When Copilot returns the file's absolute path in chat, the path is rendered as inert code rather than an actionable **Open in editor** link. The artifact exists and Copilot's editor canvas can open it, but the user cannot discover or open it through either visible surface.

If hiding ignored files is intentional, the lack of a **Show ignored files** toggle or an open-file action still makes this an end-to-end usability bug.

## Priority

**P1 - Major usability / artifact discoverability**

## Environment

- GitHub Copilot app: `1.0.80`
- OS: Windows
- Workspace type: local branch workspace
- Repository: `Azure/content-understanding-toolkit`
- Branch: `pr-4`
- Repository root: `C:\src\cu-cli`

## Preconditions

The repository ignores local QA artifacts:

```gitignore
**/_local_only/
_local_only/
```

## Reproduction

1. In a repository with the ignore rules above, create a Markdown artifact:

```powershell
New-Item -ItemType Directory -Force .\cu-cli\_local_only
Set-Content .\cu-cli\_local_only\repro.md "# Repro"
```

2. Confirm that the file exists and is ignored:

```powershell
Test-Path .\cu-cli\_local_only\repro.md
git check-ignore -v -- .\cu-cli\_local_only\repro.md
git status --short --ignored -- .\cu-cli\_local_only
```

3. Open the GitHub Copilot **Files** tab and expand `cu-cli`.
4. Observe that `_local_only` and `repro.md` are absent. There is no visible option to reveal ignored files.
5. Have Copilot respond with the full local path, for example:

```text
C:\src\cu-cli\cu-cli\_local_only\repro.md
```

6. Try to click the path in chat.
7. Ask Copilot to open the same file in an editor canvas. Observe that this succeeds, proving the artifact is present and readable by the application.

## Actual result

- The Files navigator omits the entire ignored directory.
- The navigator provides no visible **Show ignored files** control or ignored-file indicator.
- The local path shown in chat is not clickable and has no context action to open or reveal it.
- The user can access the artifact only if the agent explicitly invokes an editor canvas or the user leaves the app and uses the terminal/file explorer.
- The UI therefore makes an existing artifact appear missing.

## Expected result

At least one supported recovery path should be available:

1. Files provides a **Show ignored files** toggle and renders ignored files with a muted/ignored indicator; or
2. Copilot responses render recognized workspace paths as an actionable file chip/link with **Open in editor** and **Reveal in Files**; and
3. Tool-created artifacts return a visible artifact card that remains openable even when the backing file is ignored.

The ideal behavior is to provide both the navigator toggle and actionable workspace paths.

## Frequency

**100%** for files under the reproduced ignored directory.

## Impact

QA reports, generated diagnostics, benchmark output, local plans, and other artifacts are commonly gitignored intentionally. Users cannot find these outputs in Files and cannot open paths supplied by Copilot, so they may conclude that Copilot failed to create the artifact. This blocks review and sharing and forces terminal/file-explorer workarounds.

## Evidence from the affected session

```text
.gitignore:437:_local_only/ cu-cli\_local_only\cu-cli-comparison-cli-bugs-2026-08-27.md
!! cu-cli/_local_only/
Test-Path: True
File size: 9,175 bytes
```

The following repo-scoped editor canvases opened successfully even though their parent folder was absent from Files:

- `cu-cli_local_only\cu-cli-bug-bash-2026-08-26.md`
- `cu-cli_local_only\cu-cli-comparison-cli-bugs-2026-08-27.md`

Attach the screenshot showing the missing `_local_only` directory and the inert path in chat.

## Workarounds

- Ask Copilot explicitly to open the path in an editor canvas.
- Open the file through the terminal or Windows File Explorer.
- Move/copy the artifact to a nonignored path, at the risk of accidentally committing local output.

## Suggested fix

- Detect absolute and repo-relative workspace paths in assistant messages and render an **Open file** action.
- Preserve openability of artifacts created by tools regardless of git tracking/ignore state.
- Add a Files-view setting to include gitignored files, disabled by default if necessary.

贡献指南

打开贡献指南

调研方向

使用 Files 选项卡、一个被忽略的 `_local_only` 目录,以及聊天中返回的绝对工作区路径来复现该问题;使用 `git check-ignore` 和 `Test-Path` 验证文件。首先跟踪 Files 导航器和聊天路径渲染的入口点,然后将完成定义为:能够通过受支持的应用内操作发现或打开被忽略的构件,而无需使用终端或 Explorer 作为变通方案。

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

评估

技术栈
git
领域
desktop, developer-experience
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

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