Repository navigation
Sort local branches by latest commit timestamp - #25
Conversation
- Order `listGitBranches` by each branch's most recent commit date - Keep current/default/name tiebreakers for stable ordering - Add integration test coverage with dated commits to verify recency sort
|
Caution Review failedThe pull request is closed. WalkthroughListGitBranches now gathers per-branch committer timestamps (via git for-each-ref) and uses them to order branches: current branch first, default branch second, then the rest by recency (newest first). Tests add a commitWithDate helper, deterministic dated commits, and a failure-path test for recency lookup. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Sort branches by latest commit timestamp and keep current branch first and default branch second in
|
Greptile OverviewGreptile SummaryChanged
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as WebSocket Client
participant Server as wsServer
participant Git as GitCoreService
participant Cmd as git commands
Client->>Server: WS_METHODS.gitListBranches
Server->>Git: listGitBranches(cwd)
par Parallel git operations
Git->>Cmd: git branch -a
Cmd-->>Git: branch list
and
Git->>Cmd: git symbolic-ref refs/remotes/origin/HEAD
Cmd-->>Git: default branch ref
and
Git->>Cmd: git worktree list --porcelain
Cmd-->>Git: worktree paths
and
Git->>Cmd: git for-each-ref --format=%(refname:short)%09%(committerdate:unix)
Cmd-->>Git: branch timestamps
end
Git->>Git: Parse branch timestamps into Map
Git->>Git: Parse worktree paths into Map
Git->>Git: Build branch objects with metadata
Git->>Git: Sort by: recency → current → default → alphabetical
Git-->>Server: { branches, isRepo }
Server-->>Client: sorted branch list
Last reviewed commit: 6dfb9f1 |
- Keep the current branch first - Place the default branch second - Sort remaining branches by most recent commit and update tests for this behavior Co-authored-by: codex <codex@users.noreply.github.com>
- move branch recency parsing into `readBranchRecency` - fall back to an empty recency map if lookup fails - add test to ensure branches still list when recency read times out Co-authored-by: codex <codex@users.noreply.github.com>
Scrolling slides the tiles it has: ~9 ms a wheel notch instead of ~24
…les' (pingdotgg#25) from fix/GMA-737-desktop-profile into custom-local
chore(sync): merge pingdotgg/t3code main
… the chat on tall windows' (pingdotgg#25) from feat/portrait-layout into dev
…ckaging Port built-in pstack from scriptedalchemy/main (PRs pingdotgg#8, pingdotgg#12, pingdotgg#20, pingdotgg#25, pingdotgg#26, pingdotgg#27, pingdotgg#38, pingdotgg#46, pingdotgg#51, pingdotgg#102, pingdotgg#117, pingdotgg#153) onto current main. - packages/pstack (snapshot 0.15.43-t3code.1), shared/pstack, server pstack module and client-runtime providerSkills taken verbatim from the fork. - Server: PstackPack layer, composer expansion on turn start and steer, pstack catalog in server config and live pstackUpdated snapshots, orchestrationTargets helpers shared with the MCP service, driverKind targets prefer instances advertising the requested model and options, orchestrator_capabilities allModels for setup-pstack, and native pstack@<marketplace> plugins switched off in Claude and Codex sessions. - pstackEnabled is on by default; toggle lives in Settings > Labs on web and mobile, with i18n for all locales. - Packaging: CLI build, CLI archive, desktop artifact, WSL tree and desktop backend carry the pack and point the server at it. Adapted to main: no provider cooldowns or inference routes upstream, so role resolution uses providerConstraints and the retired-route migration and its tests are dropped; turn start expands only messages that reference pstack; fork-only linked-delegation driverKind refusal is not ported because main resolves driverKind remotely. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
listGitBranchessorting to prioritize branches with the most recent commit timestampgit for-each-ref --format=%(refname:short)%09%(committerdate:unix) refs/headsTesting
apps/server/src/git.test.tsto verify branch list order is based on most recent commit (newer-branchbeforeolder-brancheven when not current)Summary by CodeRabbit