Skip to content

fix(freebuff): derive commit summaries from git changes#853

Open
victorxheng wants to merge 1 commit into
mainfrom
fix/meaningful-push-commit-messages-20260707
Open

fix(freebuff): derive commit summaries from git changes#853
victorxheng wants to merge 1 commit into
mainfrom
fix/meaningful-push-commit-messages-20260707

Conversation

@victorxheng

Copy link
Copy Markdown

User request

A Freebuff cloud user reported that commits shown in the Git tab after pushing use the original prompt text as the commit description instead of a meaningful summary of the actual project changes. The attached screenshot showed prompt-derived commit titles such as Freebuff: Add this below the AI instructions... and Before: When committing changes....

Implementation

  • Added summarizeGitChangesForCommit, a deterministic shared helper that builds concise commit titles from git status/diff paths instead of user prompt text.
  • Covered the reported case with a unit test: modified AGENTS.md plus new CHANGELOG.md now summarizes as Update AI agent instructions and add changelog.
  • Strengthened the commit tool guide so agent-created commits explicitly base title/body on actual git status/diff and never copy/truncate the original prompt.
  • Updated the example git-committer agent instructions to follow the same rule.

Validation

  • bun test common/src/util/__tests__/git-commit-summary.test.ts
  • cd common && bun run typecheck
  • git diff --check

Confidence

Ready for review. The exact cloud Git-tab route is not present in this public snapshot, so this PR places the fix in shared code and the commit-generation contract that cloud/private code can call or inherit. The covered behavior directly matches the user report and prevents prompt-only summaries in the shared agent commit path.

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