feat: Go to scopes are grouped like the Sources pane, an account at a time
CI / Checks (pull_request) Successful in 24s
PR title / Conventional title (pull_request) Successful in 1s

The scope list follows the Sources pane: All, then each account (or
Databricks, or Repos) with its sources under it, in place of All Azure,
All Databricks and All repos. An account scope searches and loads only
that account. ctrl+s on a group header narrows to its group.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-12 11:51:29 +02:00
1 parent 57aec8a381
commit 331e53fb49
7 files changed
+124 -74

No files matched your search

+20 -8
View File
@@ -131,13 +131,25 @@ func (c coverage) complete() bool {
return c.sourcesListed == c.sources && c.vaultsLoaded == c.vaults
}
func (m *Model) searchCoverage() coverage { return m.coverageOf("") }
func (m *Model) searchCoverage() coverage { return m.coverageOf(nil) }
// coverageOf is searchCoverage for one kind of provider ("" for all).
func (m *Model) coverageOf(kind provider.Kind) coverage {
// providerFilter picks the providers a search or a load covers; nil is
// all of them.
type providerFilter func(provider.Provider) bool
func ofKind(k provider.Kind) providerFilter {
return func(p provider.Provider) bool { return p.Kind() == k }
}
func ofProvider(id string) providerFilter {
return func(p provider.Provider) bool { return p.ID() == id }
}
// coverageOf is searchCoverage for the providers in.
func (m *Model) coverageOf(in providerFilter) coverage {
var c coverage
for _, p := range m.providers {
if kind != "" && p.Kind() != kind {
if in != nil && !in(p) {
continue
}
for _, src := range m.sourceResults[p.ID()].sources {
@@ -197,12 +209,12 @@ func plural(n int, word string) string {
// startCrawl loads every unlisted subscription's vaults and every vault's
// secrets not loaded yet.
func (m *Model) startCrawl() tea.Cmd { return m.startCrawlOf("") }
func (m *Model) startCrawl() tea.Cmd { return m.startCrawlOf(nil) }
// startCrawlOf is startCrawl for one kind of provider ("" for all).
func (m *Model) startCrawlOf(kind provider.Kind) tea.Cmd {
// startCrawlOf is startCrawl for the providers in.
func (m *Model) startCrawlOf(in providerFilter) tea.Cmd {
for _, p := range m.providers {
if kind != "" && p.Kind() != kind {
if in != nil && !in(p) {
continue
}
for _, src := range m.sourceResults[p.ID()].sources {