Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughAdds ContainerConfig.DisplayName() with an emulator name map, and threads emulator name + endpoint through the UI by expanding NewApp/NewHeader signatures and updating header rendering, tests, run entrypoints, and golden output. Also removes two exported style variables. Changes
Sequence Diagram(s)sequenceDiagram
participant Run as "run.go / entrypoint"
participant Config as "config"
participant App as "internal/ui.NewApp"
participant Header as "internal/ui/components.Header"
Run->>Config: read container/config (emulator, endpoint)
Config-->>Run: emulatorName, endpoint
Run->>App: NewApp(version, emulatorName, endpoint, cancel)
App->>Header: NewHeader(version, emulatorName, endpoint)
Header-->>App: Header component (renders view with emulator & host)
App-->>Run: UI starts / program.Run()
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
internal/ui/run_logout.go (1)
18-18: Consider the header rendering with all empty strings.Passing empty strings for version, emulatorName, and endpoint will result in a sparse header display (e.g., "lstk ()" with empty lines below). This may be intentional for the logout flow, but worth confirming the rendered output looks acceptable.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/ui/run_logout.go` at line 18, The header is being constructed with empty strings by calling NewApp("", "", "", cancel), which renders sparse/awkward header text; either pass real values (e.g., pass the module's version, emulatorName, and endpoint variables) into NewApp instead of empty strings, or update NewApp to treat empty version/emulatorName/endpoint as “hidden” (skip rendering those lines) so calling NewApp("", "", "", cancel) produces a compact logout header; locate the NewApp call in run_logout.go and adjust the caller or the NewApp rendering logic accordingly (reference: NewApp(version, emulatorName, endpoint, cancel) and the header-rendering code inside NewApp).
🤖 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/ui/run.go`:
- Around line 33-40: The endpoint construction can produce a trailing colon when
cfg.Containers[0].Port is empty; update the logic where emulatorName and
endpoint are set (before calling NewApp) to check cfg.Containers[0].Port and
only append ":<port>" when non-empty (or substitute a sensible default port),
e.g., read cfg via config.Get(), get cfg.Containers[0].Port, and build endpoint
conditionally so endpoint is either "localhost.localstack.cloud" or
"localhost.localstack.cloud:<port>" before passing it into NewApp.
---
Nitpick comments:
In `@internal/ui/run_logout.go`:
- Line 18: The header is being constructed with empty strings by calling
NewApp("", "", "", cancel), which renders sparse/awkward header text; either
pass real values (e.g., pass the module's version, emulatorName, and endpoint
variables) into NewApp instead of empty strings, or update NewApp to treat empty
version/emulatorName/endpoint as “hidden” (skip rendering those lines) so
calling NewApp("", "", "", cancel) produces a compact logout header; locate the
NewApp call in run_logout.go and adjust the caller or the NewApp rendering logic
accordingly (reference: NewApp(version, emulatorName, endpoint, cancel) and the
header-rendering code inside NewApp).
ℹ️ Review info
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
internal/config/containers.gointernal/ui/app.gointernal/ui/app_test.gointernal/ui/components/header.gointernal/ui/components/header_test.gointernal/ui/components/testdata/header.goldeninternal/ui/run.gointernal/ui/run_login.gointernal/ui/run_login_test.gointernal/ui/run_logout.gointernal/ui/styles/styles.go
💤 Files with no reviewable changes (1)
- internal/ui/styles/styles.go
silv-io
left a comment
There was a problem hiding this comment.
LGTM! Just a bit of weirdness in the final header rendering and the extraction of the Container metadata
e8530bc to
a6fad93
Compare
See DES-152 for more context.