feat: formatted JSON and certificates, errors in the status pane, no scope access list (#19)
**Formatted values.** A revealed value is shown as it reads best: JSON indented, and PEM certificates as subject, issuer, valid dates, names and SHA-1 thumbprint instead of base64. Any other PEM block (a private key in a bundle) is named, `EC PRIVATE KEY (not shown)`, never shown. Anything else shows as before. `y` copies the value exactly as stored, and the hints line says so (`JSON, formatted: y copies it as stored`). **Errors in the status pane.** This session's errors, newest first, up to 20, with the time and what they were about (`12:32 kv-restricted: 403 Forbidden: …`): lists that couldn't load, values and details that couldn't be read, sources, saving the cache, and whatever the footer flashed (a failed copy) before you moved on. A repeat moves to the top. Sign-ins aren't listed (the footer and the account say those). Only the first line of each, and not kept after quitting. `y` copies one. **No access list for Databricks scopes.** It was the one request of its own left (one call per scope). Removed with its tests and docs; refusals still say what to check. **Copying over SSH: checked, nothing to change.** Over SSH (`SSH_TTY`/`SSH_CONNECTION`), `y` copies with OSC 52, and the 30-second clear works the same way. Your tmux (3.7, `set-clipboard on`) passes it through and kitty (`clipboard_control write-clipboard`) accepts it; docs/config.md already says what's needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com> Reviewed-on: #19
This commit was merged in pull request #19.
This commit is contained in:
1 parent
17054ad0ec
commit
b530c043f7
14 files changed
+271
-90
No files matched your search
+18
-4
@@ -56,7 +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
|
||||
slotDetails // a file's details
|
||||
slotCount
|
||||
)
|
||||
|
||||
@@ -177,9 +177,13 @@ type Model struct {
|
||||
fields panes.Fields
|
||||
lastLeft pane
|
||||
details map[string]detailsState // by containerKey
|
||||
getenv func(string) string
|
||||
nvimOpen func(server, path string, line int) error // edit.go
|
||||
now func() time.Time
|
||||
// errLog is this session's errors, newest first; loggedFlash the
|
||||
// footer's text when last looked at (errlog.go).
|
||||
errLog []loggedErr
|
||||
loggedFlash string
|
||||
getenv func(string) string
|
||||
nvimOpen func(server, path string, line int) error // edit.go
|
||||
now func() time.Time
|
||||
// The cache file, whether the cache changed since it was saved, and
|
||||
// when each provider's Sources list was loaded (persist.go).
|
||||
cachePath string
|
||||
@@ -623,6 +627,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.done(slotContainers)
|
||||
if msg.err != nil {
|
||||
m.noteErr(msg.err)
|
||||
if src, ok := m.selectedSource(); ok {
|
||||
m.logErrOf(src.Name, msg.err)
|
||||
}
|
||||
delete(m.cache.containers, msg.key)
|
||||
m.containers.SetError(msg.err)
|
||||
} else {
|
||||
@@ -641,6 +648,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.closeVersions()
|
||||
} else if msg.err != nil {
|
||||
m.noteErr(msg.err)
|
||||
if c, ok := m.containers.Selected(); ok {
|
||||
m.logErrOf(c.Name, msg.err)
|
||||
}
|
||||
delete(m.cache.objects, msg.key)
|
||||
m.secrets.SetError(msg.err)
|
||||
} else {
|
||||
@@ -663,6 +673,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.done(slotValue)
|
||||
if msg.err != nil {
|
||||
m.noteErr(msg.err)
|
||||
m.logErrOf(msg.obj.Container.Name+"/"+msg.obj.Name, msg.err)
|
||||
m.detail.SetValueError(msg.err)
|
||||
} else {
|
||||
m.detail.SetValue(msg.value)
|
||||
@@ -689,6 +700,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.done(slotDescribe)
|
||||
if msg.err != nil {
|
||||
m.noteErr(msg.err)
|
||||
m.logErrOf(msg.obj.Container.Name+"/"+msg.obj.Name, msg.err)
|
||||
m.detail.SetDescribeError(msg.err)
|
||||
} else {
|
||||
m.cache.details[msg.key] = entry[provider.Object]{msg.obj, m.now()}
|
||||
@@ -759,6 +771,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
if m.focus != paneDetail {
|
||||
m.lastLeft = m.focus
|
||||
}
|
||||
m.logFlash()
|
||||
cmds = append(cmds, m.syncFields())
|
||||
if m.anyLoading() && !m.spinning {
|
||||
m.spinning = true
|
||||
@@ -1353,6 +1366,7 @@ func (m *Model) handleSources(msg sourcesMsg) tea.Cmd {
|
||||
for _, p := range m.providers {
|
||||
if r, ok := m.sourceResults[p.ID()]; ok && r.err != nil {
|
||||
m.noteErr(r.err)
|
||||
m.logErrOf(p.Label(), r.err)
|
||||
errs = append(errs, fmt.Sprintf("%s: %v", p.Label(), r.err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user