Skip to content

feat(vscode): show thread git metadata#2868

Merged
Hmbown merged 1 commit into
codex/v0.9.0-stewardshipfrom
codex/v090-vscode-git-meta
Jun 6, 2026
Merged

feat(vscode): show thread git metadata#2868
Hmbown merged 1 commit into
codex/v0.9.0-stewardshipfrom
codex/v090-vscode-git-meta

Conversation

@Hmbown
Copy link
Copy Markdown
Owner

@Hmbown Hmbown commented Jun 6, 2026

Summary

  • parse head and dirty from runtime thread summaries in the VS Code Agent View
  • render branch/head/dirty metadata in the thread row without adding mutation endpoints
  • mirror the v0.9 changelog credit for the IDE/Agent View request trail

Verification

  • npm ci && npm run check (extensions/vscode)
  • npm run package (extensions/vscode)
  • ./scripts/release/check-versions.sh
  • git diff --check

Credit

Thanks @AiurArtanis and @nasus9527 for the IDE/agent-view requests, and @gaord for the runtime metadata direction in #2808/#2862.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Hmbown has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Hmbown Hmbown merged commit ad70739 into codex/v0.9.0-stewardship Jun 6, 2026
2 checks passed
@Hmbown Hmbown deleted the codex/v090-vscode-git-meta branch June 6, 2026 17:51
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for rendering Git metadata, specifically the commit head and a dirty worktree flag, alongside branch metadata in the VS Code Agent View. The feedback suggests simplifying the parsing logic in runtime.ts by checking record.dirty === true directly, which would render the new readBoolean helper redundant. Additionally, it is recommended to truncate the thread.head value to a 7-character short SHA if it is a full 40-character Git commit SHA to prevent layout clutter in the VS Code sidebar.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

workspace: readString(record.workspace),
branch: readString(record.branch),
head: readString(record.head),
dirty: readBoolean(record.dirty),
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.

medium

We can simplify this by checking record.dirty === true directly, which is consistent with how archived is handled on the next line. This also makes the helper function readBoolean redundant, allowing us to remove it entirely.

Suggested change
dirty: readBoolean(record.dirty),
dirty: record.dirty === true,

Comment on lines +272 to +274
function readBoolean(value: unknown): boolean {
return value === true;
}
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.

medium

Since we can check record.dirty === true directly (similar to record.archived === true), this helper function is no longer needed and can be safely removed.

Comment on lines +142 to +144
if (thread.head) {
parts.push(`@ ${thread.head}`);
}
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.

medium

If thread.head is a full 40-character Git commit SHA, displaying it in its entirety can cause awkward text wrapping and clutter the narrow VS Code sidebar (Agent View). Truncating it to a standard 7-character short SHA when it matches a full SHA pattern improves readability and layout density.

Suggested change
if (thread.head) {
parts.push(`@ ${thread.head}`);
}
if (thread.head) {
const shortHead = /^[0-9a-f]{40}$/i.test(thread.head)
? thread.head.slice(0, 7)
: thread.head;
parts.push(`@ ${shortHead}`);
}

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.

1 participant