Live values for existing resources, and search in popup lists - #10
Merged
Merged
Conversation
az's help carries no 'Values from:' hint for --resource-group, so the form never listed groups. Params that always name an existing resource now get an implicit source: --resource-group everywhere, and --name on az group show/delete/update/wait/export (never group create, where a new name is typed). - Implicit lists are prefetched when the form opens and sorted, so the picker is usually ready when the user reaches the field. - --subscription from the form is passed to every values command, and changing it drops choices fetched for the old subscription. - Fetched values are cached on disk for 3 minutes, keyed by command and invalidated when az login/logout/account set rewrite azureProfile.json. - 'Not signed in' and 'az not found' get a one-line explanation. - Grid cells show the fetch state (spinner, ▼, !) and the footer names the count or error for the focused field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dza8X5c3XGHUjejpqGLR8q
Long lists (resource groups, locations) could only be scrolled with j/k. '/' now starts a case-insensitive search, the same key as the form filter: typed characters (j, k, q included) narrow the list, the arrows move, the first Esc ends the search and the second closes the popup. The free-text row stays pinned, and when a search finds nothing picking it opens the editor with the query already typed. Long lists show a '/ filter' hint in the popup; an empty result shows the query and '(no matches)'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dza8X5c3XGHUjejpqGLR8q
--name now lists the real resources when a command acts on an existing one (show/delete/update/start/stop/scale/get-credentials/… of VMs, AKS, ACR, Key Vault, storage accounts, web/function apps, plans, SQL and PostgreSQL servers, Cosmos DB, Redis, networking resources, namespaces and workspaces) and never on create. Params that reference another resource get the same: --vault-name, --vnet-name, --vm-name, and, only within their family, --account-name (storage), --server (sql db), --plan (webapp/functionapp) and --cluster-name (aks). Resource lists are narrowed by the form's --resource-group. Changing a context param now refetches dependent resource lists immediately, and a fetch still in flight is superseded (FetchGen) so its late result can no longer overwrite the list for the new context. Leaving the / filter starts the focused field's fetch, as moving the cursor does. README gains a Live values section, and Privacy now mentions the three-minute values cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dza8X5c3XGHUjejpqGLR8q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dza8X5c3XGHUjejpqGLR8q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The README promises "live values from your Azure subscription — resource groups, locations, existing resources", but the form only listed what
az --helpmarks withValues from:(locations, VM sizes, Kubernetes versions). This PR lists the user's real resources where a param names one, and makes long lists usable with search.Changes
Existing resources as live values (
internal/ui/fetch.go,model.go)--resource-groupin every command, and--nameofaz group show/delete/update/wait/export, listaz group list. Nevergroup create, where the name is new.--nameof an existing resource:show,delete,update,start,stop,scale,get-credentials, … of VMs, VMSS, AKS, ACR, Key Vault, storage accounts, web and function apps, App Service plans, SQL and PostgreSQL servers, Cosmos DB, Redis, VNets, NSGs, public IPs, load balancers, application gateways, Bastion, Event Hubs and Service Bus namespaces, Log Analytics workspaces. Never oncreateor on sub-resources (network vnet subnet show,sql db show).--vault-name,--vnet-name,--vm-name, and, only within their family,--account-name(storage …),--server(sql db …),--plan(webapp/functionapp),--cluster-name(aks …). Outside it they mean something else (e.g. a Cosmos DB account) and get no list.--resource-group;--subscription;Field.FetchGen, so a late result for the old context can't overwrite the new list.azureProfile.jsonchanges (az login/logout/account set)./filter starts the focused field's fetch, as a cursor move does. Before, a field reached via the filter never loaded its list.Search in popup lists (
internal/ui/enum.go,view.go)/in a popup starts a case-insensitive search, the same key as the form filter.j,k,q) go into the query and the arrows move;Escends the search, the second closes the popup./ filterhint; an empty result shows the query and(no matches).Docs
/inside popups.Testing
go vet ./...,gofmt,go test -race ./...pass locally.azcover:az: inaz vm show, picked the group by searching "weu", then the VM by searching "web". Result:az vm show --name web-02 --resource-group prod-weu --output json. The VM list was requested with--resource-group prod-weu, and a reopen made noazcalls (served from the caches).azlogin in this environment. The list commands return the standard[{"name": …}]shape the parser already handles.🤖 Generated with Claude Code
https://claude.ai/code/session_01Dza8X5c3XGHUjejpqGLR8q
Generated by Claude Code