feat(tui): two-column detail layout with viewport scrolling
Refactored full-screen detail panel: status+endpoint on left column, timing+config on right column. Halves vertical height of the info section. Content wraps in a viewport when it exceeds terminal height — scroll with j/k/arrows/pgup/pgdn. Restored renderSparkTooltip lost in rewrite. Fixed lint warnings.
This commit is contained in:
@@ -368,6 +368,18 @@ func (m *Model) handleFilterKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
|
||||
func (m *Model) handleDetailKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
switch msg.String() {
|
||||
case "up", "k":
|
||||
m.detailViewport.ScrollUp(1)
|
||||
return m, nil
|
||||
case "down", "j":
|
||||
m.detailViewport.ScrollDown(1)
|
||||
return m, nil
|
||||
case "pgup":
|
||||
m.detailViewport.ScrollUp(m.detailViewport.Height / 2)
|
||||
return m, nil
|
||||
case "pgdown":
|
||||
m.detailViewport.ScrollDown(m.detailViewport.Height / 2)
|
||||
return m, nil
|
||||
case "esc":
|
||||
if m.sparkTooltipIdx >= 0 {
|
||||
m.sparkTooltipIdx = -1
|
||||
|
||||
Reference in New Issue
Block a user