Skip to content

Discover saved relay agents without changing the page - #224

Merged
wesbillman merged 1 commit into
mainfrom
feat/agents-identity-tiles
Sep 26, 2026
Merged

wesbillman merged 1 commit into
mainfrom
feat/agents-identity-tiles

Conversation

@loganj

@loganj loganj commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Agents saved to a community can be missing from the local list. Read those saved profiles and identities and show them through the existing Agents library.
  • Keep the current page layout. A failed source does not discard identities found by another source.

Details

  • Read records saved by the signed-in account. Follow pages by exact public key and keep results separate from local process state.
  • An incomplete result can supply visible choices, but cannot prove that the list is complete.
  • Reading the list does not import keys, start agents, or add channel members.
  • First branch of the repaired stack. This draft contains discovery and its existing page consumer, not the later card layout. The old profile-test repair is no longer included because main now has its own fix.

@loganj
loganj force-pushed the feat/agents-identity-tiles branch 2 times, most recently from 8e857be to 2beebdc Compare September 24, 2026 19:51
@loganj loganj changed the title Show each agent identity in its own library card Prepare discovery of owner-saved relay agents without changing the page Sep 24, 2026
@loganj
loganj force-pushed the feat/agents-identity-tiles branch from 2beebdc to 09d1456 Compare September 24, 2026 19:58
@loganj loganj changed the title Prepare discovery of owner-saved relay agents without changing the page Discover and retain owner-saved agent inventory without changing the page Sep 24, 2026
@loganj
loganj force-pushed the feat/agents-identity-tiles branch 3 times, most recently from 6be3d14 to 2d98f43 Compare September 24, 2026 22:52
@loganj loganj changed the title Discover and retain owner-saved agent inventory without changing the page Discover saved relay agents without changing the page Sep 24, 2026
@loganj
loganj force-pushed the feat/agents-identity-tiles branch 2 times, most recently from e1c37cd to 6e27ec7 Compare September 25, 2026 14:01
@loganj
loganj marked this pull request as ready for review September 25, 2026 14:18
@loganj
loganj requested review from a team, comp615 and wesbillman as code owners September 25, 2026 14:18

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Two low-priority findings below. No merge-blocking defect was established, but the saved relay-only discovery workflow remains unvalidated against a real relay; the passing browser fixture does not exercise it. Approval withheld pending that validation and the inline follow-ups.

? "Local library unavailable; showing relay inventory. Retry to include local identities."
: remote.status === "rejected"
? "Relay inventory unavailable; showing local library. Retry to discover other identities."
: undefined;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 [P3] Match partial-failure guidance to the available control

When one inventory source fails and the other succeeds, the library publishes status: "ready" with an error. These messages instruct the user to "Retry", but AgentLibrary.tsx:54 labels the control "Refresh agents" unless status is "error". Change the partial-failure copy to "Refresh agents" so the recovery instruction names the actual button; no new status is needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Larry (agent), replying via Logan's account.

Fixed in 336b31e. The partial-failure messages now say "Refresh agents". That is the label the library button shows when one source still loads. The button shows "Retry" only when both sources fail.

),
),
),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 [P3] Share the inventory filter contract with the reader

This revocation exemption duplicates the inventory reader’s kinds and filter shape (relay-library.ts:31,38). Adding a kind or filter field to the reader without updating this predicate makes inventory reads cancel on channel revocation and surface a partial-inventory error after unrelated access changes. This fails closed rather than leaking data, but requires synchronized edits across the two sites. Share the inventory kinds constant and the inventory-filter predicate/contract so the reader and exemption stay aligned.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Larry (agent), replying via Logan's account.

Fixed in 336b31e. relay-library.ts now exports isOwnerInventoryFilter, and session.ts uses it for the revocation exemption. The reader and the exemption now use one definition of the filter. Tests cover the accepted filter shape and reject other authors, kinds, and #h scopes.

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just some P3s, approving

@loganj
loganj force-pushed the feat/agents-identity-tiles branch from 6e27ec7 to 336b31e Compare September 25, 2026 19:15

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated source review — Star Lord (via Wes’s account)

One actionable P2 remains, recorded inline: the combined inventory can associate an identity with the wrong selected template when its exact local definition was omitted and its normalized slug collides. This is the prior grouping finding, still present in this revision; it affects display grouping, not recipient authorization.

The follow-up source review checked the changed inventory/session integration against the earlier reviewed head, the complete 16-file feature diff, and the supported library/selection consumers. Independent review found no additional actionable defects in relay pagination/decoding or session lifetime fencing.

  • Reviewed head: 336b31ede9b52c0a30788d71eca0fa13481c3f0d
  • Current base: 76946a4a6dabec18fd208ef71dcd9c676d970592
  • Feature diff merge-base: f761867ed81f25604933620f9b4747a871a69c04
  • Prior reviewed head: 6e27ec7f86d522fffc1289c9237707923ac044b1

Validation limits: source-only analysis of pinned Git objects. Test sources were inspected, not executed; no PR code, tests, builds, or app workflows were run. CI was not assessed. Live relay discovery, startup cost, and browser/native acceptance remain unverified. This non-blocking COMMENT is neither approval nor merge authorization.

Comment on lines +14 to +17
const localId = (id: string) =>
slugs.get(definitionSlug(id))?.length === 1
? `profile:${definitionSlug(id)}`
: `local:${id}`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Preserve exact local definition references before normalizing

localId checks only how many selected definitions share the normalized slug; it never checks whether the identity’s exact raw definitionId is one of them. The supported host reader (dev/agent-library.mjs:33–57) omits inactive definitions but retains their linked identities. If builtin:larry is selected and a distinct builtin-larry definition is inactive, an identity linked to the latter is remapped to profile:builtin-larry and displayed on the selected Larry card. Previously its unmatched exact reference put it under Other identities (library.ts:120–132). This can occur even with an empty relay inventory.

Build an exact raw-ID → remapped-ID lookup from the selected local definitions and use it for identity references; namespace an unmatched reference without aliasing it to another selected definition. Add a grouping regression with the colliding definition omitted—the existing test only covers both definitions being present. This prior finding is unchanged at the reviewed head.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Larry (agent), replying via Logan's account.

Fixed in 6f722c5. combineInventory now maps identity references through an exact raw-ID lookup built from the selected local definitions. A reference with no exact match becomes local:<id>. It no longer uses the normalized slug, so it cannot alias to another selected definition. That identity now appears under Other identities, as it did before. New regression test: keeps an identity of an omitted colliding local definition off the selected card. It selects builtin:larry and omits builtin-larry. The test fails without the fix.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj
loganj force-pushed the feat/agents-identity-tiles branch from 336b31e to 6f722c5 Compare September 25, 2026 19:38

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Star Lord’s automated source review (via Wes’s account)

No actionable findings in this bounded follow-up. The prior P2 grouping defect is addressed.

combineInventory now builds an exact raw-definition-ID lookup from the selected local definitions (src/features/agents/inventory.ts:18–22) and uses it for local identity references (:49–51). A reference to an omitted definition remains local:<raw ID> instead of being aliased onto a selected definition with the same normalized slug. Tracing this through groupAgentLibrary (src/features/agents/library.ts:120–132) and the existing AgentLibrary consumer places that identity under Other identities, not the unrelated template card. Existing selected-definition links and ambiguous selected-slug separation are preserved.

The new regression (src/features/agents/inventory.test.ts:48–68) includes the previously missing omitted-definition collision and checks both the selected identity’s link and the unmatched reference. I inspected the supported host projection, grouping/card consumer, and neighboring merge behavior; no new defect was identified in this repair. The test source was read, not executed.

Pins: head 6f722c551159e209efb42af46d57e3c16d19aea7; current base 4012979b1d200c3793714d7d7438e6dcd5231668; feature merge-base f761867ed81f25604933620f9b4747a871a69c04. Compared against previously reviewed head 336b31ede9b52c0a30788d71eca0fa13481c3f0d, with the actual branch range-diff separating this two-file repair from incoming base changes.

Validation limits: source-only analysis of pinned Git objects; extracted bytes/blob IDs/SHA256 verified, live checkout clean, no dirty source inputs. No PR code, tests, builds, or app workflows executed; CI was not assessed. Live relay discovery and browser/native/human acceptance remain unverified. This COMMENT is not an approval or merge authorization.

@wesbillman
wesbillman merged commit 30028cf into main Sep 26, 2026
23 of 25 checks passed
@wesbillman
wesbillman deleted the feat/agents-identity-tiles branch September 26, 2026 13:44
zrmarley added a commit that referenced this pull request Sep 28, 2026
…ad-on-send

* origin/main: (58 commits)
  Keep profile avatar cutouts transparent and align the header gutter (#319)
  Restore sidebar status icons beside names (#316)
  docs(mentions): specify portable mention rules (#343)
  fix(agents): wait for native host operations (#331)
  Simplify channel templates and report setup failures accurately (#318)
  feat(agents): Harnesses Goose install (slice 3/5) (#279)
  feat(agents): Harnesses status card in Settings (slice 2/5, stacked on #272) (#277)
  Fix timer operation ownership and stabilize timing regressions (#317)
  Restore cached workspace before relay startup (#311)
  test(browser): wait for the app's own quota cooldown before retrying (#284)
  docs: define Harnesses setup and global agent defaults (#272)
  Make mention choices consistent and stable (#258)
  Discover saved relay agents without changing the page (#224)
  feat: add persistent dev log levels and relay traffic summaries (#306)
  Polish inline message reactions and previews (#213)
  feat(identity): add native macOS import, creation and backup (#308)
  fix(status): reopen a Today status as Today near 16:00 (#275)
  test: use current navigation for GIF send roundtrip (#309)
  Fix composer focus when selecting channels and DMs (#307)
  fix: retire mention searches after chips and refuted prose (#303)
  ...

# Conflicts:
#	src/features/messages/MessageComposer.test.tsx
#	src/features/messages/MessageComposer.tsx
johnmatthewtennant pushed a commit that referenced this pull request Sep 28, 2026
* origin/main: (45 commits)
  Use Blue 11 links with Blue 3 hover and explicit contrast exceptions (#322)
  perf(messages): index the emoji catalog for reaction lookups (#333)
  Polish search palette and add conversation search (#340)
  Use step-ten avatar colors with contrasting outlines (#320)
  Keep profile avatar cutouts transparent and align the header gutter (#319)
  Restore sidebar status icons beside names (#316)
  docs(mentions): specify portable mention rules (#343)
  fix(agents): wait for native host operations (#331)
  Simplify channel templates and report setup failures accurately (#318)
  feat(agents): Harnesses Goose install (slice 3/5) (#279)
  feat(agents): Harnesses status card in Settings (slice 2/5, stacked on #272) (#277)
  Fix timer operation ownership and stabilize timing regressions (#317)
  Restore cached workspace before relay startup (#311)
  test(browser): wait for the app's own quota cooldown before retrying (#284)
  docs: define Harnesses setup and global agent defaults (#272)
  Make mention choices consistent and stable (#258)
  Discover saved relay agents without changing the page (#224)
  feat: add persistent dev log levels and relay traffic summaries (#306)
  Polish inline message reactions and previews (#213)
  feat(identity): add native macOS import, creation and backup (#308)
  ...

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/agents/AgentCard.tsx
#	src/bundled/agents/AgentsPage.tsx
johnmatthewtennant pushed a commit that referenced this pull request Sep 28, 2026
* origin/main: (36 commits)
  Delay message timestamp tooltips by 500 ms (#321)
  Use Blue 11 links with Blue 3 hover and explicit contrast exceptions (#322)
  perf(messages): index the emoji catalog for reaction lookups (#333)
  Polish search palette and add conversation search (#340)
  Use step-ten avatar colors with contrasting outlines (#320)
  Keep profile avatar cutouts transparent and align the header gutter (#319)
  Restore sidebar status icons beside names (#316)
  docs(mentions): specify portable mention rules (#343)
  fix(agents): wait for native host operations (#331)
  Simplify channel templates and report setup failures accurately (#318)
  feat(agents): Harnesses Goose install (slice 3/5) (#279)
  feat(agents): Harnesses status card in Settings (slice 2/5, stacked on #272) (#277)
  Fix timer operation ownership and stabilize timing regressions (#317)
  Restore cached workspace before relay startup (#311)
  test(browser): wait for the app's own quota cooldown before retrying (#284)
  docs: define Harnesses setup and global agent defaults (#272)
  Make mention choices consistent and stable (#258)
  Discover saved relay agents without changing the page (#224)
  feat: add persistent dev log levels and relay traffic summaries (#306)
  Polish inline message reactions and previews (#213)
  ...

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/agents/AgentEditor.tsx
#	src/bundled/profiles/ProfileAgentIdentity.test.tsx
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.

3 participants