feat: the right pane describes what's selected in the pane you're in (#9)

The right pane kept showing the selected secret when you moved to Vaults or Sources. Now it follows focus:

| focus | right pane |
|---|---|
| Sources | the account (group row), or the subscription / workspace / repo: name, note, ID / profile / path, host or remote, account, web page, vault count |
| Vaults | the vault / scope / file: name, note, URI / backend / format, source, web page, counts of loaded secrets, keys, certificates |
| Secrets | the secret, as before |
| the right pane itself | what it described when you went in; `shift+tab` goes back there |

All but the secret use the `Fields` pane (#7), so `j`/`k`, `/` and `y` work on them; `Detail` loses the error message it got in #4, which is now a red "problem" row in `Fields`. A value revealed from a left pane stays in view until hidden, so `space` from any pane still shows it. `tab` from a subscription goes to Vaults as before; only an account row skips to its details.

This also changes the startup view: focus starts in Sources, so the right pane describes the first subscription instead of the first secret (golden output updated). Tests that read the secret pane focus Secrets first; a new test walks secret → vault → subscription → into the pane → back, and reveals from Sources.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com>
Reviewed-on: #9
This commit was merged in pull request #9.
This commit is contained in:
keb committed 2026-10-11 10:59:40 +02:00
1 parent c8abc1dc95
commit 1c8d69d957
9 files changed
+232 -67

No files matched your search

+19 -19
View File
@@ -1,23 +1,23 @@
╭─ [1] Sources - Favourites ────╮╭─ Secret ────────────────────────────────────────────────────────╮
│ ▾ Azure (2) ││ name db-password │
│ platform-prod ││ vault kv-app-prod │
│ platform-dev ││ source Azure / platform-prod │
│ ▾ Databricks (2) ││ version 3f9c2a │
│ prod ││ enabled yes │
╰────────────────────── 2 of 6 ─╯│ updated 2026-09-01 09:30 │
╭─ [2] Vaults ──────────────────╮│ expires 2027-09-01 09:30 │
│ kv-app-prod ││ content text/plain │
│ kv-shared-prod ││ tags env=prod, owner=data │
│ kv-restricted ││ ref @Microsoft.KeyVault(SecretUri=https://kv-app-prod.vau│
│ ││ lt.azure.net/secrets/db-password) │
╭─ [1] Sources - Favourites ────╮╭─ platform-prod ─────────────────────────────────────────────────╮
│ ▾ Azure (2) ││ name platform-prod │
│ platform-prod ││ ID sub-prod │
│ platform-dev ││ web https://portal.azure.com/#resource/subscriptions/sub…│
│ ▾ Databricks (2) ││ vaults 3 │
│ prod ││ │
╰────────────────────── 2 of 6 ─╯│ │
╭─ [2] Vaults ──────────────────╮│ │
│ kv-app-prod ││ │
│ kv-shared-prod ││ │
│ kv-restricted ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ value •••••••• │
│ ││ space to reveal · y to copy │
╰────────────────────── 1 of 3 ─╯│ │
╭─ [3] Secrets - Keys - Certs ──╮│ versions 3 · v to browse │
│ db-password ││ ▸ 3f9c2a 2026-09-01 current │
│ api-key ││ 91d3e0 2026-03-01 expired │
│ legacy-token (disabled) ││ 0a77c4 2025-09-01 disabled │
╭─ [3] Secrets - Keys - Certs ──╮│ │
│ db-password ││ │
│ api-key ││ │
│ legacy-token (disabled) ││ │
│ ││ │
│ ││ │
│ ││ │
@@ -26,5 +26,5 @@
│ ││ │
│ ││ │
│ ││ │
╰────────────────────── 1 of 3 ─╯╰─────────────────────────────────────────────────────────────────╯
╰────────────────────── 1 of 3 ─╯╰──────────────────────────────────────────────────────── 1 of 4 ─╯
enter open • ctrl+s search • s copy link • S share… • f star • F favourites • … • ? help • q quit