Conversation
gtsiolis
commented
Mar 13, 2026
| BEFORE | AFTER |
|---|---|
![]() |
![]() |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThis change introduces a new secondary message severity level for terminal output and implements post-start setup enhancements. The post-start flow now outputs endpoint information and optional web app URLs with secondary styling. Supporting infrastructure includes message rendering logic that applies severity-based styling. Changes
Sequence DiagramsequenceDiagram
participant Start as Start Function
participant Setup as runPostStartSetups
participant Pointers as emitPostStartPointers
participant Sink as Output Sink
participant Format as Message Formatter
Start->>Setup: Call with webAppURL parameter
Setup->>Setup: Execute container setup
Setup->>Pointers: Call after successful setup
Pointers->>Sink: EmitSecondary(endpoint info)
Sink->>Format: MessageEvent with SeveritySecondary
Format->>Format: Select SecondaryMessage style
Format-->>Pointers: Formatted output
alt Web App URL provided
Pointers->>Sink: EmitSecondary(web app URL)
Sink->>Format: MessageEvent with SeveritySecondary
Format-->>Pointers: Formatted with secondary styling
end
Pointers->>Sink: EmitSecondary(tip message)
Sink->>Format: MessageEvent with SeveritySecondary
Format-->>Pointers: Formatted output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip You can disable the changed files summary in the walkthrough.Disable the |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
internal/container/start.go (1)
144-149: Keep the bullets andTip:label out of the domain event payload.These strings are presentation details, and they already leak into
internal/ui/components/message.go, which now has to parse prefixes to recover styling semantics. A typed output event or structured payload here would let the plain and TUI renderers own the formatting instead.Based on learnings, "Event payloads should be domain facts (phase/status/progress), not pre-rendered UI strings."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/container/start.go` around lines 144 - 149, emitPostStartPointers is emitting pre-formatted UI strings via output.EmitInfo (using output.Sink), which leaks presentation into event payloads; change it to emit a structured domain event (e.g., a PostStartPointers event/struct with fields Endpoint, WebAppURL, and Tip or TipKey) instead of the bullet/“Tip:” strings, and update calls to output.EmitInfo (or add a new output.EmitEvent) to send that structured payload so presenters (plain/TUI) can render bullets and the “Tip:” label themselves; update consumers that parse these strings (e.g., message rendering code) to handle the new typed event.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/update/install_method.go`:
- Around line 209-237: The code currently runs exec.Command("npm", "root", "-g")
and treats its output as an install prefix, producing incorrect paths; change
the command to exec.Command("npm", "prefix", "-g") to get the actual global
prefix, then rebuild the candidate paths from that prefix (e.g.
filepath.Join(prefix, "bin", "lstk") for Unix global bin and
filepath.Join(prefix, "lstk.exe") for Windows), and for package locations use
filepath.Join(prefix, "lib", "node_modules", "@localstack", "lstk", "bin",
"lstk") (or the Windows/node_modules variant) instead of joining an already
node_modules path into another node_modules; update the path entries currently
appended where prefix is used (the slice additions around where cmd.Output() is
handled and the subsequent fallbackPrefixes logic) accordingly.
- Around line 143-149: Replace the non-portable inode-based duplicate detection:
remove use of inodeKey and the info.Sys().(*syscall.Stat_t) branch in the
function that processes file info and instead compare file identity with
os.SameFile by keeping the previously-encountered os.FileInfo (or its
os.FileInfo result) and calling os.SameFile(prevInfo, info) to skip duplicates;
update references to seenInodes to store os.FileInfo (or a map of
string->os.FileInfo) keyed by resolved path. Also update collectCandidatePaths
to include Windows executables by probing both "lstk" and "lstk.exe" (and
generally append ".exe" on Windows for candidate names) so Windows installs
aren't missed. Ensure changes touch the symbols seenInodes, inodeKey,
collectCandidatePaths, and any variable named resolved or info.
---
Nitpick comments:
In `@internal/container/start.go`:
- Around line 144-149: emitPostStartPointers is emitting pre-formatted UI
strings via output.EmitInfo (using output.Sink), which leaks presentation into
event payloads; change it to emit a structured domain event (e.g., a
PostStartPointers event/struct with fields Endpoint, WebAppURL, and Tip or
TipKey) instead of the bullet/“Tip:” strings, and update calls to
output.EmitInfo (or add a new output.EmitEvent) to send that structured payload
so presenters (plain/TUI) can render bullets and the “Tip:” label themselves;
update consumers that parse these strings (e.g., message rendering code) to
handle the new typed event.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 44d5babb-ffe3-4592-8e85-c88ea20b137b
📒 Files selected for processing (5)
internal/container/start.gointernal/container/start_test.gointernal/ui/components/message.gointernal/ui/components/message_test.gointernal/update/install_method.go
| @@ -1,9 +1,12 @@ | |||
| package update | |||
There was a problem hiding this comment.
issue: was this file accidentally committed?
There was a problem hiding this comment.
Oops! Good catch! ⚾ Removed.
internal/ui/components/message.go
Outdated
|
|
||
| func isDecorativeMessage(text string) bool { | ||
| return strings.HasPrefix(text, "• ") || strings.HasPrefix(text, "> Tip:") | ||
| } |
There was a problem hiding this comment.
issue: we should avoid parsing message content to decide how to style it. This creates a dependency between text content and style that is fragile. Can we use a new message type or a new severity instead?
There was a problem hiding this comment.
ABSOLUTELY! I should have done this already, thanks for the nudge! 😁
8364858 to
a715248
Compare
|
Thanks for taking a look, @carole-lavillonniere! 🏀 |

