chore(deps): update box-cli-maker to v3#144
Conversation
WalkthroughThis pull request upgrades the Go toolchain and dependencies, specifically migrating from box-cli-maker v2 to v3. The code is updated to use the new v3 fluent API interface, replacing struct-based configuration with method chaining and updating the rendering approach. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/components/console_box.go (1)
8-13:⚠️ Potential issue | 🟡 MinorRemove the unused
widthfield fromConsoleBoxstruct.The
widthfield is accepted inNewConsoleBox()and assigned to the struct, but is never referenced inPrint()or anywhere else in the codebase. It appears to be remnant from the v2 box configuration that is no longer needed with v3.
🧹 Nitpick comments (1)
internal/components/console_box.go (1)
24-32: Variableboxshadows the package import — works but fragile.On line 25,
box := box.NewBox()...shadows theboxpackage with a local variable. Go evaluates the RHS before creating the local, so thebox.Double,box.Top,box.Centerconstants resolve to the package correctly. However, this shadowing is confusing and will break if anyone later adds code that references the packageboxafter line 30.Consider renaming the local variable (e.g.,
borconsoleBox).Suggested fix
func (b *ConsoleBox) Print() { - box := box.NewBox(). + cb := box.NewBox(). Style(box.Double). Padding(2, 2). TitlePosition(box.Top). ContentAlign(box.Center). Color(b.color) - fmt.Println(box.MustRender(b.title, b.body)) + fmt.Println(cb.MustRender(b.title, b.body)) }
Summary by CodeRabbit
Chores
Refactor