Skip to content

fix: list conclusions workspace-wide instead of hard-coded "honcho" observer - #4

Open
geertvanzoest wants to merge 1 commit into
kechengzhang28:mainfrom
geertvanzoest:fix-conclusions-workspace-list
Open

fix: list conclusions workspace-wide instead of hard-coded "honcho" observer#4
geertvanzoest wants to merge 1 commit into
kechengzhang28:mainfrom
geertvanzoest:fix-conclusions-workspace-list

Conversation

@geertvanzoest

Copy link
Copy Markdown

Fixes #2

Problem

src/features/conclusions/hooks.ts hard-coded observerId = "honcho" and listed conclusions through honcho.peer("honcho").conclusions, sending {"filters":{"observer_id":"honcho","observed_id":"honcho"}}. On Honcho servers where the deriver stores conclusions under the observing peer itself (e.g. observer_id: "alice"), that filter never matches, so the Conclusions tab is permanently empty. The SDK's peer() get-or-create also silently created an empty honcho peer in the workspace just by opening the tab.

Changes

  • useConclusionList now calls the workspace-level POST /v3/workspaces/{wid}/conclusions/list with an empty filter, so conclusions from every observer show up; the existing client-side observed-peer dropdown keeps working (it now actually gets populated).
  • useDeleteConclusion goes straight to DELETE /v3/workspaces/{wid}/conclusions/{id} (no observer scope needed) — this also removes the peer-creation side effect.
  • useConclusionSearch takes an explicit observerId/observedId, since the server requires an observer/observed scope for semantic search ("observer and observed must be specified for semantic search").
  • Extracted getBaseUrl() in lib/honcho.ts (same DEV/localStorage logic getHoncho already used) for the raw API calls.

Testing

  • npm run check and npm run lint pass.
  • Verified against a self-hosted Honcho v3 instance: tab went from "No conclusions yet" to rendering all conclusions with correct Observer/Observed/Session metadata, pagination intact, delete working.

Supersedes #3.

…erver (kechengzhang28#2)

The Conclusions tab filtered on observer_id/observed_id "honcho", which matches nothing on Honcho servers that store conclusions under the observing peer itself, leaving the tab permanently empty. It also created an empty "honcho" peer as a side effect of the SDK's get-or-create peer() call.

List and delete now go through the raw workspace-level conclusions API without an observer filter; the existing client-side observed-peer filter keeps working. Semantic search takes an explicit observer/observed scope, as required by the server.

Fixes kechengzhang28#2
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.

Conclusions tab always empty when conclusions are stored per-peer (hard-coded "honcho" observer)

1 participant