fix: the details pane follows its secret's list when it reloads
CI / Checks (pull_request) Successful in 39s
PR title / Conventional title (pull_request) Successful in 1s

A cached list is shown at once and reloaded in the background; the
selected secret's details stayed as first shown, old web page
included, until another secret was selected. When the reloaded list
has it changed, the details pane takes the new listing (a value shown
stays shown) and describes it afresh: its cached details came from
the old one.

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 14:50:59 +02:00
1 parent 40b90df68c
commit db8ce90ee7
4 files changed
+75

No files matched your search

+2
View File
@@ -679,12 +679,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if msg.bound != nil {
msg.key = m.rebind(*msg.bound)
}
before := m.cache.objects[msg.key].value
m.cache.objects[msg.key] = entry[[]provider.Object]{msg.items, m.now()}
m.cacheDirty = true
if m.versionsOf != nil {
m.setVersions(msg.items)
} else {
m.secrets.SetItems(m.starredFirst(msg.items))
cmds = append(cmds, m.refreshShown(before))
}
}