fix: the details pane follows its secret's list when it reloads
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:
4 files changed
+75
No files matched your search
@@ -60,6 +60,16 @@ func (d *Detail) ShowSecret(s provider.Object) {
|
||||
d.container = &s.Container
|
||||
}
|
||||
|
||||
// Refresh shows s's newer metadata if s is the secret shown, keeping
|
||||
// its account and any value shown or loading.
|
||||
func (d *Detail) Refresh(s provider.Object) {
|
||||
if d.secret == nil || d.secret.ID != s.ID {
|
||||
return
|
||||
}
|
||||
s.Container = d.secret.Container
|
||||
d.secret = &s
|
||||
}
|
||||
|
||||
// ShowContainer shows a container summary when no secret is selected.
|
||||
func (d *Detail) ShowContainer(c provider.Container) {
|
||||
d.Clear()
|
||||
|
||||
Reference in new issue
Block a user