pi-agent: Implement Operations Console dashboard
This commit is contained in:
@@ -58,6 +58,10 @@ type presentationState struct {
|
||||
width int
|
||||
height int
|
||||
selected int
|
||||
selectedTargetID string
|
||||
dashboardFocus dashboardPane
|
||||
showUnavailable bool
|
||||
detailsOffset int
|
||||
form formState
|
||||
confirm bool
|
||||
targetConfirm bool
|
||||
@@ -83,6 +87,7 @@ type terminalPage struct {
|
||||
footer string
|
||||
status string
|
||||
focusLine int
|
||||
dashboard *dashboardRenderState
|
||||
}
|
||||
|
||||
func (p terminalPresentation) Render(state presentationState) string {
|
||||
@@ -112,7 +117,10 @@ func (p terminalPresentation) Render(state presentationState) string {
|
||||
}
|
||||
page.status = state.status
|
||||
page = redactTerminalPage(page)
|
||||
return p.renderShell(page, width, height)
|
||||
// Dashboard composition retains structured Target metadata until pane sizes
|
||||
// are known. Redact the fully composed frame as the final presentation
|
||||
// boundary as well, so no render path can bypass credential scrubbing.
|
||||
return profile.RedactText(p.renderShell(page, width, height))
|
||||
}
|
||||
|
||||
func redactTerminalPage(page terminalPage) terminalPage {
|
||||
@@ -149,6 +157,9 @@ func (p terminalPresentation) renderShell(page terminalPage, width, height int)
|
||||
bodyHeight = 1
|
||||
}
|
||||
body := renderPageBody(page, width, bodyHeight)
|
||||
if page.dashboard != nil {
|
||||
body = p.renderDashboard(*page.dashboard, width, bodyHeight)
|
||||
}
|
||||
|
||||
sections := make([]string, 0, 3)
|
||||
if header != "" {
|
||||
|
||||
Reference in New Issue
Block a user