Conversation
- Change default startup view from Dashboard to ServiceBrowser - Add config.startup.view support (dashboard/services/service/resource) - Add :clear-history command to clear navigation stack - Add config.navigation.max_stack_size (default: 100) - Refactor: deduplicate service parsing into registry.ParseServiceResource() - Fix navigation semantics: preserve stack on home/services navigation - Fix: ~ key now works immediately on startup (before services load) - Add ~ toggle between Dashboard ↔ ServiceBrowser from both views 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove duplicated switch in Init(), delegate to resolveStartupView() for all startup paths (CLI and config). - Eliminates code duplication - Single source of truth for view creation - Maintains existing behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add startup.view option to config example (dashboard/services/service/resource) - Add navigation.max_stack_size config option - Add -s dashboard/services examples to README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…p-view feat: configurable startup view with navigation improvements
Code Review: PR #119 - Configurable Startup View with Navigation ImprovementsSummaryThis PR successfully implements configurable startup views with improved navigation. The implementation is well-structured, properly tested, and maintains backward compatibility. Overall, this is a high-quality contribution. ✅ StrengthsCode Quality & Architecture
Test Coverage
Backward Compatibility
🔍 Issues & Recommendations1. Navigation Stack Behavior Change (Breaking UX)Location: The PR changes navigation stack behavior in a way that might confuse users: // Before (implicit): ClearStack=true for home navigation
// After: ClearStack=false for all navigation
if input == "" || input == "home" {
browser := NewServiceBrowser(c.ctx, c.registry)
return nil, &NavigateMsg{View: browser, ClearStack: false} // ⚠️ Changed
}
if input == "pulse" {
dashboard := NewDashboardView(c.ctx, c.registry)
return nil, &NavigateMsg{View: dashboard, ClearStack: false} // ⚠️ Changed
}Impact: Users can no longer truly "go home" by clearing their navigation stack. The back button ( Recommendation: Consider these options:
2. Max Stack Size Enforcement LogicLocation: if len(a.viewStack) > maxSize {
// Remove oldest entries
a.viewStack = a.viewStack[len(a.viewStack)-maxSize:]
}Issue: This creates a new slice on every navigation when the stack is full, which causes:
Recommendation: Use a more efficient approach: if len(a.viewStack) > maxSize {
copy(a.viewStack, a.viewStack[1:])
a.viewStack = a.viewStack[:maxSize]
}Or use a circular buffer/ring structure for better performance. 3. Missing Error LoggingLocation: service, resourceType, err := a.registry.ParseServiceResource(viewName)
if err != nil {
// Fallback to ServiceBrowser on error
return view.NewServiceBrowser(a.ctx, a.registry)
}Issue: Silent failures make debugging difficult. If a user configures Recommendation: Add logging: if err != nil {
log.Warn("invalid startup view, using default", "view", viewName, "error", err)
return view.NewServiceBrowser(a.ctx, a.registry)
}4. Duplicate Code in Command InputLocation: The fallback prefix matching logic duplicates parts of Recommendation: Consider moving prefix matching into 5. Style OptimizationLocation: func TableBorderStyle() lipgloss.Style {
return ui.BorderStyle() // Creates new style on every call
}Performance: This function is called frequently during rendering. Based on the architecture doc's performance recommendations about style caching, this could cause allocations. Recommendation: Cache the style as a package-level variable if it doesn't change: var tableBorderStyle = ui.BorderStyle()
func TableBorderStyle() lipgloss.Style {
return tableBorderStyle
}However, verify this doesn't break theme switching first. 🔒 Security✅ No security concerns identified. The PR:
⚡ Performance✅ Generally good, with one minor concern noted above (stack slice handling) Positive impacts:
📝 Documentation✅ Excellent documentation updates:
🎯 Recommendations SummaryHigh Priority:
Medium Priority: Low Priority: ✨ ConclusionThis is a well-implemented feature with strong test coverage and good architecture. The main concern is the navigation stack behavior change which might impact UX. With the logging improvement, users will have better visibility when configurations fail. Verdict: Approve with minor recommendations for improvement. Great work! 🚀 Reviewed by Claude Code |
Summary
Merge feature/117: configurable startup view with navigation improvements
Changes
Test Coverage
Breaking Changes
None - backward compatible
🤖 Generated with Claude Code