feat(agentctl): refreshView after discovery headless ops (Phase 545)

Call refreshView after list, publish, refresh, and filter discovery helpers.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 13:20:22 -04:00
co-authored by Cursor
parent 5e560de068
commit 6a988930c4
2 changed files with 14 additions and 4 deletions
+2
View File
@@ -17,6 +17,8 @@ Both modes use **`pearcord-ui-flow` `dispatchUiMessage`** — the same handler a
`AgentClient` resolves RPC replies before treating `{ event: "state" | "sidecar" }` push lines as events (fixes `wait-event` responses that include an `event` field). `AgentClient` resolves RPC replies before treating `{ event: "state" | "sidecar" }` push lines as events (fixes `wait-event` responses that include an `event` field).
**v0.8.508 (Phase 545):** Headless discovery ops call `refreshView` after list/publish/refresh/filter. Bundle: `npm run test:agentctl-phase545-discovery` (chains `test:agentctl-phase529-discovery`).
**v0.8.507 (Phase 544):** Headless presence ops call `refreshView` after status/activity changes. Bundle: `npm run test:agentctl-phase544-presence` (chains `test:agentctl-phase528-presence`). **v0.8.507 (Phase 544):** Headless presence ops call `refreshView` after status/activity changes. Bundle: `npm run test:agentctl-phase544-presence` (chains `test:agentctl-phase528-presence`).
**v0.8.506 (Phase 543):** Headless soundboard ops call `refreshView` after play/upload/delete. Bundle: `npm run test:agentctl-phase543-soundboard` (chains `test:agentctl-phase527-soundboard`). **v0.8.506 (Phase 543):** Headless soundboard ops call `refreshView` after play/upload/delete. Bundle: `npm run test:agentctl-phase543-soundboard` (chains `test:agentctl-phase527-soundboard`).
+12 -4
View File
@@ -548,12 +548,16 @@ class HeadlessSession {
async listPublicDiscovery () { async listPublicDiscovery () {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
return this.platform.listPublicDiscovery() const out = await this.platform.listPublicDiscovery()
await this.refreshView()
return out
} }
async publishDiscoveryListing (guildId, listed = true) { async publishDiscoveryListing (guildId, listed = true) {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
return this.platform.setGuildDiscoveryListing(guildId, listed) const out = await this.platform.setGuildDiscoveryListing(guildId, listed)
await this.refreshView()
return out
} }
async joinPublicDiscovery (inviteCode) { async joinPublicDiscovery (inviteCode) {
@@ -565,12 +569,16 @@ class HeadlessSession {
async refreshPublicDiscovery () { async refreshPublicDiscovery () {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
return this.platform.refreshDiscoveryListingsFromMesh() const out = await this.platform.refreshDiscoveryListingsFromMesh()
await this.refreshView()
return out
} }
async setDiscoveryFilter (filter = {}) { async setDiscoveryFilter (filter = {}) {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
return this.platform.setDiscoveryFilter(filter) const out = await this.platform.setDiscoveryFilter(filter)
await this.refreshView()
return out
} }
async sendFriendRequest (opts = {}) { async sendFriendRequest (opts = {}) {