feat: side-by-side compare view across multiple instances#14
Closed
BenSheridanEdwards wants to merge 1 commit into
Closed
feat: side-by-side compare view across multiple instances#14BenSheridanEdwards wants to merge 1 commit into
BenSheridanEdwards wants to merge 1 commit into
Conversation
Adds a /compare route that renders N columns, one per pinned Honcho instance, so the user can see how each instance's representation of a peer differs without switching the active instance. - New scoped API client (`createScopedClient`) bound to a specific instance rather than the active one. Backs the compare view's queries without disturbing the active-instance client used elsewhere. - New scoped query hooks for workspaces, peers, peer representation, and peer card; query keys scoped by instance.id to keep caches isolated across columns. - Compare route stores pinned instance IDs and target peer name in URL search params so views are shareable/deep-linkable. - Sidebar nav gets a Compare entry between Workspaces and Settings. - Per-column auto-selects the first workspace and prefers the target peer name if it exists in that instance, else first peer. Tests: - scopedClient: requests target the instance baseUrl + Bearer token - compare route: empty-state prompt when no instances selected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Multi-instance support landed in #8 — but the interface is still "pick one
active instance at a time." For users running a fleet of self-hosted Honchos
(e.g. one per agent), the question that motivates running them is "how do
my agents' representations of the same person differ?" — which can't be
answered without flipping between instances and reconciling by memory.
This PR adds a
/compareroute that renders N columns, one per pinnedinstance, so peer representations can be inspected side-by-side without
disturbing the active instance.
What
API layer
createScopedClient(instance)— openapi-fetch client bound to a specificinstance rather than the active one. Sits next to the existing
client.currentpattern (no change to any existing query hook).compareQueries.ts— scoped versions ofuseWorkspaces,usePeers,usePeerRepresentation,usePeerCard. Each accepts anInstanceandscopes its TanStack Query key by
instance.idso caches don't collideacross columns.
UI
/compareroute (top-level), search params:instances=<comma-ids>andpeer=<target-name>for shareable/deep-linkable views.CompareView— header with target-peer input and "Add instance" dropdown(only shows instances not already pinned), plus the columns grid.
CompareColumn— workspace selector, peer selector, peer representationlist (top conclusions), and peer card via the existing
PeerCardViewer.Auto-selects first workspace; prefers the target peer name if it exists
in that instance, else first peer.
Comparenav entry between Workspaces and Settings, usingthe
Columns2icon.Tests
scopedClient.test.ts— verifies requests target the instance's baseUrland attach the instance's Bearer token.
compare.test.tsx— verifies the empty-state prompt renders when noinstances are selected.
Out of scope (potential follow-ups)
fleet-overview dashboard)
Manual verification
Verified against a local fleet of 5 Honcho stacks (one per agent, ports
8001–8005). Each column's queries correctly route to its own instance's
URL (confirmed via PerformanceResourceTiming). The visual layout renders
cleanly with 5 columns side-by-side.
Conventions
feat:)anyas nevercast at navigate callsitespnpm typecheck,pnpm lint, and the new tests all pass locally