Add KV inspector backend endpoints and WebSocket protocol support#3627
Add KV inspector backend endpoints and WebSocket protocol support#3627
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
|
@copilot please add ui for this feature in frontend repository, similarly to how actor events, and state is presented |
Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
I've added the KV inspector UI to the frontend, following the same patterns as actor events and state tabs. The implementation includes: UI Components:
Features:
Integration:
The UI is ready and will display KV entries once the backend driver implementation is complete (the Changes committed in dc6fcc5 |
|
@copilot pls update the branch with latest changes from main |
I've fetched the latest changes from main. However, there's a significant refactoring in the main branch that conflicts with our KV inspector implementation: Key Changes in Main:
Required Actions:
I can proceed with rebasing and adapting the KV implementation to the new architecture, but this will require rewriting parts of the frontend integration. Would you like me to:
Let me know how you'd like to proceed! |
|
@copilot option A |
I've successfully rebased the KV inspector feature onto the latest main branch and adapted it to the new WebSocket-based inspector architecture. Here's what's been completed: ✅ Completed:
🔧 Remaining Work: The frontend UI components need to be created/adapted to work with the new
The branch |
Implements KV inspector backend infrastructure and WebSocket protocol support to view and search actor key-value storage across datacenters. Rebased onto latest main with new WebSocket-based inspector architecture.
Changes
Backend API Endpoints
GET /actors/{actor_id}/kv/keysto api-public and api-peer with query parameters:prefix: Base64-encoded key prefix filterlimit: Result count (default 100, max 1000)reverse: Sort orderInspector WebSocket Protocol
v1.bare) with KV protocol messages:KvListRequest: Request message with optional prefix, limit, and reverse parametersKvListResponse: Response message containing array of KV entriesKvEntry: Entry type with key, value, and updateTs fieldsgetKvEntries()method to ActorInspector class (stub implementation)Architecture Notes
This PR adapts the KV inspector to work with the new WebSocket-based inspector protocol (introduced in main branch refactoring). The implementation follows the same patterns as existing inspector features (State, Events, Connections, RPCs).
Remaining Work
To complete the feature:
actor-inspector-context.tsxand WebSocket communicationgetKvEntries()method for FileSystemActorDriver and EngineActorDriver using existingkvListPrefixmethodsThe backend infrastructure is complete and follows established patterns from the
kv_getendpoint with consistent base64 encoding for keys/values.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.