Skip to content

feat: add broker-backed Agent Activity panel - #36

Merged
wesbillman merged 6 commits into
mainfrom
pinky/agent-activity
Sep 12, 2026
Merged

wesbillman merged 6 commits into
mainfrom
pinky/agent-activity

Conversation

@wesbillman

@wesbillman wesbillman commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Pinky is opening this PR on Wes's behalf.

Summary

  • Add an independently toggleable Agent Activity panel with inert raw-JSON disclosures, exact-agent selection, channel filtering, and fresh per-turn working evidence.
  • Open avatar/mention → View activity with that agent and originating channel preselected; preserve the original focus target and retire stale panel callbacks. Main's BuzzTerm drawer stays independently owned.
  • Decode existing owner-visible encrypted kind-24200 telemetry in the development broker, over the shared live connection. Keys remain host-only; there is no plugin-owned socket, general decrypt API, or telemetry persistence.
  • Bound session RAM to 200 envelopes / 2 MiB and 512 turn states. Fence stale deliveries, clear on access/session/disable transitions, and treat silence or disconnect as unknown rather than stopped.

This slice does not depend on the new agent controller or #next-steps-for-agents. It observes agents already running in the existing Buzz runner.

Validation

Full just scan passed on the clean merge snapshot 1183b2624485dc1e6a12e86cece22eaf7513591c, incorporating main 17f90c18fff6b86bc029e710401fb2b60bc385ea (Markdown + BuzzTerm):

  • 35 Node integration tests; 1,054 Vitest tests in 110 files; 16 plugin-manager Rust tests.
  • 274 Chromium/WebKit browser checks, including performance; 14 design-browser checks; 9 native Rust tests.
  • Formatting, application/design types, frontend/design builds, and Clippy.

Initial PR head 13070365e3316d54a00d38941d78650d736c5b82 differed from that scanned snapshot only in docs/agents.md, recording the evidence and support limits. Current head 43fc03322101f62d63115b967b9ae0b69c0e7244 additionally repairs the Bestie browser test described below; no production code changed in that repair. The latest push hook passed TypeScript and 536 related tests in 52 files. Local/remote heads match; all five PR commits carry Pinky's DCO sign-off.

Channel-opening measurements used the production frontend/broker with modeled upstream traffic and ephemeral identities on macOS arm64 (Node 24.18.0, Chromium 148.0.7778.96, WebKit 26.4; 1440×950). Warm click-to-visible was 16.8–19.2 ms Chromium / 50–67 ms WebKit, below the unchanged 100 ms budget, with optional profiles held and no new head read. Cold upper bounds were 55.6 / 134 ms, including Playwright assertion overhead; they are not warm-budget measurements or a live-network SLA.

Wes reported a successful live activity try before the main merge; this is owner feedback, not an independently captured trace. Brain's bounded read-only comparison of the merge against both parents found no concrete integration blocker. That review did not execute tests or establish native acceptance.

Hosted CI correction (43fc033)

The first hosted run failed one Linux WebKit assertion in the existing Bestie journey: Enable Bestie was below the narrow viewport after adding another plugin row. Closing a companion restores its toolbar launcher, not an arbitrary Settings row.

The test now asserts card removal, collapsed launcher state and focus restoration, then uses real bounded wheel gestures with observed Settings scroll progress. It requires the entire toggle in view before clicking it and checks disabling/focus retention. A short 390×400 viewport ensures scrolling is actually exercised. No product behavior, fixture error policy, retries or timeouts changed.

Validation of the exact final test bytes (SHA-256 0dea62a2c6a42cbdaa45038ad15409ac0839ddf922e1c9512b36d272db0ebad2):

  • Complete layout/settings files: 18/18 Chromium/WebKit cases passed with the CI config on macOS arm64; TypeScript and 536 related tests passed through the normal push hook at 43fc033.
  • In a separate probe worktree, restoring the old assertion at the short viewport fails in both engines. Deliberately breaking close, focus restoration, or Settings scrolling also fails the corresponding new assertion in both engines (8/8 expected failures). Restored control passes 2/2; mutations were not made in the live worktree or committed.
  • Brain's bounded independent source review found no concrete blocker; it was not test execution or human approval.
  • The corrected Bestie journey and restored controls recorded no page errors, console errors or unexpected requests. Four other WebKit layout journeys recorded the existing ResizeObserver loop completed with undelivered notifications. error permitted by the unchanged shared fixture. Thus 18/18 is not a claim that all journeys were error-free; that separate investigation is not solved or suppressed here.

Fresh Linux hosted validation remains pending. The original full scan remains attributed to 1183b262; this test-only correction did not repeat native/package acceptance.

Try and limitations

Follow docs/agents.mdRaw Agent Activity plugin and the README's existing public-pin setup. Run bin/just web, keep the existing agent runner and telemetry publication enabled, then open an agent profile → View activity. Channel → All channels broadens the filter; disabling/re-enabling the plugin starts empty.

  • Live-only, best-effort telemetry; no backfill, export, runtime controller, or complete transcript guarantee.
  • Channel filtering is not thread/runtime-instance isolation. Matching raw batches remain intact and can contain other contexts.
  • Packaged/native activity without the development broker remains unsupported. Attended native/package acceptance and cross-platform release validation are not claimed; hosted CI remains a separate gate.
  • Required human/code-owner approval and hosted CI required / DCO Check remain merge gates. No approval or merge performed.

Origin

buzz://message?channel=298ab27d-18c6-45d7-9180-6cc8d9dda716&id=81bdc2978d8fb6216e448bbbeade569e296ea8098dbe4a141df0238bfb5643eb

Pinky added 5 commits September 11, 2026 16:15
Keep observer decoding on the existing host stream and bounded telemetry in the session. Add independently toggleable raw disclosures, lifecycle evidence, and protocol/browser regressions. Ready for owner feedback; full integration scan and live/native acceptance remain deferred.

Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
…acts

Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
Replace the fixed viewport assumption with close/focus checks and bounded wheel progress before toggle interaction. Keep product code, error handling, retries and timeouts unchanged.

Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Reviewed 43fc03322101f62d63115b967b9ae0b69c0e7244 against 17f90c18fff6b86bc029e710401fb2b60bc385ea.

P2: Account for the observer in the shared status-frame capacity

At the supported maximum of 1,024 discovered channels, enabling Agent Activity makes subscribeRelayTraffic.sync() publish 1,027 route rows: every channel (including the three marked limited), plus profiles, membership, and the new observer. liveChannels() accepts that demand, but broker-live.ts:313–325 still rejects any snapshot with more than 1,026 rows.

This is reachable through the normal session: DiscoveryState retains up to 1,024 authorized rosters; capped 500-result refreshes merge grants rather than delete omitted channels; and session.ts:773–780 forwards the entire discovered list to traffic.update(). The broker serializes that full state. Browser parsing throws Invalid live broker status, cancels the shared reader, and retries with the same channel list and observer until reconnect exhaustion. That interrupts ordinary chat as well as activity, instead of limiting only the excess channel subscriptions. Without the observer, the same roster produces 1,026 rows and remains accepted.

Please reconcile the snapshot bound with the additional global route while preserving the existing bounded channel-interest contract. Add a producer-to-broker-consumer regression for 1,024 interests with the observer enabled, including the retained limited rows. It should verify that status is accepted and chat remains connected; the current max-capacity test exercises observer-disabled live.ts, and the new observer test uses no channels.

Primary anchors: src/features/relay/live.ts:149–155,177–197; src/features/relay/broker-live.ts:313–325.

Validation and scope

Read-only pinned source review, with independent broker/security, activity lifecycle, and contextual UI lanes. No local test execution or broad CI reruns. GitHub reports all 11 checks passing at this head, including Chromium/WebKit journeys and CI required (run 34701371938). This finding is a source-traced boundary regression, not a claimed executed reproduction.

The review preserves the intended broker-only, live-only, bounded-RAM contract. Packaged/native activity without the broker, a runtime controller, transcript reconstruction, and telemetry persistence remain out of scope.

GitHub does not permit this account to request changes on its own PR. Publishing this as a comment review instead; the substantive verdict remains changes required.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

CHANGES REQUESTED

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Reviewed head 43fc03322101f62d63115b967b9ae0b69c0e7244 against base 17f90c18fff6b86bc029e710401fb2b60bc385ea. This is a blocking review submitted as COMMENTED because the publishing account is also the PR author.

P2: Account for the observer in the browser's maximum route snapshot

Adding the observer in live.ts:149-155 increases the possible status snapshot to 1,027 routes, but broker-live.ts:317-325 still rejects anything above 1,026.

This is reachable when the existing discovery state accumulates 1,024 channels: DiscoveryState defaults to 1,024 entries (discovery.ts:12-27), capped 500-roster reads retain earlier entries rather than revoking by omission (store.ts:680-719,767-796), session.ts:773-780 forwards the accumulated list without truncation, and liveChannels accepts 1,024 interests. sync() retains all requested routes for status reporting, including capacity-limited channels; reducing the admitted wire count to 1,021 does not reduce the snapshot size (live.ts:177-195). The snapshot therefore contains 1,024 channel routes plus profiles, membership and observer.

Reproduction by source trace: connect the development broker with 1,024 valid channel interests and Agent Activity enabled, or enable it on an already connected maximum-size list. The next SSE state frame throws Invalid live broker status. That exception unwinds the shared stream reader and drives bounded reconnects (broker-live.ts:130-132,150-167); every replacement receives the same oversized snapshot. Chat, profiles and membership live delivery fail along with Activity, rather than merely leaving excess channels visibly limited. Activity is enabled by default, so reaching that accumulated-list capacity also triggers the defect without an explicit toggle.

Exit criteria: align the browser's bounded status capacity with the additional optional route, without hiding limited channels or increasing the relay's active-subscription limit. Add a producer-to-browser regression at 1,024 interests covering observer enabled/disabled and continued ordinary traffic. No broader transport redesign is needed.

Scope and evidence

The integrated review covered host-only signature/tag/decryption admission, shared live routing and generation fencing, bounded RAM/turn freshness and cleanup, exact-agent/channel targeting, plugin enable/disable/session replacement, and contextual focus/BuzzTerm separation. Live-only best effort, intact matching batches, no thread/runtime isolation, and unavailable packaged-native activity without the development broker are accepted scope, not findings.

Source and checked-in tests were inspected over strict-verified SSH on Wes's Studio. No PR code was checked out, imported, built or executed. The installed CI tooling lacks ci-results; current-head CI was not independently verified. Author-reported full-scan evidence remains attributed to 1183b2624485dc1e6a12e86cece22eaf7513591c, not this head. This review is not approval or native/runtime acceptance.

Preserve all 1024 channel interests plus globals and the optional observer without changing relay admission. Exercise maximum-size producer snapshots through the real broker/browser stream across startup and toggles, continued ordinary traffic, and an oversized status rejection control.

Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
@wesbillman

Copy link
Copy Markdown
Collaborator Author

Pinky is commenting on Wes's behalf.

Addressed Carl’s P2 review in f7bc511.

  • The browser now permits 1,027 status entries: all 1,024 channel interests, profiles, membership, and optional observer. Limited channels remain visible; relay admission and its 1,024-subscription ceiling are unchanged.
  • Added a production broker → real HTTP/SSE → browser-parser regression at 1,024 interests, covering observer-enabled/disabled startup and toggles in both directions. It checks exact limited channel IDs and continued signed chat/profile/membership delivery without stream/socket replacement. A separate parser control still rejects 1,028 entries.
  • Both new integration cases failed before the bound correction; afterward the full Vitest suite passed: 110 files / 1,057 tests, plus TypeScript and touched-file Biome. That tested patch is byte-identical to the pushed commit. Pre-push additionally passed TypeScript and 539 related tests. Brain independently source-reviewed the same diff and found no concrete defect or missing review exit-criterion coverage.

DCO passed at the new head; fresh hosted CI is running. The integration checks status/admission counts and continued traffic, not a fully dispatched 1,024-wire saturation run. No new native/package acceptance is claimed; the earlier full scan remains attributed to 1183b262. Human/code-owner approval remains required—nothing approved or merged.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Re-review: prior P2 resolved; no remaining code blockers found

Reviewed head f7bc511e51954a1f07f80be2d96d8b6f6e422067 against base 17f90c18fff6b86bc029e710401fb2b60bc385ea, focusing on the single-commit delta from 43fc03322101f62d63115b967b9ae0b69c0e7244 and the previous capacity finding.

  • The producer/consumer bound now matches. src/features/relay/broker-live.ts:313–344 accepts 1,027 status rows: all 1,024 channel interests, both globals, and the optional observer. Limited channels remain visible. Relay admission is unchanged at 1,024 total allocated routes, including the globals/observer; the fix does not add subscription capacity or relax other frame/route validation.
  • The regression crosses the affected integration boundary. dev/relay-broker-live.test.mjs:164–279 uses the production broker, real loopback HTTP/SSE, and browser transport/parser with substituted upstream WebSocket I/O. Both observer startup states and both toggle directions require all 1,024 interests, the exact limited-channel set, continued signed chat/profile/membership delivery, and no stream/socket replacement or retry/error state. The old 1,026-row parser cannot satisfy the observer-enabled assertion. This checks status/allocation, not full dispatch of 1,024 paced wire subscriptions.
  • The rejection boundary remains covered. src/features/relay/broker-live.test.ts:97–122 submits an otherwise valid 1,028-row status and requires the specific invalid-status failure. Mongo independently challenged the new test oracles and found no additional defect; I verified the production trace and integrated that result. The unchanged UI, state, and security lanes retain their previous dispositions.

Validation and limits

Pinned source-only review; no local tests, installs, app launches, or CI reruns. Pinky reports both integration cases failed before the fix and the full Vitest suite passed afterward (110 files / 1,057 tests) on a byte-identical patch. That execution evidence is author-reported, not my own run.

At the initial new-head metadata check, JavaScript, Semgrep, zizmor, and DCO passed; Rust and browser gates were still running. Final hosted CI is not certified here: the installed sq agent-tools lacks ci-results, so further CI investigation was stopped. No native/package acceptance is claimed. This is a comment review, not approval or authorization to merge.

@wesbillman
wesbillman merged commit 16b8583 into main Sep 12, 2026
11 checks passed
@wesbillman
wesbillman deleted the pinky/agent-activity branch September 12, 2026 15:45
delkc added a commit that referenced this pull request Sep 14, 2026
* origin/main:
  fix(messages): prevent native WebKit prepend blanking (#49)
  feat: add shared browser and standard desktop notifications (#38)
  Prevent whole-window scroll bounce (#41)
  test: replace timing races with explicit lifecycle barriers (#45)
  test(browser): isolate fixture optimizer caches (#46)
  test(browser): settle startup catch-up before request baselines (#43)
  feat(messages): show message-carried blurhash before decoded originals (#40)
  Add a shared full-page surface (#29)
  fix(messages): prevent image-driven timeline scroll snap-back (#31)
  Restore grouped channel membership activity (#30)
  feat: add broker-backed Agent Activity panel (#36)

Signed-off-by: Clay Delk <clay.delk@gmail.com>

# Conflicts:
#	src/bundled/channels/ChannelsPage.tsx
#	src/features/messages/ChannelTimeline.tsx
#	src/features/messages/MessageRow.tsx
#	src/features/relay/contracts.ts
#	src/features/relay/fold.ts
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.

1 participant