Skip to content

Implement action for branch picker with uncommitted files - #333334

Open
Ladislau Szomoru (lszomoru) wants to merge 2 commits into
mainfrom
lszomoru/agents/branch-picker-uncommitted-action
Open

Implement action for branch picker with uncommitted files#333334
Ladislau Szomoru (lszomoru) wants to merge 2 commits into
mainfrom
lszomoru/agents/branch-picker-uncommitted-action

Conversation

@lszomoru

Copy link
Copy Markdown
Member

This pull request implements an action for the branch picker in the agents window that is displayed only when the current branch has uncommitted files. The action allows users to reveal the auxiliary bar and focus on the Changes view.

Key changes include:

  • Added a Show Changes action for dirty checked-out branch rows.
  • Clean and non-current branch rows do not display the action.
  • Fixed hover layout shift by reserving space for the action toolbar.
  • Resolved focus issues to ensure the Changes tab is selected when the action is triggered.
  • Added regression tests to cover the new functionality and layout changes.

Validation: All relevant tests passed, including layout and regression tests.

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.

Copilot review overview

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity src/​vs/​platform/​actionWidget/​browser/​actionWidget.cssvisibility: hidden keeps this flex toolbar in layout, so it is already included in the row's…
What changed in this PR

Adds a dirty-branch action that opens the session’s Changes UI while stabilizing picker-row layout.

Changes:

  • Adds Show Changes to dirty checked-out branches.
  • Opens the Changes editor/view in the correct order.
  • Adds action and layout regression tests.
File Description
agentHostSessionConfigPicker.ts Adds and handles the branch action.
agentHostSessionConfigPicker.test.ts Tests visibility and navigation.
actionList.ts Marks rows containing detail text.
actionWidget.css Reserves toolbar space.
actionList.test.ts Tests stable toolbar geometry.
Suppressed comments (1)

src/vs/platform/actionWidget/browser/actionWidget.css:471

  • This computes to 10px, but the new regression test asserts toolbarMarginRight === '6px' in both states, so the test will deterministically fail with this stylesheet loaded. Align the implementation with the asserted geometry.
	margin-right: 10px;

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

Comment thread src/vs/platform/actionWidget/browser/actionWidget.css
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.

3 participants