Skip to content

Add log no-truncate flag#170

Open
acidghost wants to merge 1 commit into
dhth:mainfrom
acidghost:add-log-no-truncate
Open

Add log no-truncate flag#170
acidghost wants to merge 1 commit into
dhth:mainfrom
acidghost:add-log-no-truncate

Conversation

@acidghost

@acidghost acidghost commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a --no-truncate flag to the log command
  • preserve the flag across interactive log refreshes
  • add coverage for full task/comment text output

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a --no-truncate flag for the log subcommand, threads the option through records-model construction and record retrieval, and updates task log rendering to skip truncation when enabled. It also adds a test covering truncated and full output, updates the README log docs, and reformats several table and string-formatting calls.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a no-truncate flag to log output.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description accurately matches the PR’s flag, interactive refresh, and test coverage changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
internal/ui/update.go (1)

418-425: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant dr.NumDays assignment in the week branch.

Line 418 sets dr.NumDays = 7, but line 424 unconditionally overwrites it with m.dateRange.NumDays. This is harmless only as long as m.dateRange.NumDays == 7 for the week period; the inner assignment is dead. The 1*m.dateRange.NumDays on line 421 is also a redundant multiply. Consider dropping the inner assignment and the 1* for clarity.

♻️ Proposed cleanup
 				startOfNextWeek := m.dateRange.Start.AddDate(0, 0, 7-int(offset))
 				dr.Start = time.Date(startOfNextWeek.Year(), startOfNextWeek.Month(), startOfNextWeek.Day(), 0, 0, 0, 0, startOfNextWeek.Location())
-				dr.NumDays = 7
 
 			default:
-				dr.Start = m.dateRange.Start.AddDate(0, 0, 1*m.dateRange.NumDays)
+				dr.Start = m.dateRange.Start.AddDate(0, 0, m.dateRange.NumDays)
 			}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/ui/update.go` around lines 418 - 425, The week-period branch in
`internal/ui/update.go` has a redundant `dr.NumDays = 7` that is immediately
overwritten by the later unconditional assignment, so remove the inner
`dr.NumDays` setting from that branch and rely on the shared assignment after
the switch. Also clean up the `default` case in the same `dateRange` handling
logic by removing the unnecessary `1*` multiplication when advancing
`m.dateRange.Start`; keep the behavior unchanged while simplifying the code
around `dr` and `m.dateRange`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/ui/update.go`:
- Around line 418-425: The week-period branch in `internal/ui/update.go` has a
redundant `dr.NumDays = 7` that is immediately overwritten by the later
unconditional assignment, so remove the inner `dr.NumDays` setting from that
branch and rely on the shared assignment after the switch. Also clean up the
`default` case in the same `dateRange` handling logic by removing the
unnecessary `1*` multiplication when advancing `m.dateRange.Start`; keep the
behavior unchanged while simplifying the code around `dr` and `m.dateRange`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: db0a50b7-d44e-4ba1-8d53-0fc9e4ea4915

📥 Commits

Reviewing files that changed from the base of the PR and between 389d030 and d201ac9.

📒 Files selected for processing (10)
  • README.md
  • cmd/root.go
  • internal/ui/cmds.go
  • internal/ui/initial.go
  • internal/ui/log.go
  • internal/ui/log_test.go
  • internal/ui/model.go
  • internal/ui/report.go
  • internal/ui/stats.go
  • internal/ui/update.go

@dhth

dhth commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Thanks for sending in the PR :)
I’ve been a bit occupied lately, but I’ll take a look as soon as I can.

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.

2 participants