feat: the right pane describes what's selected in the pane you're in
CI / Checks (pull_request) Successful in 25s
PR title / Conventional title (pull_request) Successful in 1s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-11 10:49:39 +02:00
1 parent c8abc1dc95
commit 411068ba43
9 files changed
+232 -67

No files matched your search

+12 -7
View File
@@ -163,9 +163,11 @@ type Model struct {
clip Clipboard
clipClear time.Duration
openURL func(string) error
// fields is the fourth pane for anything but a secret (now: an
// account), with each account's groups as they load (fields.go).
// fields is the fourth pane for anything but a secret, with each
// account's groups as they load; lastLeft is the left pane it
// describes while the fourth has focus (fields.go).
fields panes.Fields
lastLeft pane
groups map[string]groupsState
getenv func(string) string
nvimOpen func(server, path string, line int) error // edit.go
@@ -731,7 +733,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.waiting = 0
m.askHandlerSetup()
m.keys.Login.SetEnabled(m.loginFor() != nil)
m.detail.SetMessage(m.selectedProblem())
if m.focus != paneDetail {
m.lastLeft = m.focus
}
cmds = append(cmds, m.syncFields())
if m.anyLoading() && !m.spinning {
m.spinning = true
@@ -799,13 +803,14 @@ func (m *Model) handleKey(msg tea.KeyPressMsg) (cmd tea.Cmd, quit bool) {
m.jump(false)
case key.Matches(msg, k.NextPane):
m.focus = (m.focus + 1) % paneCount
if m.focus == paneContainers && m.fields.Shown() {
if r, ok := m.sources.Selected(); ok && m.focus == paneContainers && r.kind == rowGroup {
m.focus = paneDetail // an account's row: nothing between
}
case key.Matches(msg, k.PrevPane):
m.focus = (m.focus + paneCount - 1) % paneCount
if m.focus == paneSecrets && m.fields.Shown() {
m.focus = paneSources
if m.focus == paneDetail {
m.focus = m.lastLeft // back to what it describes
} else {
m.focus = (m.focus + paneCount - 1) % paneCount
}
case key.Matches(msg, k.Pane1):
m.focus = paneSources