Skip to content

fix(staged): use completedAt for commit prefill timeline ranking - #590

Merged
matt2e merged 1 commit into
mainfrom
app-log-and-then-code-review-bad-commit-prefix
Apr 9, 2026
Merged

fix(staged): use completedAt for commit prefill timeline ranking#590
matt2e merged 1 commit into
mainfrom
app-log-and-then-code-review-bad-commit-prefix

Conversation

@matt2e

@matt2e matt2e commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use completedAt (falling back to createdAt) instead of createdAt for ranking reviews and notes in the commit prefill timeline
  • This ensures items are ranked by when they actually finished, not when they were queued

Test plan

  • Verify commit prefill timeline shows items ordered by completion time
  • Confirm reviews and notes still appear correctly when completedAt is not set

🤖 Generated with Claude Code

The commit prefill logic used createdAt to determine the latest timeline
item, while the timeline display uses completedAt ?? createdAt. This
caused the prefill to pick the wrong item when an earlier-created review
completed after a note, showing note-based prefill instead of review-based.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e
matt2e requested review from baxen and wesbillman as code owners April 9, 2026 02:16
@matt2e
matt2e merged commit cb14519 into main Apr 9, 2026
5 checks passed
@matt2e
matt2e deleted the app-log-and-then-code-review-bad-commit-prefix branch April 9, 2026 03:02
matt2e added a commit that referenced this pull request Apr 9, 2026
Port the completedAt timeline ranking fix from #590 to use
completedAt (falling back to createdAt) for review/note candidates.
Also address code review feedback: add unit tests for
extract_suggested_next_steps, return empty string for review mode
prefill, and use .trim() for draft-clearing comparison.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
loganj added a commit that referenced this pull request Apr 9, 2026
…ktree-dis

* origin/main: (45 commits)
  feat(penpal): persist recent files activity across restarts (#595)
  feat: persist open windows, tabs, and geometry across app restarts (#588)
  feat(staged): generate next prefill text when generating notes (#594)
  feat(staged): add "Run again" button to action output dialog (#593)
  feat: queue repo sessions in project MCP with async cancellation fix (#591)
  fix(staged): lowercase "building" subtitle for consistency (#592)
  fix(staged): use completedAt for commit prefill timeline ranking (#590)
  fix: add per-branch mutex to prevent worktree setup race condition (#589)
  feat: add diff commit session launcher (#585)
  fix: avoid error state for empty titled code reviews (#587)
  fix: cancel in-flight auto reviews before manual sessions (#584)
  feat(settings): add repo context search (#583)
  fix(staged): sort timeline items by completion time so queued items appear before completed ones (#568)
  fix: drain queued branch sessions from backend lifecycle (#579)
  fix: restore resume session metadata for resumed actions (#580)
  feat(staged): add purple diff comment theme (#578)
  fix(ui): hide branch actions during setup (#572)
  fix: validate parsed PR URLs before extraction (#577)
  fix: centralize staged relative time updates (#576)
  fix: avoid UI freezes when starting background sessions (#575)
  ...

# Conflicts:
#	apps/penpal/internal/watcher/watcher.go
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