pi-agent: Implement final TUI hardening
This commit is contained in:
+13
-4
@@ -51,6 +51,8 @@ func (p terminalPresentation) mainView(model presentationState, width, height in
|
||||
if selected, ok := newTargetCatalog(model.snapshot, true, model.driftResolutionTargetID).selected(model.driftResolutionTargetID); ok {
|
||||
page.dashboard = nil
|
||||
page.primary, page.context = p.driftResolutionView(selected)
|
||||
page.wrapPrimary = true
|
||||
page.wrapContext = true
|
||||
page.footer = "r: Reapply Active Profile o: Restore Original\nEnter/q/Esc: cancel ?: help"
|
||||
}
|
||||
}
|
||||
@@ -61,6 +63,7 @@ func (p terminalPresentation) mainView(model presentationState, width, height in
|
||||
}
|
||||
page.dashboard = nil
|
||||
page.primary = dialog.view()
|
||||
page.wrapPrimary = true
|
||||
page.context = "Cancellation is selected by default."
|
||||
page.footer = "←/→/Tab: choose y: confirm Enter: choose\nn/q/Esc: cancel ?: help"
|
||||
}
|
||||
@@ -174,10 +177,11 @@ func (p terminalPresentation) profilesView(model presentationState) terminalPage
|
||||
}
|
||||
if model.profileDelete != nil {
|
||||
return terminalPage{
|
||||
header: p.theme.title.Render("Proxy Profile management"),
|
||||
primary: model.profileDelete.dialog.view(),
|
||||
footer: "←/→/Tab: choose Enter: choose y: delete\nn/q/Esc: cancel ?: help",
|
||||
focusLine: -1,
|
||||
header: p.theme.title.Render("Proxy Profile management"),
|
||||
primary: model.profileDelete.dialog.view(),
|
||||
wrapPrimary: true,
|
||||
footer: "←/→/Tab: choose Enter: choose y: delete\nn/q/Esc: cancel ?: help",
|
||||
focusLine: -1,
|
||||
}
|
||||
}
|
||||
return terminalPage{
|
||||
@@ -188,6 +192,7 @@ func (p terminalPresentation) profilesView(model presentationState) terminalPage
|
||||
focusLine: model.selected,
|
||||
primaryOffset: model.profileOffset,
|
||||
contextOffset: model.profileDetails,
|
||||
wrapContext: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,6 +218,10 @@ func selectedProfileDetails(p terminalPresentation, model presentationState) str
|
||||
fmt.Fprintf(&details, "\n • %s", item)
|
||||
}
|
||||
}
|
||||
// The list gives short names the strongest scan position. Repeating the
|
||||
// complete value at the end of the scrollable details makes a clipped,
|
||||
// wide Unicode name fully reachable without displacing connection details.
|
||||
fmt.Fprintf(&details, "\nFull name: %s", selected.Name)
|
||||
return details.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user