fix: details load once the cursor rests, and moving on cancels them
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 13:43:38 +02:00
1 parent 879b961ac5
commit cd35a8acf4
2 files changed
+27 -9

No files matched your search

+9 -1
View File
@@ -56,6 +56,7 @@ const (
slotDescribe // extra metadata for the selected object
slotCopy // fetch a value straight to the clipboard
slotVersions // count the selected object's versions
slotDetails // a vault's, scope's or file's details
slotCount
)
@@ -591,7 +592,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.groups[msg.provider] = groupsState{names: msg.names, err: msg.err}
case detailsMsg:
m.details[msg.key] = detailsState{attrs: msg.attrs, err: msg.err}
if msg.req == m.reqID[slotDetails] {
m.done(slotDetails)
}
if errors.Is(msg.err, context.Canceled) || errors.Is(msg.err, context.DeadlineExceeded) {
delete(m.details, msg.key) // tried again when shown again
} else {
m.details[msg.key] = detailsState{attrs: msg.attrs, err: msg.err}
}
case crawlMsg:
cmds = append(cmds, m.handleCrawl(msg))