Skip to content

Active Threads sidebar, agent-speech stop control, and auto-open agent threads - #1

Merged
mrmoe28 merged 17 commits into
mainfrom
feature/active-threads-sidebar
Aug 6, 2026
Merged

Active Threads sidebar, agent-speech stop control, and auto-open agent threads#1
mrmoe28 merged 17 commits into
mainfrom
feature/active-threads-sidebar

Conversation

@mrmoe28

@mrmoe28 mrmoe28 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Rolls up the desktop work from this branch, plus a merge of upstream block/buzz main (16 commits).

Changes

  • Active Threads sidebar + useRecordRecentThread — reopen thread panels you've lost.
  • Agent-speech stop control — frontend button plus the Rust tts_controls wiring that actually halts in-flight speech.
  • Auto-open agent threads (useAutoOpenAgentThread) — opens the thread panel when someone else's reply lands in a thread of the channel you're currently viewing. Conservative by design: a per-channel high-water mark keeps history quiet, an already-open thread is never displaced, and your own replies, broadcast replies, and Huddle transcripts are skipped.
  • buzz-app.sh: keep BUZZ_PRIVATE_KEY out of the desktop app. The launcher sources .env with set -a for the relay and ACP agent, but app_state.rs::identity_from_env treats that variable as a dev/CI identity override that beats the OS keyring — so every launch booted as the .env identity and showed the "enter your private key" re-import screen. The app now launches with that one variable unset.

Ratchet-driven extractions

Two touched files sat at the 1000-line limit, so this makes room rather than growing them:

  • handle_cancel_or_shutdown / lock_player_ops moved from tts.rs to tts_voice_transition.rs, where the cancel types they take already live.
  • AppShell's three prop-less agent surfaces grouped into AppShellAgentSurfaces.tsx.

Upstream merge conflicts

  • useCommunityInit.ts — kept both resetRecentThreadsStore() and resetBackgroundMediaUploads(); independent teardown calls.
  • runtime.rs — took upstream. Its restart_eligible had no remaining callers, and the local comments referenced spawn_config_hash, a symbol that no longer exists (now prospective_spawn_config_snapshot).

Verification

pnpm typecheck clean · file-size ratchet clean · cargo test --lib 2204 passed, 0 failed · all six pre-push hooks green.

🤖 Generated with Claude Code

mrmoe28 and others added 17 commits August 3, 2026 23:57
Every thread panel opened (via @-mention, notification click-through,
or search) is now tracked locally and listed in a new sidebar section,
so a thread lost behind other conversations can be reopened without
hunting through its origin channel.

Also trims runtime.rs doc comments to clear the pre-existing desktop
file-size ratchet failure, unrelated to this change but blocking the
commit hook.

Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
Agent text-to-speech previously required a live huddle. Agent replies in
ordinary channels and DMs are now read aloud too, using the same Pocket
voice already configured in Voice settings.

Message text is stripped for speech first (code blocks, URLs, markdown,
mention tokens) so replies are heard as prose rather than read verbatim.
The pipeline is created lazily and kept warm across messages, since
building one loads the model.

Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
## Overview

Agents running in Buzz have no built-in awareness that each channel is
an isolated conversation context. When a human mentions work "you" are
doing in another channel, the current session can misread this as its
own active context and try to coordinate, re-plan, or take ownership of
it — causing confusion and wasted turns.

## What changed

Added a `## Session Model` section to
`crates/buzz-acp/src/base_prompt.md`, inserted immediately after the
opening paragraph and before `## Buzz CLI`. The section explains:

- Each channel is a separate session; multiple sessions of the same
agent identity may be active simultaneously.
- Sessions share core memory, workspace, and relay — but not
conversation context or in-flight reasoning.
- Cross-channel work belongs to the owning session by default; the
current session may take it over only when the human explicitly requests
it.

No runtime code changes. Base prompt only.

---------

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…bin scripts

Backend wiring (tts_controls.rs, chat_tts.rs per-agent voice, tts.rs
speak_with_voice) is held in stash@{0} pending a file-size-ratchet
split of tts.rs — see devbuzz for status.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
## Why

Buzz restores cached channels and messages before profile lookups
complete. On launch, that briefly exposes pubkey-derived labels in place
of familiar display names.

## What

- Persist a bounded, relay-scoped cache of last-known display names,
NIP-01 names, and NIP-05 handles
- Seed batch profile queries from those labels immediately, while
keeping them stale so the existing relay request revalidates them
- Keep cached data presentation-only: avatars and ownership metadata are
not persisted or used to seed profile-detail caches
- Remove cleared or missing profiles, purge a relay's labels when its
community is removed, and include the cache in local-storage quota
recovery
- Add unit coverage for parsing, bounds, eviction, malformed data, and
cleared profiles
- Add an E2E regression that delays the relay profile response and
verifies the cached name is rendered first

## Risk Assessment

Low. The cache is disposable, capped at 1,000 entries per relay, scoped
by normalized relay URL, and always revalidated. It contains only public
label fields and does not restore avatars, agent ownership, or
authorization state.

## Verification

- `just ci`
- `pnpm typecheck`
- `pnpm test` — 3,727 passed
- `pnpm exec playwright test tests/e2e/channels.spec.ts --grep "cached
profile labels"` — passed

Generated with Codex
## Summary

- Keep selected sidebar rows regular by default; manually unread rows
become bold immediately.
- Apply a clearer dark-mode hierarchy: standard inactive rows at 75%,
muted rows at 45%, and unread rows at full emphasis.
- Keep hover text color stable while retaining the selected-row and
unread cues.

## Validation

- `pnpm typecheck`
- `pnpm build:e2e`
- Playwright: sidebar badge and channel-mute coverage

## Screenshots

Posted in the PR comments.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
The "Restart required" badge reports that an agent's running config has
drifted from its spawn-time config, but never says what changed. This
ships the full feature: a typed Rust diff engine and a TS/UI layer that
renders it at every badge site.

## Rust core (spawn-snapshot diff engine)

Replaces the lossy `u64` `spawn_config_hash` with a typed
`SpawnConfigSnapshot`. The snapshot is stamped from the already-resolved
command/env/config values immediately before `spawn()`, closing the race
window where a mid-spawn config edit would suppress the badge.

`SpawnConfigSnapshot::canonical()` is the single JSON projection shared
by the badge and the diff. Drift is `to_value(stamped) !=
to_value(current)`; the diff is a generic leaf walk over those same two
values, so badge-on and diff-non-empty are structurally guaranteed.
Adding a snapshot field reaches the UI with no code change to the diff
engine — `mutation_table_covers_every_serialized_field` fails CI if a
new field arrives without a mutation row.

`eligible_restart_diff(persona_orphaned, Option<TrackedSpawnState>)`
returns the final vector — snapshot walk entries plus a synthetic
`adapter_availability` entry. It returns empty for an orphaned instance
(spawning one would fail) and for agents with no tracked spawn state
(never stamped, can never have drifted). `needs_restart =
!restart_diff.is_empty()` derives from that vector and nothing else.

Redaction policy (`policy_for(path)`) is shared by the wire diff and the
snapshot's manual `Debug` via `is_safe_to_reveal()` from
`managed_agents::env_vars` as the single authority for env-key masking:

| Policy | Paths | Rendering |
|---|---|---|
| `Text` | `system_prompt`, `team_instructions` | character counts only
|
| `MaskedBare` | `args`, `relay_url` | `••••`, no suffix |
| `MaskedSuffix` | non-allowlisted `env.*` | `••••` + last 4 chars when
longer than 8 |
| `Plain` | allowlisted `env.*` (`BUZZ_AGENT_THINKING_EFFORT`,
`BUZZ_AGENT_PROVIDER`, `BUZZ_AGENT_MODEL`, `DATABRICKS_HOST/MODEL`) and
everything else | verbatim |

Default-deny: every env key not in the explicit allowlist stays masked.
`is_safe_to_reveal()` is the single allowlist authority for both the
baked-env display and the diff.

`restart_diff` is omitted from the wire when empty
(`skip_serializing_if`).

## TypeScript / UI layer

New `restartDiff.ts` module defines `RestartDiffEntry`, `RestartChange`,
`JsonValue`; `tauri.ts` and `types.ts` re-export and add `restart_diff`
/ `restartDiff` fields (Rust omission → `restartDiff: []`).

**`RestartDiffBadge`** — hover tooltip capped at 6 entries + "and N
more", `asChild` span trigger (never inside a `<button>`), auto-restart
blurb below the diff list (on/off variant from `autoRestartEnabled`
prop; same `AUTO_RESTART_ON_BLURB` / `AUTO_RESTART_OFF_BLURB` constants
shared with the Runtime-tab banner). **`RestartDiffList`** renders the
full uncapped list for the Runtime-tab banner with `tooltip`/`inline`
presentation variants for correct foreground in both surfaces.

**`ManagedAgentRow` B4 fix** — badge moved to a sibling `div` of the row
expansion button; tooltip trigger has no `button` ancestor.

**`UnifiedAgentsSection`** — both badge sites render
`<RestartDiffBadge>` instead of a raw `<Badge>`, with
`autoRestartEnabled` threaded from `agent.autoRestartOnConfigChange`.

**Side-panel fix** — `RestartDiffBadge` rendered tab-independently in
the `ProfileSummaryView` hero area (was Runtime-tab only — root cause of
the ~50% inconsistency Will reported). Hero badge is `self-center` in
the flex column. `ProfileRuntimeTabContent` early-return checks
`needsRestart` so the banner is never dropped when all other content is
empty. Auto-restart blurb in the Runtime-tab banner uses the shared
constants.

## Wire shape

```jsonc
"restart_diff": [
  { "field": "model",              "change": { "kind": "value",  "before": "gpt-5", "after": "claude-4" } },
  { "field": "system_prompt",      "change": { "kind": "text",   "before_chars": 1234, "after_chars": 1410 } },
  { "field": "env.OPENAI_API_KEY", "change": { "kind": "masked", "before": "••••bc12", "after": "••••xyz9" } },
  { "field": "env.BUZZ_AGENT_THINKING_EFFORT", "change": { "kind": "value", "before": "medium", "after": "high" } }
]
```

`added`/`removed` occur only for dynamic-map keys; nullable struct
fields always serialize as `null`; arrays are atomic leaves (`args`,
never `args.0`).

## Tests

**Rust** — 1902 passing: snapshot mutation coverage, diff entry
serialization, allowlist-aware env masking
(`allowlisted_env_key_shows_plain_value`,
`allowlisted_env_key_is_case_insensitive`,
`non_allowlisted_env_key_stays_masked`),
`unstamped_agent_yields_no_badge_and_no_entries` (both orphan values),
`summary_without_drift_omits_restart_diff_from_the_wire`,
`unstamped_availability_is_not_drift`. Clippy clean, fmt clean.

**TypeScript** — `needs-restart-screenshots.spec.ts`: 11 E2E cases
registered in the smoke project — all three badge sites, tooltip +
keyboard focus, DOM no-button-ancestor assertion, 6+1 truncation,
uncapped Runtime list, unknown field humanisation, side-panel badge on
default Info tab, inactive/friendly-error Runtime opening path.

Consolidates [#3652](block/buzz#3652)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…(#3976)

## Problem

`Command+R` (webview reload) wipes the two in-memory refs driving
sidebar channel unread badges: `observedUnreadEventsByChannelRef` and
`latestByChannelRef`. The boot catch-up REQ can only fetch events newer
than each channel's NIP-RS frontier, so thread replies that arrived
before the frontier was passively advanced (the common case) are never
re-discovered.

Inbox is unaffected because it rebuilds candidates from a relay feed
query and checks fine-grained `thread:`/`msg:` markers. The sidebar
badge path lacks an equivalent recovery mechanism.

## Solution

Persist the sidebar's per-event candidate set to localStorage as a
disposable, versioned projection cache
(`buzz-observed-unread.v1:<relay>:<pubkey>`) and hydrate it on boot
before the catch-up REQ runs.

### New files

**`observedUnreadStorage.ts`** — storage module for the cache:
- Keyed
`buzz-observed-unread.v1:<normalizedRelayUrl>:<normalizedPubkey>`
(relay-scoped to prevent cross-community leakage, matching
`threadActivityStorage`)
- Stores validated per-event `ObservedUnreadEvent` rows;
`latestByChannel` is derived at hydration — no divergent dual aggregate
- Age pruning (7d = `READ_STATE_HORIZON_SECONDS`), per-channel cap
(1000), global cap (5000) across all channels in a scope bucket
- Payload `updatedAt` for LRU ordering; registered in
`PURE_CACHE_KEY_PREFIXES` for 2 MiB eviction budget
- Field-level validation on decode; write failure is non-fatal
(session-only degradation)
- Snapshot-owning timers: `scheduleObservedUnreadWrite` deep-clones the
events map at schedule time — a late A-scope timer can never read B's
mutable refs or write under B's key

**`useObservedUnreadPersistence.ts`** — hook that owns all persistence
lifecycle:
- Scope fence: `normalized pubkey + normalized relay` identity;
`isScopeLoaded()` callback guards both projection (`rawUnread`) and
every **observed-cache mutation** (`recordUnreadEvent`, `removeChannel`,
`clearAll`) before touching refs or storage. Note: stale-scope calls to
`markChannelRead`/`markAllChannelsRead` can still affect
`forcedUnreadRef` and NIP-RS markers, which are pre-existing on `main`
and deferred to the NIP-RS arc (see Deferred below).
- Synchronous `pagehide` flush closes the Cmd+R timing gap
(`useReloadShortcut.ts` reloads within 500ms of teardown, before the
1-second debounce fires)
- Identity-reset effect: flushes old scope, resets refs, hydrates from
storage, stamps loaded scope — all atomic; cleanup flushes on unmount
- `clearAll` cancels the pending timer, resets both in-memory refs, and
clears storage in a single transactional operation; `removeChannel`
deletes the channel from both refs and replaces any pending snapshot
with the current full map — never cancel-without-replacement, preserving
sibling-channel events on reload
- Marker-prune effect on `readStateVersion`: evaluates each retained
event with `observedUnreadEventReadAt()` (the same evaluator used by the
projection memo) and removes covered events, rederiving per-channel
latest — never clears a whole channel for a single thread/msg marker
- Returns a stable `useMemo`-wrapped API object keyed on actual deps so
unrelated re-renders do not restart the catch-up REQ
- `isScopeLoaded` is a `useCallback` (not a memoized boolean) — always
reads the ref at call time, never stale

### Modified files

**`useUnreadChannels.ts`** — hook integration:
- Calls `useObservedUnreadPersistence` with all persistence wired
through the returned API
- `rawUnread`: `isScopeLoaded()` guard suppresses A-scope refs from
projecting under B
- `recordUnreadEvent`: `isScopeLoaded()` fence before touching refs;
schedules a debounced write on each successful record
- `markChannelRead` clearObserved path: calls `removeChannel` so the
cleared state survives reload
- `markAllChannelsRead`: delegates to the owner's fenced `clearAll` —
the parent does not reset the observed refs directly; `clearAll` owns
the transactional clear of both refs and storage, preventing a stale
scope-A callback from corrupting scope B

**`localStorageQuota.ts`** — registers `buzz-observed-unread.v1:` in
`PURE_CACHE_KEY_PREFIXES`

## Design constraints

The cache is a **disposable projection**: versioned key, read-through
only, safe to delete wholesale. It does not touch `ReadStateManager`,
marker semantics, or `forcedUnreadStore`. Zero overlap with the NIP-RS
manual mark-read/unread protocol work in progress in another channel;
migration path when that lands is "stop reading the key."

## Test coverage

**`observedUnreadStorage.test.mjs`** covers storage primitives:
- Key normalization, relay-scoped isolation, round-trip correctness
- Age-prune and per-channel cap on read and write; global cap across
channels
- `deriveLatestByChannel` correctness
- Thread-marker prune leaves sibling thread events persisted and lit
- Scope-isolation state machine: A rows visible in A, absent in B,
restored on A again; late A-scope write does not overwrite B's bucket
- Malformed structures/fields, relay/pubkey isolation, quota failure
degradation

**`useObservedUnreadPersistence.test.mjs`** exercises the real hook via
`createRoot` + `act`:
- pagehide flush: event recorded within debounce window survives reload
(headline regression)
- Unmount with pending write flushes before teardown
- `clearAll` cancels pending debounce so no resurrection after reload
- `removeChannel` replaces pending snapshot so sibling channel B
survives reload (two-channel repro)
- Marker prune: thread and channel markers prune covered events; sibling
channels survive
- `isScopeLoaded` returns false before identity-reset effect commits,
true after
- A→B scope switch: pending A-timer is cancelled by flush, A data
persisted synchronously (hydration round-trip)
- Stale `clearAll` from scope A rejects after scope B loads
(observed-cache scope fence)
- Stale `removeChannel` from scope A rejects after scope B loads
(observed-cache scope fence)
- API object identity stable across unrelated re-renders (catch-up
stability)

**`useUnreadChannels.test.mjs`** exercises the full parent-to-owner seam
with real hook mounts:
- Stale `markChannelRead` from scope A does not corrupt B's observed
bucket after flush
- Stale `markAllChannelsRead` from scope A does not overwrite B's bucket
after flush

## Deferred

Issues deferred to the NIP-RS arc (`#unread-messages-ux`) or future
hardening — not regressions introduced by this PR:

- **Stale-scope `forcedUnreadRef` / `markContextRead` exposure**: a
stale scope-A `markChannelRead` or `markAllChannelsRead` still deletes
B's `forcedUnreadRef` entries and advances B's NIP-RS markers via
`markContextRead` before the observed-cache fence rejects. This is
pre-existing on `origin/main` (identical shape at lines 316/330). Fix
requires touching `forcedUnreadStore` and marker paths — out of scope
for Fix A. Deferred to the NIP-RS work.
- **`isScopeLoaded` empty-scope hardening**: `isScopeLoaded()` returns
`true` when `pubkey` and `relay` are empty strings (no active session).
A guard could assert non-empty identity before stamping scope-loaded.
Low risk in practice since the hook is only mounted after auth, but
could be tightened.
- **Catch-up batch scheduling**: `handleChannelMessage` and the catch-up
loop each clone the full events map per event via
`scheduleObservedUnreadWrite`. For channels with large backlogs this
produces O(n) snapshot clones per catch-up batch. A batch-schedule API
(single snapshot at end of batch) would reduce allocations. Not
observable in normal use; deferred as a performance optimization.

---------

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Completes the stop control whose frontend landed in 464ce9c: the Rust
side gains tts_controls plus the chat_tts/agent_voice/tts wiring needed
to halt in-flight speech, and AppShell mounts the button.

Both touched files sat at the 1000-line ratchet, so this also makes room
rather than growing them:
- handle_cancel_or_shutdown and lock_player_ops move from tts.rs to
  tts_voice_transition.rs, where the cancel types they take already live.
- AppShell's three prop-less agent surfaces group into
  AppShellAgentSurfaces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
Agents answer in threads, so a reply from Queen surfaced only as a
"1 reply" affordance under the message you sent — easy to miss while
sitting in the channel waiting for it.

useAutoOpenAgentThread opens the panel when a reply from someone else
lands in a thread of the channel you are viewing. It is conservative,
since yanking a panel open is disruptive: a per-channel high-water mark
keeps history quiet, an already-open thread is never displaced, and your
own replies, broadcast replies, and Huddle transcripts are skipped.

It hangs off useThreadTargetSync, which already owns thread-panel
consistency, and sources its own messages/identity so ChannelScreen —
which sits at the 1000-line ratchet — gains no lines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
## Summary

- Separate direct invites from link sharing with a labeled divider.
- Show the generated invite URL inline with truncation and a copy
control.
- Use shared loading feedback and a restrained copy-status resize.

## Validation

- `pnpm -C desktop exec playwright test
tests/e2e/invite-link-copy.spec.ts
tests/e2e/invites-settings-screenshots.spec.ts` (7 passed)

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Replace the stale `agent_command_override` drop logic in
`apply_persona_snapshot` with a three-tier canonical command resolver.

## What this fixes

The old code dropped a create-time harness pin when the persona switched
to a different runtime, but it had two failure modes:

1. **Preset harnesses invisible.** `known_acp_runtime_exact()` only
searches `KNOWN_ACP_RUNTIMES` (builtins). Preset harnesses such as
OpenClaw live in `PRESET_HARNESSES`, so the destination lookup returned
`None` and the outer `if let` branch never executed — a Goose→OpenClaw
persona switch left the stale Goose override in place, keeping the agent
running Goose instead of OpenClaw.

2. **Pin-side canonical resolution incomplete.** The pin was resolved by
`known_acp_runtime()`, which searches by id/command/alias and returns a
`&KnownAcpRuntime` entry correctly. However, if the *pin* named an alias
(e.g. `claude-code-acp`) and the *destination* was a preset harness
absent from builtins, the outer guard still failed for the same reason
as (1). The alias regression test pins the requirement that the
canonical resolver must handle both sides: alias pins must be recognised
and drops must fire when the destination is a known preset.

## How it works now

`canonical_harness_command(input)` accepts any form a stored override
can take — bare command, alias, path prefix, or runtime id — and
resolves it to the harness primary command through three tiers:

1. **Builtins** — `KNOWN_ACP_RUNTIMES`, matched by id/command/alias.
2. **Static presets** — `PRESET_HARNESSES`, matched by id or normalised
command.
3. **Loaded registry** — custom/preset definitions loaded at runtime.

`command_for_runtime_id` (id-only input, same three tiers) replaces the
two-step `known_acp_runtime_exact`/`lookup_loaded_harness_by_id` pattern
in `record_agent_command`, `effective_agent_command`, and
`try_record_agent_command`, adding the static preset tier so preset
harnesses resolve correctly even without a warm registry.

## Changed files

- `discovery/presets.rs` — `preset_command_for_id`,
`command_for_runtime_id`, `canonical_harness_command`
- `discovery.rs` — re-export new functions; make
`normalize_command_identity` `pub(crate)`; refactor three
command-resolution functions to use `command_for_runtime_id`
- `custom_harnesses.rs` — `loaded_harness_registry` visibility `fn` →
`pub(super)` (needed by `canonical_harness_command`)
- `persona_events.rs` — replace two-step
`known_acp_runtime_exact`/`known_acp_runtime` + pointer comparison with
canonical-command comparison
- `persona_events/stale_pin_tests.rs` (new) — four regression tests:
Goose→OpenClaw drop, OpenClaw→Goose drop, claude-code-acp alias→OpenClaw
drop, same-harness path keep
- `persona_events/tests.rs` — `sample_record`/`sample_persona` exposed
as `pub(super)` for the new test module

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1g8493u0xfsjrvflg4n08ezd7vec99mnwzlv0qgwpr9d7gvjwhuzqx59rhw <41ea58f1e64c243627e8acde7c89be667052ee6e17d8f021c1195be4324ebf04@buzz.block.builderlab.xyz>
## Problem

`SELECT id, community_id FROM channels WHERE id = ANY($1) AND deleted_at
IS NULL` is the top **Load by waits (AAS)** on the Buzz Postgres writer.
Two independent causes compound, and both are fixed here.

### 1. No index can serve it

`channels` is `PRIMARY KEY (community_id, id)`, and every secondary
index leads with `community_id`:

| Index | Columns |
|---|---|
| *(primary key)* | `(community_id, id)` |
| `idx_channels_nip29_group` | `(community_id, nip29_group_id)` |
| `idx_channels_dm_hash` | `(community_id, participant_hash)` |
| `idx_channels_community_type` | `(community_id, channel_type)` |
| `idx_channels_community_visibility` | `(community_id, visibility)` |
| `idx_channels_created_by` | `(community_id, created_by)` |
| `idx_channels_ttl_expiry` | `(ttl_deadline)` *(partial)* |

The two tenant-independent lookups carry **no `community_id` predicate**
— deliberately:

- `Db::communities_of_channels` — `WHERE id = ANY($1) AND deleted_at IS
NULL`
- `Db::community_of_channel` — `WHERE id = $1 AND deleted_at IS NULL`

That independence is load-bearing, not an oversight: projecting a row's
*true* owning community regardless of the fetch query's `WHERE` clause
is what makes `Inv_NonInterference` non-vacuous. If the fetch ever
dropped its tenant scoping, this lookup would still report the real
label and the checker would catch the mismatch.

But a composite btree is only usable when its leading column is
constrained, so neither query can use the primary key, and nothing else
leads with `id`. **Both sequentially scan `channels` on every call.**

### 2. In production the result is discarded

Both call sites feed `record_read_message_rows` /
`record_read_by_id_rows`, which call `tracer.record(...)`. Production
binds `NoopTracer` (`crates/buzz-relay/src/state.rs`), whose `record`
body is empty.

The existing guard tests `trace_state`, which is `Some` for every
well-formed request — it only goes `None` on malformed pubkey bytes. So
the scan ran on the hot read path and its output was dropped. This is
the classic eager-argument bug: `log.debug("..." + expensiveCall())`
with no `isDebugEnabled()` check.

### 3. Multiplied per filter

The non-search call site sits **inside the phase-3 per-filter loop**, so
a `REQ` carrying N filters performed N sequential scans of `channels`
before responding.

## Changes

**`Tracer::enabled()`** — a capability check on the trait (the
`isDebugEnabled()` of this seam), defaulting to `true`. `NoopTracer`
overrides it to `false`, and both emitters in `req.rs` now gate on it,
skipping the trace-only DB read entirely in production.

**`migrations/0027_channels_id_lookup_index.sql`**

```sql
CREATE INDEX IF NOT EXISTS idx_channels_id_live
    ON channels (id) INCLUDE (community_id)
    WHERE deleted_at IS NULL;
```

- `INCLUDE (community_id)` — both queries select exactly `(id,
community_id)`, so this is covering and can be served index-only.
- Partial on `deleted_at IS NULL` — matches both predicates exactly,
excludes soft-deleted history, and lets Postgres skip the recheck.
- **Not `UNIQUE`.** `id` alone is *not* unique in this table —
`command_executor.rs` documents that `community_of_channel(channel_id)`
is ambiguous because the same channel id can appear under more than one
community. A unique index would encode a false constraint and fail to
build on any database already holding such a pair.

Worth keeping the index even though fix #1 removes the production
caller: it still runs under conformance, and `community_of_channel` has
the same problem on its own paths.

**`schema/schema.sql`** — mirrored, since a test asserts desired-state
parity.

## Conformance is unchanged

This is the part worth reviewing closely. Under a real tracer
`enabled()` returns `true` and **every emit happens exactly as before**
— the gate only skips *building* emit inputs when nothing observes them,
never an emit that would otherwise have been made. The coverage-breach
guard stays non-vacuous.

`CountingTracer` forwards `enabled()` to its inner tracer rather than
inheriting the `true` default. Both directions matter and both fail
silently:

- inheriting `true` over a `NoopTracer` would keep the overhead this PR
removes;
- hardcoding `false` over a live tracer would suppress the emits whose
absence `EmitGuard` reports as `ImplBug` — masking real breaches behind
expected ones.

Covered by a new regression test,
`counting_tracer_delegates_enabled_to_inner`, which asserts delegation
in both directions.

## Verification

- `cargo check -p buzz-conformance -p buzz-relay` — clean
- `cargo clippy --all-targets` — clean, zero warnings
- `cargo test -p buzz-conformance` — 6/6
- `cargo test -p buzz-relay --lib conformance` — 11/11
- `cargo test -p buzz-db --lib migration` — 7/7
- `just test-unit` (pre-push) — green

Migration-count assertions in `crates/buzz-db/src/migration.rs` were
bumped 26 → 27, with content assertions for 0027 following the existing
per-migration pattern (including a guard that it never becomes
`UNIQUE`).

## Open questions for reviewers

1. **Lock strategy.** Built *without* `CONCURRENTLY`, following
migration 0004's precedent, because sqlx runs each migration inside a
transaction and `CREATE INDEX CONCURRENTLY` cannot run in one. This
takes a brief `SHARE` lock on `channels` (blocks writes, not reads) —
small relative to `events`, but an operator preferring zero
write-blocking can pre-build it by hand and `IF NOT EXISTS` makes the
migration a no-op. I could not confirm whether sqlx 0.9 supports a `--
no-transaction` directive; if it does, that may be preferable.

2. **Diagnosis is static.** This comes from reading the source, not from
`EXPLAIN` against the live database. Worth confirming with `EXPLAIN
(ANALYZE, BUFFERS)` on the writer before/after — that also sizes the win
by revealing the real table size and row counts.

3. **Expected impact** scales with average filters-per-`REQ`, which I
did not measure. `pg_stat_statements` ordered by `total_exec_time` would
confirm this query drops off the top and show whether anything else is
scanning the same way.

Signed-off-by: Jemiah Westerman <jemiah@squareup.com>
## Summary

- replace Buzz Term's full-app takeover with a resizable bottom dock
inside the channel content surface
- add a discoverable channel-header button plus hide and
maximize/restore controls
- create PTYs lazily and keep separate, persistent terminal workspaces
per channel
- capture immutable channel/thread context on every terminal session

## Multiple-channel behavior

The dock is a single surface, but its tabs are partitioned by channel.
Switching channels swaps to that channel's sessions without terminating
background PTYs; returning restores them. New tabs capture the currently
visible channel/thread context.

## Verification

At commit `7ca087f8e08c80528387684364a65bf4ccd6315f`:

- `pnpm --dir desktop typecheck`
- `pnpm --dir desktop test` — 4,129 passed
- pre-push repository hooks — desktop check/test, Tauri checks, terminal
Rust suites all passed

---------

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Co-authored-by: kenny lopez <klopez4212@gmail.com>
…737)

> Opened by Brain (agent) on behalf of @wesbillman.

## Problem

Users report the desktop app doesn't reliably reconnect and can wedge in
states where only CMD+R (or a full restart) restores connectivity
(thread `c2205e2b` in #desktop-reconnecting).

Pinky's empirical light-switch matrix (real `buzz-relay`, SIGTERM/1012 +
SIGKILL × 1s/45s/3min, at `f18a9cb10`) passed 4/4 — the backoff state
machine recovers cleanly from ordinary relay loss. That isolates the
user-stuck states to four special cases a reload resets but the auto
flow never did.

## Fixes

| Gap | Change |
|---|---|
| **G1** — recovery rode solely on the backoff timer (max 30s),
throttled by WKWebView in occluded/background windows; nothing fired on
network return or wake | New `useRelayResumeTriggers`: `online`, window
focus, and visibility→visible call `preconnect()` when the session is
`reconnecting`/`stalled`, rate-limited to one attempt per 5s
(`relayResumeTriggerPolicy.ts`). Deliberately inert for the terminal
`disconnected` state. |
| **G2** — any AUTH `OK false` latched the session terminal forever,
though the relay also rejects for transient causes (duplicate-AUTH
"already authenticated" race, ±60s clock skew, fail-closed allowlist DB
errors) | New `AuthOkTracker` (`relayAuthPolicy.ts`): "already
authenticated" resolves as success; transient rejections retry with
normal backoff; latch only on `restricted:` or after 3 consecutive
rejections. |
| **G3** — an `auth-required:` CLOSED (REQ racing AUTH after reconnect)
permanently deleted the live subscription with no UI signal — frozen
channel while state reads "connected" | Reclassified `auth-required:` as
retryable in `relayClosedPolicy.ts`. Genuinely terminal classes
(`restricted:`, `invalid:`, …) still delete. Can't loop: a truly
unauthenticated session latches terminal at the connection level. |
| **G4** — `useRelayAutoHeal` observed the 2s-debounced connection hook,
so sub-2s flaps never triggered the heal even though `resetConnection`
had already rejected every in-flight query | Auto-heal now observes the
raw connection-state emitter. The existing 15s heal rate-limit still
guards against flap storms. |

Each fix is a colocated pure-policy module + unit tests, matching the
existing `relayReconnectPolicy`/`relayClosedPolicy` pattern.

## Validation

- Full desktop unit suite: **4151 pass, 0 fail** (at branch tip, `pnpm
-C desktop test`)
- `pnpm -C desktop typecheck` and `pnpm -C desktop check` clean
(file-size ratchet respected — `relayClientSession.ts` net −2 lines
despite the tracker wiring)
- Evidence trail: `RESEARCH/DESKTOP_RECONNECT_CMDR_GAP_AUDIT.md`
(audit), `RESEARCH/DESKTOP_RECONNECT_LIGHT_SWITCH_RESULTS.md` (Pinky's
matrix)

## Not covered / follow-ups

- Native macOS sleep-wake was not automated (would kill the harness
session); G1's focus trigger is the mechanism that covers wake in
practice, but a manual sleep-wake verification on a real build is
worthwhile.
- G3 terminal-CLOSED classes (`restricted:` etc.) still silently delete
subs with no UI signal — surfacing that is a separate UX decision.
- Stall-watchdog latency (60s idle + 10s check) left unchanged; G1
triggers largely mask it.

---------

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Signed-off-by: npub1gjuws2a2dc8z2nszprtg7v6u9q7ffeah3hgl5yx45jwn7y7aqs6s5e9xj6 <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@buzz.block.builderlab.xyz>
Co-authored-by: npub1yxv5wk0u0fh6dwt925wntn7h397jvteyj4r87ttcd9xae7n2t3lqqj9jmm <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@buzz.block.builderlab.xyz>
Co-authored-by: npub1gjuws2a2dc8z2nszprtg7v6u9q7ffeah3hgl5yx45jwn7y7aqs6s5e9xj6 <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@buzz.block.builderlab.xyz>
buzz-app.sh sources .env with `set -a` so the relay and the ACP agent get
their credentials. That also exported BUZZ_PRIVATE_KEY into the desktop
app, which treats it as a dev/CI identity override taking precedence over
the OS keyring (app_state.rs `identity_from_env`).

The effect was that every launch booted as the .env identity instead of
the owner's, dropping the app on the "enter your private key" re-import
screen each restart. Launch the app with that one variable unset; the
relay and ACP agent still receive it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
…s-sidebar

Signed-off-by: mrmoe28 <ekosolarize@gmail.com>

# Conflicts:
#	desktop/src-tauri/src/managed_agents/runtime.rs
#	desktop/src/features/communities/useCommunityInit.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6aba2a9059

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docker-compose.yml
redis:
image: redis:7-alpine
container_name: buzz-redis
command: ["redis-server", "--requirepass", "aebcf7df8c0d7f9c4393c0422341cc3f"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep compose Redis credentials aligned with defaults

Adding --requirepass here breaks the documented local startup path because .env.example, relay defaults, and test scripts still use REDIS_URL=redis://localhost:6379 with no password; after docker compose up, the relay and Redis-backed tests will get NOAUTH Authentication required unless every caller hand-edits its environment. Either keep dev Redis unauthenticated or update the checked-in defaults/scripts together with this compose change.

AGENTS.md reference: AGENTS.md:L77-L83

Useful? React with 👍 / 👎.

Comment on lines +22 to +24
function storageKey(pubkey: string): string {
return `${STORAGE_KEY_PREFIX}:${pubkey}`;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope recent-thread storage by relay

This storage key only includes the pubkey, so when the same identity switches communities/relays, resetRecentThreadsStore() clears memory but useRecentThreads() immediately reloads Active Threads from the previous community's localStorage bucket. Those stale channel/root IDs are then shown in the new community and can navigate to missing or collided channels; include the normalized relay/community scope in the key and in recordRecentThread/useRecentThreads.

AGENTS.md reference: AGENTS.md:L511-L513

Useful? React with 👍 / 👎.

@mrmoe28
mrmoe28 merged commit 5a43b44 into main Aug 6, 2026
17 of 29 checks passed
@mrmoe28
mrmoe28 deleted the feature/active-threads-sidebar branch August 6, 2026 08:30
mrmoe28 pushed a commit that referenced this pull request Aug 6, 2026
…057)

This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@tanstack/react-virtual](https://tanstack.com/virtual)
([source](https://redirect.github.com/TanStack/virtual/tree/HEAD/packages/react-virtual))
| [`3.14.6` →
`3.14.8`](https://renovatebot.com/diffs/npm/@tanstack%2freact-virtual/3.14.6/3.14.8)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@tanstack%2freact-virtual/3.14.8?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tanstack%2freact-virtual/3.14.6/3.14.8?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/1) for more information.

---

### Release Notes

<details>
<summary>TanStack/virtual (@&#8203;tanstack/react-virtual)</summary>

###
[`v3.14.8`](https://redirect.github.com/TanStack/virtual/blob/HEAD/packages/react-virtual/CHANGELOG.md#3148)

[Compare
Source](https://redirect.github.com/TanStack/virtual/compare/@tanstack/react-virtual@3.14.7...@tanstack/react-virtual@3.14.8)

##### Patch Changes

- [#&#8203;1237](https://redirect.github.com/TanStack/virtual/pull/1237)
[`aa536e7`](https://redirect.github.com/TanStack/virtual/commit/aa536e7746a88d9f55ca8a4b50d2f548a888fea6)
- Fix a gap at the top of the list after an end-anchored prepend in
`directDomUpdates` mode. The prepend grows the total size and bumps
`scrollOffset` to the new bottom in the same pass, but the size
container's height was written *after* `_willUpdate` synced the scroll
position — so the browser clamped the `scrollTop` write to the stale
(shorter) `scrollHeight`, leaving whitespace at the top until the next
scroll. The container is now grown before the scroll sync. Only affected
`directDomUpdates` mode (React-rendered sizers receive their height
during render).

- Updated dependencies
\[[`7ae32b5`](https://redirect.github.com/TanStack/virtual/commit/7ae32b55887fd044a48c788546cd940279b338e0)]:
-
[@&#8203;tanstack/virtual-core](https://redirect.github.com/tanstack/virtual-core)@&#8203;3.17.6

###
[`v3.14.7`](https://redirect.github.com/TanStack/virtual/blob/HEAD/packages/react-virtual/CHANGELOG.md#3147)

[Compare
Source](https://redirect.github.com/TanStack/virtual/compare/@tanstack/react-virtual@3.14.6...@tanstack/react-virtual@3.14.7)

##### Patch Changes

- Updated dependencies
\[[`1e3b908`](https://redirect.github.com/TanStack/virtual/commit/1e3b908705e04e45be2615f2277580cb09f5cdef),
[`7dcfc07`](https://redirect.github.com/TanStack/virtual/commit/7dcfc07b877479697124157d3124c09537b87a75)]:
-
[@&#8203;tanstack/virtual-core](https://redirect.github.com/tanstack/virtual-core)@&#8203;3.17.5

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/block/buzz).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mrmoe28 pushed a commit that referenced this pull request Aug 6, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@radix-ui/react-alert-dialog](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/alert-dialog))
| [`1.1.19` →
`1.1.23`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-alert-dialog/1.1.19/1.1.23)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-alert-dialog/1.1.23?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-alert-dialog/1.1.19/1.1.23?slim=true)
|
| [@radix-ui/react-checkbox](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/checkbox))
| [`1.3.7` →
`1.3.11`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-checkbox/1.3.7/1.3.11)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-checkbox/1.3.11?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-checkbox/1.3.7/1.3.11?slim=true)
|
| [@radix-ui/react-dialog](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/dialog))
| [`1.1.19` →
`1.1.23`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-dialog/1.1.19/1.1.23)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-dialog/1.1.23?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-dialog/1.1.19/1.1.23?slim=true)
|
| [@radix-ui/react-dismissable-layer](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/dismissable-layer))
| [`1.1.15` →
`1.1.19`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-dismissable-layer/1.1.15/1.1.19)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-dismissable-layer/1.1.19?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-dismissable-layer/1.1.15/1.1.19?slim=true)
|
| [@radix-ui/react-dropdown-menu](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/dropdown-menu))
| [`2.1.20` →
`2.1.24`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-dropdown-menu/2.1.20/2.1.24)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-dropdown-menu/2.1.24?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-dropdown-menu/2.1.20/2.1.24?slim=true)
|
| [@radix-ui/react-focus-scope](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/focus-scope))
| [`1.1.12` →
`1.1.16`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-focus-scope/1.1.12/1.1.16)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-focus-scope/1.1.16?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-focus-scope/1.1.12/1.1.16?slim=true)
|
| [@radix-ui/react-popover](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/popover))
| [`1.1.19` →
`1.1.23`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-popover/1.1.19/1.1.23)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-popover/1.1.23?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-popover/1.1.19/1.1.23?slim=true)
|
| [@radix-ui/react-separator](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/separator))
| [`1.1.11` →
`1.1.15`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-separator/1.1.11/1.1.15)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-separator/1.1.15?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-separator/1.1.11/1.1.15?slim=true)
|
| [@radix-ui/react-slot](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/slot))
| [`1.3.0` →
`1.3.3`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-slot/1.3.0/1.3.3)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-slot/1.3.3?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-slot/1.3.0/1.3.3?slim=true)
|
| [@radix-ui/react-tabs](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/tabs))
| [`1.1.17` →
`1.1.21`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-tabs/1.1.17/1.1.21)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-tabs/1.1.21?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-tabs/1.1.17/1.1.21?slim=true)
|
| [@radix-ui/react-toggle](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/toggle))
| [`1.1.14` →
`1.1.18`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-toggle/1.1.14/1.1.18)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-toggle/1.1.18?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-toggle/1.1.14/1.1.18?slim=true)
|
| [@radix-ui/react-tooltip](https://radix-ui.com/primitives)
([source](https://redirect.github.com/radix-ui/primitives/tree/HEAD/packages/react/tooltip))
| [`1.2.12` →
`1.2.16`](https://renovatebot.com/diffs/npm/@radix-ui%2freact-tooltip/1.2.12/1.2.16)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@radix-ui%2freact-tooltip/1.2.16?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@radix-ui%2freact-tooltip/1.2.12/1.2.16?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/1) for more information.

---

### Release Notes

<details>
<summary>radix-ui/primitives
(@&#8203;radix-ui/react-alert-dialog)</summary>

###
[`v1.1.23`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/alert-dialog/CHANGELOG.md#1123)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-context@1.2.2`, `@radix-ui/react-dialog@1.1.23`,
`@radix-ui/react-primitive@2.1.10`

###
[`v1.1.22`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/alert-dialog/CHANGELOG.md#1122)

- Updated dependencies: `@radix-ui/react-dialog@1.1.22`,
`@radix-ui/react-primitive@2.1.9`

###
[`v1.1.21`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/alert-dialog/CHANGELOG.md#1121)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-context@1.2.1`,
`@radix-ui/react-dialog@1.1.21`, `@radix-ui/react-primitive@2.1.8`

###
[`v1.1.20`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/alert-dialog/CHANGELOG.md#1120)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-dialog@1.1.20`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-context@1.2.0`, `@radix-ui/react-primitive@2.1.7`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-checkbox)</summary>

###
[`v1.3.11`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/checkbox/CHANGELOG.md#1311)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-context@1.2.2`, `@radix-ui/react-presence@1.1.10`,
`@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-use-controllable-state@1.2.6`,
`@radix-ui/react-use-size@1.1.4`

###
[`v1.3.10`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/checkbox/CHANGELOG.md#1310)

- Updated dependencies: `@radix-ui/react-primitive@2.1.9`

###
[`v1.3.9`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/checkbox/CHANGELOG.md#139)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-context@1.2.1`,
`@radix-ui/react-presence@1.1.9`, `@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-use-controllable-state@1.2.5`,
`@radix-ui/react-use-size@1.1.3`

###
[`v1.3.8`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/checkbox/CHANGELOG.md#138)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Fixed a bug where updating a `Checkbox`, `Switch`, or `RadioGroup`
value programmatically (eg. a "select all" control) while inside a
`<form>` would dispatch a `click` event from the hidden bubble input
that propagated to ancestor `onClick` handlers.
- Updated dependencies: `@radix-ui/react-presence@1.1.8`,
`@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-context@1.2.0`, `@radix-ui/react-primitive@2.1.7`,
`@radix-ui/react-use-size@1.1.2`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-dialog)</summary>

###
[`v1.1.23`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dialog/CHANGELOG.md#1123)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-context@1.2.2`,
`@radix-ui/react-dismissable-layer@1.1.19`,
`@radix-ui/react-focus-guards@1.1.6`,
`@radix-ui/react-focus-scope@1.1.16`, `@radix-ui/react-id@1.1.4`,
`@radix-ui/react-portal@1.1.17`, `@radix-ui/react-presence@1.1.10`,
`@radix-ui/react-primitive@2.1.10`, `@radix-ui/react-slot@1.3.3`,
`@radix-ui/react-use-controllable-state@1.2.6`,
`@radix-ui/react-use-layout-effect@1.1.4`

###
[`v1.1.22`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dialog/CHANGELOG.md#1122)

- Updated dependencies: `@radix-ui/react-slot@1.3.2`,
`@radix-ui/react-primitive@2.1.9`,
`@radix-ui/react-dismissable-layer@1.1.18`,
`@radix-ui/react-focus-scope@1.1.15`, `@radix-ui/react-portal@1.1.16`

###
[`v1.1.21`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dialog/CHANGELOG.md#1121)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-context@1.2.1`,
`@radix-ui/react-dismissable-layer@1.1.17`,
`@radix-ui/react-focus-guards@1.1.5`,
`@radix-ui/react-focus-scope@1.1.14`, `@radix-ui/react-id@1.1.3`,
`@radix-ui/react-portal@1.1.15`, `@radix-ui/react-presence@1.1.9`,
`@radix-ui/react-primitive@2.1.8`, `@radix-ui/react-slot@1.3.1`,
`@radix-ui/react-use-controllable-state@1.2.5`,
`@radix-ui/react-use-layout-effect@1.1.3`

###
[`v1.1.20`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dialog/CHANGELOG.md#1120)

- Fixed broken ARIA references in Dialogs where a title or description
elements are not rendered.
- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-dismissable-layer@1.1.16`,
`@radix-ui/react-focus-scope@1.1.13`, `@radix-ui/react-portal@1.1.14`,
`@radix-ui/react-presence@1.1.8`,
`@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-context@1.2.0`, `@radix-ui/react-focus-guards@1.1.4`,
`@radix-ui/react-id@1.1.2`, `@radix-ui/react-primitive@2.1.7`,
`@radix-ui/react-slot@1.3.0`, `@radix-ui/react-use-layout-effect@1.1.2`

</details>

<details>
<summary>radix-ui/primitives
(@&#8203;radix-ui/react-dismissable-layer)</summary>

###
[`v1.1.19`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dismissable-layer/CHANGELOG.md#1119)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-use-callback-ref@1.1.4`,
`@radix-ui/react-use-effect-event@0.0.5`

###
[`v1.1.18`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dismissable-layer/CHANGELOG.md#1118)

- Updated dependencies: `@radix-ui/react-primitive@2.1.9`

###
[`v1.1.17`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dismissable-layer/CHANGELOG.md#1117)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-use-callback-ref@1.1.3`,
`@radix-ui/react-use-effect-event@0.0.4`

###
[`v1.1.16`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dismissable-layer/CHANGELOG.md#1116)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/primitive@1.1.6`,
`@radix-ui/react-compose-refs@1.1.3`, `@radix-ui/react-primitive@2.1.7`,
`@radix-ui/react-use-callback-ref@1.1.2`,
`@radix-ui/react-use-effect-event@0.0.3`

</details>

<details>
<summary>radix-ui/primitives
(@&#8203;radix-ui/react-dropdown-menu)</summary>

###
[`v2.1.24`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dropdown-menu/CHANGELOG.md#2124)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-context@1.2.2`, `@radix-ui/react-id@1.1.4`,
`@radix-ui/react-menu@2.1.24`, `@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-use-controllable-state@1.2.6`

###
[`v2.1.23`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dropdown-menu/CHANGELOG.md#2123)

- Updated dependencies: `@radix-ui/react-menu@2.1.23`,
`@radix-ui/react-primitive@2.1.9`

###
[`v2.1.22`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dropdown-menu/CHANGELOG.md#2122)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-context@1.2.1`,
`@radix-ui/react-id@1.1.3`, `@radix-ui/react-menu@2.1.22`,
`@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-use-controllable-state@1.2.5`

###
[`v2.1.21`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/dropdown-menu/CHANGELOG.md#2121)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-menu@2.1.21`,
`@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-context@1.2.0`, `@radix-ui/react-id@1.1.2`,
`@radix-ui/react-primitive@2.1.7`

</details>

<details>
<summary>radix-ui/primitives
(@&#8203;radix-ui/react-focus-scope)</summary>

###
[`v1.1.16`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/focus-scope/CHANGELOG.md#1116)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-use-callback-ref@1.1.4`

###
[`v1.1.15`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/focus-scope/CHANGELOG.md#1115)

- Updated dependencies: `@radix-ui/react-primitive@2.1.9`

###
[`v1.1.14`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/focus-scope/CHANGELOG.md#1114)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.4`,
`@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-use-callback-ref@1.1.3`

###
[`v1.1.13`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/focus-scope/CHANGELOG.md#1113)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-primitive@2.1.7`,
`@radix-ui/react-use-callback-ref@1.1.2`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-popover)</summary>

###
[`v1.1.23`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/popover/CHANGELOG.md#1123)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-context@1.2.2`,
`@radix-ui/react-dismissable-layer@1.1.19`,
`@radix-ui/react-focus-guards@1.1.6`,
`@radix-ui/react-focus-scope@1.1.16`, `@radix-ui/react-id@1.1.4`,
`@radix-ui/react-popper@1.3.7`, `@radix-ui/react-portal@1.1.17`,
`@radix-ui/react-presence@1.1.10`, `@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-slot@1.3.3`,
`@radix-ui/react-use-controllable-state@1.2.6`

###
[`v1.1.22`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/popover/CHANGELOG.md#1122)

- Updated dependencies: `@radix-ui/react-slot@1.3.2`,
`@radix-ui/react-primitive@2.1.9`,
`@radix-ui/react-dismissable-layer@1.1.18`,
`@radix-ui/react-focus-scope@1.1.15`, `@radix-ui/react-popper@1.3.6`,
`@radix-ui/react-portal@1.1.16`

###
[`v1.1.21`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/popover/CHANGELOG.md#1121)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-context@1.2.1`,
`@radix-ui/react-dismissable-layer@1.1.17`,
`@radix-ui/react-focus-guards@1.1.5`,
`@radix-ui/react-focus-scope@1.1.14`, `@radix-ui/react-id@1.1.3`,
`@radix-ui/react-popper@1.3.5`, `@radix-ui/react-portal@1.1.15`,
`@radix-ui/react-presence@1.1.9`, `@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-slot@1.3.1`,
`@radix-ui/react-use-controllable-state@1.2.5`,
`@radix-ui/react-use-layout-effect@1.1.3`

###
[`v1.1.20`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/popover/CHANGELOG.md#1120)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-popper@1.3.4`,
`@radix-ui/react-dismissable-layer@1.1.16`,
`@radix-ui/react-focus-scope@1.1.13`, `@radix-ui/react-portal@1.1.14`,
`@radix-ui/react-presence@1.1.8`,
`@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-context@1.2.0`, `@radix-ui/react-focus-guards@1.1.4`,
`@radix-ui/react-id@1.1.2`, `@radix-ui/react-primitive@2.1.7`,
`@radix-ui/react-slot@1.3.0`

</details>

<details>
<summary>radix-ui/primitives
(@&#8203;radix-ui/react-separator)</summary>

###
[`v1.1.15`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/separator/CHANGELOG.md#1115)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-primitive@2.1.10`

###
[`v1.1.14`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/separator/CHANGELOG.md#1114)

- Updated dependencies: `@radix-ui/react-primitive@2.1.9`

###
[`v1.1.13`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/separator/CHANGELOG.md#1113)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/react-primitive@2.1.8`

###
[`v1.1.12`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/separator/CHANGELOG.md#1112)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-primitive@2.1.7`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-slot)</summary>

###
[`v1.3.3`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/slot/CHANGELOG.md#132-133)

- Reverted breaking changes that caused compatibility issues with React
Server Components.

###
[`v1.3.2`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/slot/CHANGELOG.md#132-133)

- Reverted breaking changes that caused compatibility issues with React
Server Components.

###
[`v1.3.1`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/slot/CHANGELOG.md#131)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-tabs)</summary>

###
[`v1.1.21`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tabs/CHANGELOG.md#1121)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-context@1.2.2`,
`@radix-ui/react-direction@1.1.4`, `@radix-ui/react-id@1.1.4`,
`@radix-ui/react-presence@1.1.10`, `@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-roving-focus@1.1.19`,
`@radix-ui/react-use-controllable-state@1.2.6`

###
[`v1.1.20`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tabs/CHANGELOG.md#1120)

- Updated dependencies: `@radix-ui/react-primitive@2.1.9`,
`@radix-ui/react-roving-focus@1.1.18`

###
[`v1.1.19`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tabs/CHANGELOG.md#1119)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-context@1.2.1`, `@radix-ui/react-direction@1.1.3`,
`@radix-ui/react-id@1.1.3`, `@radix-ui/react-presence@1.1.9`,
`@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-roving-focus@1.1.17`,
`@radix-ui/react-use-controllable-state@1.2.5`

###
[`v1.1.18`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tabs/CHANGELOG.md#1118)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-presence@1.1.8`,
`@radix-ui/react-roving-focus@1.1.16`,
`@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-context@1.2.0`,
`@radix-ui/react-direction@1.1.2`, `@radix-ui/react-id@1.1.2`,
`@radix-ui/react-primitive@2.1.7`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-toggle)</summary>

###
[`v1.1.18`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/toggle/CHANGELOG.md#1118)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-use-controllable-state@1.2.6`

###
[`v1.1.17`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/toggle/CHANGELOG.md#1117)

- Updated dependencies: `@radix-ui/react-primitive@2.1.9`

###
[`v1.1.16`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/toggle/CHANGELOG.md#1116)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-use-controllable-state@1.2.5`

###
[`v1.1.15`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/toggle/CHANGELOG.md#1115)

- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-primitive@2.1.7`

</details>

<details>
<summary>radix-ui/primitives (@&#8203;radix-ui/react-tooltip)</summary>

###
[`v1.2.16`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tooltip/CHANGELOG.md#1216)

- Reverted breaking changes that caused compatibility issues with React
Server Components.
- Updated dependencies: `@radix-ui/react-compose-refs@1.1.5`,
`@radix-ui/react-context@1.2.2`,
`@radix-ui/react-dismissable-layer@1.1.19`, `@radix-ui/react-id@1.1.4`,
`@radix-ui/react-popper@1.3.7`, `@radix-ui/react-portal@1.1.17`,
`@radix-ui/react-presence@1.1.10`, `@radix-ui/react-primitive@2.1.10`,
`@radix-ui/react-slot@1.3.3`,
`@radix-ui/react-use-controllable-state@1.2.6`,
`@radix-ui/react-use-layout-effect@1.1.4`,
`@radix-ui/react-visually-hidden@1.2.11`

###
[`v1.2.15`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tooltip/CHANGELOG.md#1215)

- Updated dependencies: `@radix-ui/react-slot@1.3.2`,
`@radix-ui/react-primitive@2.1.9`,
`@radix-ui/react-dismissable-layer@1.1.18`,
`@radix-ui/react-popper@1.3.6`, `@radix-ui/react-portal@1.1.16`,
`@radix-ui/react-visually-hidden@1.2.10`

###
[`v1.2.14`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tooltip/CHANGELOG.md#1214)

- Republish through CI to attach provenance attestations. The previous
versions of these packages were published manually outside of CI and
therefore shipped without provenance; this patch re-releases the same
code through the CI pipeline so every package includes an attestation.
- Updated dependencies: `@radix-ui/primitive@1.1.7`,
`@radix-ui/react-compose-refs@1.1.4`, `@radix-ui/react-context@1.2.1`,
`@radix-ui/react-dismissable-layer@1.1.17`, `@radix-ui/react-id@1.1.3`,
`@radix-ui/react-popper@1.3.5`, `@radix-ui/react-portal@1.1.15`,
`@radix-ui/react-presence@1.1.9`, `@radix-ui/react-primitive@2.1.8`,
`@radix-ui/react-slot@1.3.1`,
`@radix-ui/react-use-controllable-state@1.2.5`,
`@radix-ui/react-use-layout-effect@1.1.3`,
`@radix-ui/react-visually-hidden@1.2.9`

###
[`v1.2.13`](https://redirect.github.com/radix-ui/primitives/blob/HEAD/packages/react/tooltip/CHANGELOG.md#1213)

- Fixed a bug where `Tooltip.Content` children were mounted to the DOM
twice.
- Improved tree-shaking so bundlers can drop unused components.
Component parts are now marked `/* @&#8203;__PURE__ */` and use named
render functions instead of `Component.displayName = ...` assignments,
which previously prevented dead-code elimination with some bundlers.
- Updated dependencies: `@radix-ui/react-popper@1.3.4`,
`@radix-ui/react-dismissable-layer@1.1.16`,
`@radix-ui/react-portal@1.1.14`, `@radix-ui/react-presence@1.1.8`,
`@radix-ui/react-visually-hidden@1.2.8`,
`@radix-ui/react-use-controllable-state@1.2.4`,
`@radix-ui/primitive@1.1.6`, `@radix-ui/react-compose-refs@1.1.3`,
`@radix-ui/react-context@1.2.0`, `@radix-ui/react-id@1.1.2`,
`@radix-ui/react-primitive@2.1.7`, `@radix-ui/react-slot@1.3.0`,
`@radix-ui/react-use-layout-effect@1.1.2`

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/block/buzz).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mrmoe28 pushed a commit that referenced this pull request Aug 6, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [react](https://react.dev/)
([source](https://redirect.github.com/react/react/tree/HEAD/packages/react))
| [`19.2.7` →
`19.2.8`](https://renovatebot.com/diffs/npm/react/19.2.7/19.2.8) |
![age](https://developer.mend.io/api/mc/badges/age/npm/react/19.2.8?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react/19.2.7/19.2.8?slim=true)
|
| [react-dom](https://react.dev/)
([source](https://redirect.github.com/react/react/tree/HEAD/packages/react-dom))
| [`19.2.7` →
`19.2.8`](https://renovatebot.com/diffs/npm/react-dom/19.2.7/19.2.8) |
![age](https://developer.mend.io/api/mc/badges/age/npm/react-dom/19.2.8?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-dom/19.2.7/19.2.8?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/1) for more information.

---

### Release Notes

<details>
<summary>react/react (react)</summary>

###
[`v19.2.8`](https://redirect.github.com/react/react/compare/v19.2.7...1dd4ecbdabf826f527fc9a58c05ea70375b7d170)

[Compare
Source](https://redirect.github.com/react/react/compare/v19.2.7...v19.2.8)

</details>

<details>
<summary>react/react (react-dom)</summary>

###
[`v19.2.8`](https://redirect.github.com/react/react/compare/v19.2.7...1dd4ecbdabf826f527fc9a58c05ea70375b7d170)

[Compare
Source](https://redirect.github.com/react/react/compare/v19.2.7...v19.2.8)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/block/buzz).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mrmoe28 pushed a commit that referenced this pull request Aug 6, 2026
…3058)

This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [org.jetbrains.kotlin.android](https://kotlinlang.org/)
([source](https://redirect.github.com/JetBrains/kotlin)) | `2.2.20` →
`2.2.21` |
![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin/2.2.21?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin/2.2.20/2.2.21?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/1) for more information.

---

### Release Notes

<details>
<summary>JetBrains/kotlin (org.jetbrains.kotlin.android)</summary>

###
[`v2.2.21`](https://redirect.github.com/JetBrains/kotlin/releases/tag/v2.2.21):
Kotlin 2.2.21

#### Changelog

##### Backend. Wasm

- [`KT-81372`](https://youtrack.jetbrains.com/issue/KT-81372) K/Wasm:
JsException: Exception was thrown while running JavaScript code on
Safari 18.2/18.3
- [`KT-80018`](https://youtrack.jetbrains.com/issue/KT-80018) K/Wasm:
exceptions don't work properly in JavaScriptCore (vm inside Safari,
WebKit)

##### Compiler

- [`KT-81191`](https://youtrack.jetbrains.com/issue/KT-81191) K2: "null
cannot be cast to non-null type ConeTypeParameterLookupTag" with invalid
code
- [`KT-80936`](https://youtrack.jetbrains.com/issue/KT-80936)
NON\_PUBLIC\_CALL\_FROM\_PUBLIC\_INLINE : `@PublishedApi` doesn't work
for fun interfaces

##### JavaScript

- [`KT-79926`](https://youtrack.jetbrains.com/issue/KT-79926) Wrong
export of interfaces with companions with ES Modules
- [`KT-81424`](https://youtrack.jetbrains.com/issue/KT-81424) Kotlin/JS:
Cannot Get / in a simple running application
- [`KT-80873`](https://youtrack.jetbrains.com/issue/KT-80873) KJS:
Stdlib requires ES2020-compatible JS engine due to BigInt type literal

##### Native

- [`KT-79384`](https://youtrack.jetbrains.com/issue/KT-79384) K/N:
Application Not Responding: Thread Deadlock

##### Tools. Gradle

- [`KT-79047`](https://youtrack.jetbrains.com/issue/KT-79047) Gradle
compileKotlin fails with configuration cache
- [`KT-81148`](https://youtrack.jetbrains.com/issue/KT-81148) Publishing
helpers in KGP are incompatible with Isolated Projects
- [`KT-80950`](https://youtrack.jetbrains.com/issue/KT-80950) KGP breaks
configuration cache when signing plugin with GnuPG is applied

##### Tools. Gradle. Multiplatform

- [`KT-61127`](https://youtrack.jetbrains.com/issue/KT-61127) Remove
scoped resolvable and intransitive DependenciesMetadata configurations
used in the pre-IdeMultiplatformImport IDE import
- [`KT-81249`](https://youtrack.jetbrains.com/issue/KT-81249) Kotlin
2.2.20 broke KMP implementation of Parcelize

##### Tools. Gradle. Native

- [`KT-81510`](https://youtrack.jetbrains.com/issue/KT-81510)
`commonizeCInterop` exception with 'kotlinNativeBundleConfiguration' not
found
- [`KT-81134`](https://youtrack.jetbrains.com/issue/KT-81134) Native:
Gradle configuration failure likely related to Klibs cross-compilation
- [`KT-77732`](https://youtrack.jetbrains.com/issue/KT-77732)
`commonizeCInterop` failed with "Unresolved classifier:
platform/posix/size\_t"
- [`KT-80675`](https://youtrack.jetbrains.com/issue/KT-80675) Commonized
cinterops between "test" compilations produce an import failure

##### Tools. Maven

- [`KT-81218`](https://youtrack.jetbrains.com/issue/KT-81218) Kotlin
Maven Plugin 2.2.20: Java classes not resolved with enabled incremental
compilation without daemon

##### Tools. Wasm

- [`KT-80582`](https://youtrack.jetbrains.com/issue/KT-80582) Multiple
reloads when using webpack dev server after 2.2.20-Beta2

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/block/buzz).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mrmoe28 pushed a commit that referenced this pull request Aug 6, 2026
## What

Clearing an edit to empty and hitting accept now **deletes the message**
instead of hanging. One of Sam's frequent workflows is to delete a
message by editing it, clearing the text, and pressing Enter — which
previously no-op'd (a deliberate guard blocked empty edits).

## How

Pure client-side wiring — **no relay, schema, or Rust changes.**

1. **`MessageComposer.tsx`** — the edit path had a guard that *blocked*
empty edits (`if (!trimmed && !hasMedia) return;`). That guard is simply
**removed**, so empty content flows through the normal edit path to
`onEditSave("", [], [])`. `buildOutgoingMessage("")` is a safe no-op.
2. **`handleEditSave` in `useChannelPaneHandlers.ts`** — when an edit is
submitted with empty text and no media tags, it exits edit mode and
opens the **same "Delete message?" confirmation** the Delete menu action
shows, rather than publishing an empty edit.
3. **`DeleteMessageConfirmDialog.tsx`** — the confirmation dialog,
extracted into **one shared component**. `MessageActionBar` renders it
for the Delete menu action (previously inline), and `ChannelScreen`
renders it for the empty-edit path. No duplicated dialog UI. **Delete**
runs the existing `deleteMutate`; **Cancel** leaves the message
untouched.

Because both the main timeline and the thread panel already route
edit-save through `handleEditSave`, this covers both surfaces with a
single dialog at the `ChannelScreen` level — no per-composer plumbing.

- Image-only edits (empty text but attachments present) still publish
normally — only a *fully* empty edit prompts to delete.
- An empty edit can never publish an empty body: `handleEditSave`
returns before the edit mutation.

## Review history

This PR was reworked three times in response to review — each pass made
it smaller:

1. First cut wrapped this in a new "Delete message?" `AlertDialog`
rendered from a composer hook — a verbatim duplicate of the confirmation
already in `MessageActionBar.tsx`. Removed.
2. Second cut threaded a dedicated `onDeleteEditTarget` callback down
`ChannelScreen → ChannelPane → MessageComposer / MessageThreadPanel`.
Also redundant — the delete decision moved entirely into
`handleEditSave`, which every edit-save already flows through.
3. Third cut added a special-case empty branch to the composer, which
pushed `MessageComposer.tsx` over the file-size ratchet and led to an
unrelated emoji-helper extraction to make room. Both gone: deleting the
pre-existing guard (rather than adding a branch) is net-negative, so
there's no ratchet pressure and **nothing emoji-related in this PR**.
`MessageComposer.types.ts` is back to baseline too.
4. Fourth pass (this one): an unconfirmed, no-undo delete was too sharp.
The empty-edit path now routes through the same **"Delete message?"
confirmation** as the menu action — shared as one
`DeleteMessageConfirmDialog` component (so it's reuse, not the duplicate
dialog from cut #1).

## Testing

- **E2E:** `desktop/tests/e2e/empty-edit-delete.spec.ts` (Playwright,
smoke project), three tests, all passing locally:
- *clearing an edit to empty prompts to delete, then deletes on confirm*
— edits the mock identity's own `#general` message, clears it, Enter →
the **"Delete message?"** dialog appears; Delete → the row disappears
and edit mode exits.
- *cancelling the empty-edit delete keeps the message* — same up to the
dialog, then Cancel → the message survives.
- *a non-empty edit still edits and never deletes* — guards the other
direction (no dialog).
- `pnpm typecheck`, biome, file-size + px-text guards all clean; full
desktop unit suite (3847 tests) passing locally.

> Heads-up for the reviewer: pushed with `--no-verify` because the
pre-push hook runs the Rust **integration** suite, which needs Docker
(Postgres/Redis) that isn't available in this environment — it doesn't
apply to this desktop-only change. CI runs the real gates.

---

🐝 Built by Bumble in Buzz, from a conversation in #test-swesterman.

---------

Signed-off-by: Sam Westerman <swesterman@squareup.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mrmoe28 pushed a commit that referenced this pull request Aug 6, 2026
## Problem

`SELECT id, community_id FROM channels WHERE id = ANY($1) AND deleted_at
IS NULL` is the top **Load by waits (AAS)** on the Buzz Postgres writer.
Two independent causes compound, and both are fixed here.

### 1. No index can serve it

`channels` is `PRIMARY KEY (community_id, id)`, and every secondary
index leads with `community_id`:

| Index | Columns |
|---|---|
| *(primary key)* | `(community_id, id)` |
| `idx_channels_nip29_group` | `(community_id, nip29_group_id)` |
| `idx_channels_dm_hash` | `(community_id, participant_hash)` |
| `idx_channels_community_type` | `(community_id, channel_type)` |
| `idx_channels_community_visibility` | `(community_id, visibility)` |
| `idx_channels_created_by` | `(community_id, created_by)` |
| `idx_channels_ttl_expiry` | `(ttl_deadline)` *(partial)* |

The two tenant-independent lookups carry **no `community_id` predicate**
— deliberately:

- `Db::communities_of_channels` — `WHERE id = ANY($1) AND deleted_at IS
NULL`
- `Db::community_of_channel` — `WHERE id = $1 AND deleted_at IS NULL`

That independence is load-bearing, not an oversight: projecting a row's
*true* owning community regardless of the fetch query's `WHERE` clause
is what makes `Inv_NonInterference` non-vacuous. If the fetch ever
dropped its tenant scoping, this lookup would still report the real
label and the checker would catch the mismatch.

But a composite btree is only usable when its leading column is
constrained, so neither query can use the primary key, and nothing else
leads with `id`. **Both sequentially scan `channels` on every call.**

### 2. In production the result is discarded

Both call sites feed `record_read_message_rows` /
`record_read_by_id_rows`, which call `tracer.record(...)`. Production
binds `NoopTracer` (`crates/buzz-relay/src/state.rs`), whose `record`
body is empty.

The existing guard tests `trace_state`, which is `Some` for every
well-formed request — it only goes `None` on malformed pubkey bytes. So
the scan ran on the hot read path and its output was dropped. This is
the classic eager-argument bug: `log.debug("..." + expensiveCall())`
with no `isDebugEnabled()` check.

### 3. Multiplied per filter

The non-search call site sits **inside the phase-3 per-filter loop**, so
a `REQ` carrying N filters performed N sequential scans of `channels`
before responding.

## Changes

**`Tracer::enabled()`** — a capability check on the trait (the
`isDebugEnabled()` of this seam), defaulting to `true`. `NoopTracer`
overrides it to `false`, and both emitters in `req.rs` now gate on it,
skipping the trace-only DB read entirely in production.

**`migrations/0027_channels_id_lookup_index.sql`**

```sql
CREATE INDEX IF NOT EXISTS idx_channels_id_live
    ON channels (id) INCLUDE (community_id)
    WHERE deleted_at IS NULL;
```

- `INCLUDE (community_id)` — both queries select exactly `(id,
community_id)`, so this is covering and can be served index-only.
- Partial on `deleted_at IS NULL` — matches both predicates exactly,
excludes soft-deleted history, and lets Postgres skip the recheck.
- **Not `UNIQUE`.** `id` alone is *not* unique in this table —
`command_executor.rs` documents that `community_of_channel(channel_id)`
is ambiguous because the same channel id can appear under more than one
community. A unique index would encode a false constraint and fail to
build on any database already holding such a pair.

Worth keeping the index even though fix #1 removes the production
caller: it still runs under conformance, and `community_of_channel` has
the same problem on its own paths.

**`schema/schema.sql`** — mirrored, since a test asserts desired-state
parity.

## Conformance is unchanged

This is the part worth reviewing closely. Under a real tracer
`enabled()` returns `true` and **every emit happens exactly as before**
— the gate only skips *building* emit inputs when nothing observes them,
never an emit that would otherwise have been made. The coverage-breach
guard stays non-vacuous.

`CountingTracer` forwards `enabled()` to its inner tracer rather than
inheriting the `true` default. Both directions matter and both fail
silently:

- inheriting `true` over a `NoopTracer` would keep the overhead this PR
removes;
- hardcoding `false` over a live tracer would suppress the emits whose
absence `EmitGuard` reports as `ImplBug` — masking real breaches behind
expected ones.

Covered by a new regression test,
`counting_tracer_delegates_enabled_to_inner`, which asserts delegation
in both directions.

## Verification

- `cargo check -p buzz-conformance -p buzz-relay` — clean
- `cargo clippy --all-targets` — clean, zero warnings
- `cargo test -p buzz-conformance` — 6/6
- `cargo test -p buzz-relay --lib conformance` — 11/11
- `cargo test -p buzz-db --lib migration` — 7/7
- `just test-unit` (pre-push) — green

Migration-count assertions in `crates/buzz-db/src/migration.rs` were
bumped 26 → 27, with content assertions for 0027 following the existing
per-migration pattern (including a guard that it never becomes
`UNIQUE`).

## Open questions for reviewers

1. **Lock strategy.** Built *without* `CONCURRENTLY`, following
migration 0004's precedent, because sqlx runs each migration inside a
transaction and `CREATE INDEX CONCURRENTLY` cannot run in one. This
takes a brief `SHARE` lock on `channels` (blocks writes, not reads) —
small relative to `events`, but an operator preferring zero
write-blocking can pre-build it by hand and `IF NOT EXISTS` makes the
migration a no-op. I could not confirm whether sqlx 0.9 supports a `--
no-transaction` directive; if it does, that may be preferable.

2. **Diagnosis is static.** This comes from reading the source, not from
`EXPLAIN` against the live database. Worth confirming with `EXPLAIN
(ANALYZE, BUFFERS)` on the writer before/after — that also sizes the win
by revealing the real table size and row counts.

3. **Expected impact** scales with average filters-per-`REQ`, which I
did not measure. `pg_stat_statements` ordered by `total_exec_time` would
confirm this query drops off the top and show whether anything else is
scanning the same way.

Signed-off-by: Jemiah Westerman <jemiah@squareup.com>
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.

6 participants