feat: show sub-issues inline in the issue detail view by lmilbaum · Pull Request #9073 · microsoft/vscode-pull-request-github · GitHub
Skip to content

feat: show sub-issues inline in the issue detail view - #9073

Open
Liora Milbaum (lmilbaum) wants to merge 1 commit into
microsoft:mainfrom
lmilbaum:feat/sub-issues
Open

Liora Milbaum (lmilbaum) wants to merge 1 commit into
microsoft:mainfrom
lmilbaum:feat/sub-issues

Conversation

@lmilbaum

Copy link
Copy Markdown

Summary

  • Fetch sub-issues via REST GET /repos/{owner}/{repo}/issues/{n}/sub_issues (per_page=100) and render them inline under the description when viewing a parent issue
  • Add SubIssueReference type, convertRESTSubIssue() converter, and IssueModel.getSubIssues() -- errors (404/410 for older GHES, other) return [] without blocking pr.initialize
  • Add SubIssues React component with open/closed state icons, title, #N / owner/repo#N label (cross-repo prefix), and assignee avatars
  • Resolve sub-issue URLs to vscode:// in-editor links with per-item fallback to html_url on error
  • Add webview tests, IssueModel unit tests, and an IssueOverviewPanel wiring test

Closes #6596

How to test

  1. Open a GitHub issue that has sub-issues on any repo
  2. Open the issue in VS Code via the GitHub Issues panel
  3. Confirm: a "Sub-issues" section appears under the description showing each child's title, state icon, and assignees
  4. Click a sub-issue row -- it should open that sub-issue in a new issue webview inside VS Code
  5. Close one of the sub-issues on GitHub, then click "Refresh" in the panel -- the icon should flip to closed
  6. Open an issue with no sub-issues -- confirm no "Sub-issues" section appears
  7. Open a pull request -- confirm no "Sub-issues" section appears

Reviewer notes

  • Only the issue panel fetches sub-issues; PR code paths are untouched
  • 404/410 responses (older GHES or missing access) degrade silently -- the section is hidden
  • The feature is read-only; editing sub-issues is a natural follow-up
  • Open question for maintainers: placement under description (GitHub.com parity, chosen here) vs. a sidebar Section like "Linked Issues" -- happy to move it if preferred

🤖 Generated with Claude Code

- Fetch sub-issues via REST GET /repos/{owner}/{repo}/issues/{n}/sub_issues (per_page=100) and render them inline under the description when viewing a parent issue
- Add SubIssueReference type, convertRESTSubIssue() converter, and IssueModel.getSubIssues() -- errors (404/410 for older GHES, other) return [] and are logged without blocking pr.initialize
- Add SubIssues React component with open/closed state icons, title, #N / owner/repo#N label, and assignee avatars; cross-repo sub-issues show their owner/repo prefix
- Resolve sub-issue URLs to vscode:// in-editor links with per-item fallback to html_url on error so clicking a sub-issue opens it inside VS Code
- Add webview tests, IssueModel unit tests, and an IssueOverviewPanel wiring test

Closes microsoft#6596

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@lmilbaum
Liora Milbaum (lmilbaum) marked this pull request as ready for review October 16, 2026 18:55
Copilot AI balanced review requested due to automatic review settings October 16, 2026 18:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Enterprise server links can resolve against GitHub.com, and child state and assignees lack accessible text.

2 open findings
What changed in this PR

Adds read-only sub-issues beneath issue descriptions in the extension, addressing the visualization portion of #6596.

Changes:

  • Fetches and converts sub-issues, returning an empty list on errors.
  • Displays child state, repository labels, assignees, and in-editor links.
  • Adds model, panel wiring, and rendering tests.
File Description
webviews/​editorWebview/​test/​overview.test.tsx Tests rendering and visibility rules.
webviews/​editorWebview/​test/​builder/​pullRequest.ts Adds sub-issue test data support.
webviews/​editorWebview/​overview.tsx Places sub-issues below issue descriptions.
webviews/​editorWebview/​index.css Styles rows and assignee avatars.
webviews/​components/​subIssues.tsx Adds the sub-issue list component.
src/​test/​github/​issueOverview.test.ts Tests initialization and in-editor links.
src/​test/​github/​issueModel.test.ts Tests REST conversion and unavailable endpoints.
src/​github/​views.ts Adds sub-issues to webview data.
src/​github/​utils.ts Converts REST sub-issue responses.
src/​github/​issueOverview.ts Fetches children and resolves links.
src/​github/​issueModel.ts Adds sub-issue retrieval.
src/​github/​interface.ts Defines sub-issue references.
src/​github/​common.ts Adds the REST response type.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +421 to +422
const webviewUri = await toOpenIssueWebviewUri({ owner: subIssue.owner, repo: subIssue.repo, issueNumber: subIssue.number });
return { ...subIssue, url: webviewUri.toString() };
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.

Sub-issues

2 participants