Commit Graph
4 Commits
Author SHA1 Message Date
Edward ShaoandOz ffe93a5e6d Fix git diff for first commit in commit message autogen (#9291)
## Description

What: Fix AI commit message diff generation for brand-new repositories
before the first commit.

Why: `git diff HEAD` fails when HEAD does not exist yet, which prevented
commit message autogen from seeing the changes that would be committed.

How: Use the normal `git diff HEAD` path when HEAD exists. Before the
first commit, combine staged changes with unstaged edits to staged
files, then rely on the existing untracked-file synthesis for files that
have not been staged.

fixes
[APP-4264](https://linear.app/warpdotdev/issue/APP-4264/commit-message-is-not-getting-auto-generated-for-the-first-commit-in-a)
## Server API dependencies

None.

## Agent Mode

- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-04-28 19:19:25 -04:00
Edward ShaoandOz 7e189ead1a [APP-4260] Disable commit message editor during commit operation (#9235)
## Description
Disables the commit message editor while the async commit (and optional
push / create-PR chain) is in flight, so the user can't edit the message
text mid-operation.

Fixes APP-4260.

## Testing
Manually verified the editor is locked once "Confirm" is pressed and
stays locked through the async commit/push/PR flow.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Disabled the commit message editor while a git commit
is being performed in the git operations dialog.


[Conversation](https://staging.warp.dev/conversation/11795cb8-3dcc-4bcd-90c9-53f974585fe6)

Co-Authored-By: Oz <oz-agent@warp.dev>

Co-authored-by: Oz <oz-agent@warp.dev>
2026-04-28 12:32:15 -04:00
Edward ShaoandOz 3f120e438d [WAR-7381] Move "Discard all" to end of code review overflow menu (#9236)
## Description

Moves the "Discard all" menu item to the last position in
`header_menu_items_new`, so it appears after the AI context and comment
items. This matches the intended UX ordering from
[WAR-7381](https://linear.app/warpdotdev/issue/WAR-7381/discard-all-should-be-the-last-item-in-the-list).

## Testing

Manually verified the ordering logic. No new tests needed — this is a
pure reordering of existing menu items with no behavioral changes.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Oz <oz-agent@warp.dev>

Co-authored-by: Oz <oz-agent@warp.dev>
2026-04-28 12:13:46 -04:00
Edward ShaoandOz 7104a12fcf [APP-4261] Add tooltips to disabled git operation buttons (#9234)
## Description

Adds contextual tooltips to disabled git operation buttons so users
understand why they can't click them. Tooltips are intentionally limited
to **disabled states only** — enabled buttons don't get tooltips since
their labels are self-explanatory.

**Changes:**
- Code review header: "No changes to commit" on the disabled Commit
button; "No git actions available" on the disabled chevron
- Commit dialog: "Enter a commit message" on the disabled Confirm button
(only shown once file changes have loaded — silent during the async load
window)
- Bug fix: the PR #N button in the header was staying greyed out after
transitioning from a disabled Commit mode, because `ViewPr` mode never
called `set_disabled(false)`

Linear:
https://linear.app/warpdotdev/issue/APP-4261/git-buttons-should-all-have-tooltips

Warp conversation:
https://staging.warp.dev/conversation/27f5811f-22ea-4c4b-8d8f-47ff48a5b12b

Loom: https://www.loom.com/share/932cfb22039c4566bcc7a7343b624d81

## Testing

Manually verified:
- Commit button with no changes shows "No changes to commit" on hover
- Chevron with no changes shows "No git actions available" on hover
- Commit dialog Confirm button shows "Enter a commit message" once files
load but message is empty; no tooltip shown during async load
- PR #N button is no longer greyed out after committing all changes

No new automated tests added — these are tooltip strings on existing
button state logic that is already exercised by existing tests.

## Server API dependencies

N/A — client-only change.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-IMPROVEMENT: Git operation buttons now show tooltips
explaining why they're disabled (e.g. "No changes to commit", "Enter a
commit message").

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-04-28 12:13:36 -04:00