Fix sidebar repaint and command restart navigation
This commit is contained in:
@@ -192,9 +192,6 @@ func currentTabFlat(children []*Child, focusID string) []*Child {
|
||||
func sidebarNavList(children []*Child, activeAgentID string) []*Child {
|
||||
out := make([]*Child, 0, 8)
|
||||
for _, c := range processList(children) {
|
||||
if c.Status() != StatusRunning {
|
||||
continue
|
||||
}
|
||||
out = append(out, c)
|
||||
}
|
||||
for _, c := range visibleAgentTree(children, activeAgentID) {
|
||||
@@ -208,9 +205,15 @@ func sidebarNavList(children []*Child, activeAgentID string) []*Child {
|
||||
// wrapping at both ends. Empty when there's nothing else to land on.
|
||||
func nextChildID(children []*Child, focusID, activeAgentID string, step int) string {
|
||||
flat := sidebarNavList(children, activeAgentID)
|
||||
if len(flat) < 2 {
|
||||
if len(flat) == 0 {
|
||||
return ""
|
||||
}
|
||||
if len(flat) == 1 {
|
||||
if flat[0].ID == focusID {
|
||||
return ""
|
||||
}
|
||||
return flat[0].ID
|
||||
}
|
||||
idx := -1
|
||||
for i, c := range flat {
|
||||
if c.ID == focusID {
|
||||
|
||||
Reference in New Issue
Block a user