feat: the key picker's tabs go under its heading, with help text
CI / Checks (pull_request) Successful in 39s
PR title / Conventional title (pull_request) Successful in 2s

The share popup is titled for what's shared; above the search, "Pick
a secret to encrypt with" says the recipient needs read access to it,
with Go to's tabs under it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-13 12:24:10 +02:00
1 parent cd265a632e
commit 8cd0003f8c
2 files changed
+26 -17

No files matched your search

+22 -15
View File
@@ -750,12 +750,13 @@ func (m Model) searchViewBox() string {
lists = panes.BoxCounted(m.st, title(resultsTitle, true), "", counter(v.res, len(v.shown)), right, resW, listH, focused)
}
ts := panes.TitleStyle(m.st, focused)
var body []string
if v.pick != nil {
for _, l := range v.pickLines {
body = append(body, " "+l)
}
body = append(body, "")
body = append(body, "", " "+m.goToTabs(ts))
}
body = append(body, " "+v.input.View(), "")
for _, l := range strings.Split(lists, "\n") {
@@ -785,21 +786,11 @@ func (m Model) searchViewBox() string {
}
foot = footer(append(hints, hint(km.GoFilter, "filter"), hint(km.GoStar, "star"), hint(km.GoSelect, v.selectLabel()), hint(km.GoClose, "close"))...)
}
// Tabs in the title, the current one underlined, like the panes.
ts := panes.TitleStyle(m.st, focused)
head := ts.Render(goToTitle + " ")
// Tabs in the title, the current one underlined, like the panes; a
// picker has its own title, and the tabs over the input.
head := ts.Render(goToTitle+" ") + m.goToTabs(ts)
if v.pick != nil {
head = ts.Render(v.pickTitle + " ")
}
for i, name := range tabNames {
if i > 0 {
head += ts.Render(" - ")
}
if i == v.tab {
head += ts.Underline(true).Render(name)
} else {
head += m.st.Muted.Render(name)
}
head = ts.Render(v.pickTitle)
}
return panes.Box(m.st, head, foot, body, w, len(body)+2, focused)
}
@@ -821,3 +812,19 @@ func pickable(o option) (ref.Ref, bool) {
}
return r, true
}
// goToTabs draws Go to's tabs, the current one underlined.
func (m Model) goToTabs(ts lipgloss.Style) string {
var out string
for i, name := range tabNames {
if i > 0 {
out += ts.Render(" - ")
}
if i == m.search.tab {
out += ts.Underline(true).Render(name)
} else {
out += m.st.Muted.Render(name)
}
}
return out
}