Skip to content

Commit f53d70b

Browse files
wesmclaude
andauthored
Rename ID to JobID in TUI queue view (#211)
## Summary - Rename the "ID" column header to "JobID" in the TUI queue view for clarity - Set minimum column width to 5 so the header doesn't overflow and misalign rows - Fix a `gofmt`-mangled comment in `shellEscape` where `''` was converted to a curly quote - Run `gofmt` across the codebase and add workflow guidelines to CLAUDE.md closes #209 <img width="996" height="794" alt="image" src="https://github.com/user-attachments/assets/cdc74374-abd2-41f8-8c9b-517a560ab877" /> ## Test plan - [x] Run `roborev tui` and verify the queue view shows "JobID" column header aligned with data rows - [x] Verify `go vet ./...` passes cleanly - [x] Check `internal/daemon/hooks.go` comment on `shellEscape` reads correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 21e05fe commit f53d70b

29 files changed

+197
-197
lines changed

CLAUDE.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
roborev is an automatic code review daemon for git commits. It runs locally, triggered by post-commit hooks, and uses AI agents (Codex, Claude Code) to review commits in parallel.
66

7+
## General Workflow
8+
9+
When a task involves multiple steps (e.g., implement + commit + PR), complete ALL steps in sequence without stopping. If creating a branch, committing, and opening a PR, finish the entire chain.
10+
11+
## Go Development
12+
13+
After making any Go code changes, always run `go fmt ./...` and `go vet ./...` before committing. Stage ALL resulting changes, including formatting-only files.
14+
15+
## Git Workflow
16+
17+
Always commit after completing each piece of work — do not wait to be asked. When committing changes, always stage ALL modified files (including formatting, generated files, and ancillary changes). Run `git diff` and `git status` before committing to ensure nothing is left unstaged.
18+
719
## Architecture
820

921
```
@@ -81,4 +93,4 @@ CLI reads this to find the daemon. If port 7373 is busy, daemon auto-increments.
8193
- No emojis in code or output (except commit messages)
8294
- Never amend commits; always create new commits for fixes
8395
- Never push or pull unless explicitly asked by the user
84-
- Never change git branches unless explicitly asked by the user
96+
- **NEVER change git branches without explicit user confirmation**. Always ask before switching, creating, or checking out branches. This is non-negotiable.

cmd/roborev/analyze.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313
"strings"
1414
"time"
1515

16-
"github.com/spf13/cobra"
1716
"github.com/roborev-dev/roborev/internal/agent"
1817
"github.com/roborev-dev/roborev/internal/config"
1918
"github.com/roborev-dev/roborev/internal/git"
2019
"github.com/roborev-dev/roborev/internal/prompt/analyze"
2120
"github.com/roborev-dev/roborev/internal/storage"
21+
"github.com/spf13/cobra"
2222
)
2323

2424
// Maximum time to wait for an analysis job to complete

cmd/roborev/fix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import (
1212
"strings"
1313
"time"
1414

15-
"github.com/spf13/cobra"
1615
"github.com/roborev-dev/roborev/internal/agent"
1716
"github.com/roborev-dev/roborev/internal/config"
1817
"github.com/roborev-dev/roborev/internal/git"
1918
"github.com/roborev-dev/roborev/internal/storage"
19+
"github.com/spf13/cobra"
2020
)
2121

2222
func fixCmd() *cobra.Command {

cmd/roborev/fix_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ func (a *fakeAgent) Review(ctx context.Context, repoPath, commitSHA, prompt stri
702702
return a.reviewFn(ctx, repoPath, commitSHA, prompt, output)
703703
}
704704
func (a *fakeAgent) WithReasoning(level agent.ReasoningLevel) agent.Agent { return a }
705-
func (a *fakeAgent) WithAgentic(agentic bool) agent.Agent { return a }
706-
func (a *fakeAgent) WithModel(model string) agent.Agent { return a }
705+
func (a *fakeAgent) WithAgentic(agentic bool) agent.Agent { return a }
706+
func (a *fakeAgent) WithModel(model string) agent.Agent { return a }
707707

708708
func TestFixJobDirectUnbornHead(t *testing.T) {
709709
if _, err := exec.LookPath("git"); err != nil {
@@ -1344,11 +1344,11 @@ func TestTruncateString(t *testing.T) {
13441344
{"hello", 0, ""},
13451345
{"hello", -1, ""},
13461346
// Unicode handling: ensure multi-byte characters aren't split
1347-
{"こんにちは世界", 5, "こん..."}, // Japanese: maxLen=5, output is 2 chars + "..." = 5 runes
1348-
{"こんにちは", 10, "こんにちは"}, // Japanese: fits within limit
1349-
{"Hello 世界!", 8, "Hello..."}, // Mixed ASCII and Unicode
1350-
{"🎉🎊🎁🎄🎅", 3, "🎉🎊🎁"}, // Emoji: exactly 3 runes
1351-
{"🎉🎊🎁🎄🎅", 4, "🎉..."}, // Emoji: truncate with ellipsis
1347+
{"こんにちは世界", 5, "こん..."}, // Japanese: maxLen=5, output is 2 chars + "..." = 5 runes
1348+
{"こんにちは", 10, "こんにちは"}, // Japanese: fits within limit
1349+
{"Hello 世界!", 8, "Hello..."}, // Mixed ASCII and Unicode
1350+
{"🎉🎊🎁🎄🎅", 3, "🎉🎊🎁"}, // Emoji: exactly 3 runes
1351+
{"🎉🎊🎁🎄🎅", 4, "🎉..."}, // Emoji: truncate with ellipsis
13521352
}
13531353

13541354
for _, tt := range tests {

cmd/roborev/list_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ func TestListCommand(t *testing.T) {
1616
finished := now.Add(-5 * time.Second)
1717
testJobs := []storage.ReviewJob{
1818
{
19-
ID: 1,
20-
GitRef: "abc1234567890",
21-
RepoName: "myrepo",
22-
Agent: "test",
23-
Status: storage.JobStatusDone,
24-
StartedAt: &started,
19+
ID: 1,
20+
GitRef: "abc1234567890",
21+
RepoName: "myrepo",
22+
Agent: "test",
23+
Status: storage.JobStatusDone,
24+
StartedAt: &started,
2525
FinishedAt: &finished,
2626
},
2727
{

cmd/roborev/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ import (
1313
"os"
1414
"os/exec"
1515
"os/signal"
16-
"sort"
1716
"path/filepath"
1817
"runtime"
18+
"sort"
1919
"strconv"
2020
"strings"
2121
"syscall"
2222
"text/tabwriter"
2323
"time"
2424

25-
"github.com/spf13/cobra"
2625
"github.com/roborev-dev/roborev/internal/agent"
2726
"github.com/roborev-dev/roborev/internal/config"
2827
"github.com/roborev-dev/roborev/internal/daemon"
@@ -32,6 +31,7 @@ import (
3231
"github.com/roborev-dev/roborev/internal/storage"
3332
"github.com/roborev-dev/roborev/internal/update"
3433
"github.com/roborev-dev/roborev/internal/version"
34+
"github.com/spf13/cobra"
3535
)
3636

3737
var (
@@ -1280,7 +1280,7 @@ Examples:
12801280

12811281
var jobsResp struct {
12821282
Jobs []storage.ReviewJob `json:"jobs"`
1283-
HasMore bool `json:"has_more"`
1283+
HasMore bool `json:"has_more"`
12841284
}
12851285
if err := json.NewDecoder(resp.Body).Decode(&jobsResp); err != nil {
12861286
return fmt.Errorf("failed to parse response: %w", err)
@@ -2087,9 +2087,9 @@ func skillsCmd() *cobra.Command {
20872087
fmt.Println("Skills:")
20882088
for _, s := range available {
20892089
fmt.Printf("\n %s\n", s.Name)
2090-
if s.Description != "" {
2091-
fmt.Printf(" %s\n", s.Description)
2092-
}
2090+
if s.Description != "" {
2091+
fmt.Printf(" %s\n", s.Description)
2092+
}
20932093

20942094
for _, a := range agents {
20952095
var as *skills.AgentStatus

cmd/roborev/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"time"
2424

2525
"github.com/roborev-dev/roborev/internal/agent"
26-
"github.com/roborev-dev/roborev/internal/git"
2726
"github.com/roborev-dev/roborev/internal/daemon"
27+
"github.com/roborev-dev/roborev/internal/git"
2828
"github.com/roborev-dev/roborev/internal/storage"
2929
"github.com/roborev-dev/roborev/internal/version"
3030
)

cmd/roborev/refine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import (
1515
"time"
1616

1717
"github.com/mattn/go-isatty"
18-
"github.com/spf13/cobra"
1918
"github.com/roborev-dev/roborev/internal/agent"
2019
"github.com/roborev-dev/roborev/internal/config"
2120
"github.com/roborev-dev/roborev/internal/daemon"
2221
"github.com/roborev-dev/roborev/internal/git"
2322
"github.com/roborev-dev/roborev/internal/prompt"
2423
"github.com/roborev-dev/roborev/internal/storage"
24+
"github.com/spf13/cobra"
2525
)
2626

2727
// postCommitWaitDelay is the delay after creating a commit before checking

cmd/roborev/refine_test.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ type mockDaemonClient struct {
5454
// Track calls for assertions
5555
addressedJobIDs []int64
5656
addedComments []addedComment
57-
enqueuedReviews []enqueuedReview
57+
enqueuedReviews []enqueuedReview
5858

5959
// Auto-incrementing review ID counter for WithReview
6060
nextReviewID int64
6161

6262
// Configurable errors for testing error paths
63-
markAddressedErr error
64-
getReviewBySHAErr error
63+
markAddressedErr error
64+
getReviewBySHAErr error
6565
}
6666

6767
type addedComment struct {
@@ -1082,39 +1082,39 @@ func TestWorktreeCleanupBetweenIterations(t *testing.T) {
10821082

10831083
func TestResolveReasoningWithFast(t *testing.T) {
10841084
tests := []struct {
1085-
name string
1086-
reasoning string
1087-
fast bool
1085+
name string
1086+
reasoning string
1087+
fast bool
10881088
reasoningExplicitlySet bool
1089-
want string
1089+
want string
10901090
}{
10911091
{
1092-
name: "fast flag sets reasoning to fast",
1093-
reasoning: "",
1094-
fast: true,
1092+
name: "fast flag sets reasoning to fast",
1093+
reasoning: "",
1094+
fast: true,
10951095
reasoningExplicitlySet: false,
1096-
want: "fast",
1096+
want: "fast",
10971097
},
10981098
{
1099-
name: "explicit reasoning takes precedence over fast",
1100-
reasoning: "thorough",
1101-
fast: true,
1099+
name: "explicit reasoning takes precedence over fast",
1100+
reasoning: "thorough",
1101+
fast: true,
11021102
reasoningExplicitlySet: true,
1103-
want: "thorough",
1103+
want: "thorough",
11041104
},
11051105
{
1106-
name: "no fast flag preserves reasoning",
1107-
reasoning: "standard",
1108-
fast: false,
1106+
name: "no fast flag preserves reasoning",
1107+
reasoning: "standard",
1108+
fast: false,
11091109
reasoningExplicitlySet: true,
1110-
want: "standard",
1110+
want: "standard",
11111111
},
11121112
{
1113-
name: "no flags returns empty",
1114-
reasoning: "",
1115-
fast: false,
1113+
name: "no flags returns empty",
1114+
reasoning: "",
1115+
fast: false,
11161116
reasoningExplicitlySet: false,
1117-
want: "",
1117+
want: "",
11181118
},
11191119
}
11201120

cmd/roborev/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"strings"
99
"text/tabwriter"
1010

11-
"github.com/spf13/cobra"
1211
"github.com/roborev-dev/roborev/internal/git"
1312
"github.com/roborev-dev/roborev/internal/storage"
13+
"github.com/spf13/cobra"
1414
)
1515

1616
// resolveRepoIdentifier resolves a path-like identifier to its git repo root.

0 commit comments

Comments
 (0)