Skip to content

feat: API Keys, Analytics, and Cluster Operations tabs#1

Merged
ekrist1 merged 13 commits into
masterfrom
feat/admin-keys-analytics-cluster
May 29, 2026
Merged

feat: API Keys, Analytics, and Cluster Operations tabs#1
ekrist1 merged 13 commits into
masterfrom
feat/admin-keys-analytics-cluster

Conversation

@ekrist1
Copy link
Copy Markdown
Owner

@ekrist1 ekrist1 commented May 29, 2026

Summary

Adds three new admin tabs to the clisense TUI, covering the corresponding Typesense v30.2 API surface:

  • API Keys — list/create/delete keys with scoped actions & collections. The generated secret is shown once at creation (Typesense never returns it again); editing is disabled since keys are immutable.
  • Analytics — manage analytics rules (popular_queries, nohits_queries, counter, log) via create/edit/delete. POST upserts by name, so the generic CRUD engine handles the full lifecycle with no wrapper.
  • Cluster — operational dashboard for /health, /stats.json, /metrics.json, /debug, plus confirm-gated maintenance ops: snapshot, compact DB, vote (leader re-election), and clear cache.

Each feature was built TDD: endpoint helpers + templates + screen + app wiring, committed in small steps. Implemented per the plan in docs/superpowers/plans/2026-05-29-admin-keys-analytics-cluster.md.

Tab order now ends with … Conversations, API Keys, Analytics, Cluster, Settings (12 tabs). Digit shortcuts 19 cover the first nine; the rest are reached via Tab/Shift+Tab. Settings stays last so settingsTabIndex() and Esc handling are unaffected.

Notes / caveats

  • Built against the documented v30.2 API but not run against a live Typesense server. Worth a manual smoke-test: API Keys list envelope + numeric ids, Analytics rules list shape (handled defensively as array-or-{"rules":[...]}), and the Cluster operation endpoints.
  • Snapshot path is a constant (/tmp/typesense-snapshot); making it editable is noted as a follow-up.
  • Analytics events endpoints are intentionally out of scope (follow-up).

Test Plan

  • go test ./... passes
  • go vet ./... clean
  • go build ./... succeeds
  • Manual: launch against a real Typesense, verify each tab loads, create/delete an API key (confirm one-time secret modal), create/edit/delete an analytics rule, and load the Cluster panels (avoid running snapshot/compact/vote against production)

🤖 Generated with Claude Code

ekrist1 and others added 13 commits May 29, 2026 16:14
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 29, 2026 14:32
@ekrist1 ekrist1 merged commit ab3d110 into master May 29, 2026
1 check failed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants