Skip to content

Polish mention suggestions, recipients and remembered-agent drafts - #137

Merged
wesbillman merged 5 commits into
mainfrom
brain/composer-suggestion-flash
Sep 22, 2026
Merged

wesbillman merged 5 commits into
mainfrom
brain/composer-suggestion-flash

Conversation

@wesbillman

@wesbillman wesbillman commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Opened by Brain on Wes's behalf.

Summary

  • Keep completion popups hidden until the provider publishes suggestions or explicit status/retry. Preserve pending Escape, provider-owned loading, keyboard handling, and stale-result revocation.
  • Replace the bulky Notify row with deduplicated recipient avatars beside @, with accessible names and × on hover/keyboard focus. Recipient removal remains host-owned when the optional picker is disabled.
  • After an accepted send, prefill exact selected agent-name mentions into the next channel/thread draft. People and typed prose are not remembered. Add default-on Settings → Messages → Remember mentioned agents, saved on this device; opt-out affects future prefills without editing the current draft.
  • Correct two independent caret resets: a pending command after an unchanged prefilled send, and a stale saved selection overwriting the live caret when focus returns during native insertion. Reuse existing selection ownership; no timers, new caches, or relay reads.
  • Merge current main (319635e) and preserve Restyle the existing composer without replacing its editor #119's composer spacing, keyboard-only outline and tinted Send button.

Scope and ownership

Composer/UI/preferences only. No plugin API expansion, relay authorization change, agent-runtime repair, extra recipient store, or network policy change. Exact recipient identity stays in ordinary scoped drafts and still passes through existing membership/outbox checks. Failed outbox acceptance preserves the original draft. The optional agent classification uses cached profile/library hints, not authorization evidence.

Validation at bda05e1163a39369fac74f5ff7f8671341a944da

  • Mandatory pre-commit formatting/lint and icon guard passed; both outgoing commits include DCO sign-off.
  • Mandatory pre-push TypeScript, 151 related tests across 16 files, design types and design-system guards passed.
  • All 24 Chromium/WebKit cases in these six full files passed:
    pnpm test:browser tests/browser/completion-work.spec.mjs tests/browser/completion-layout.spec.mjs tests/browser/mention-edit.spec.mjs tests/browser/composer-links.spec.mjs tests/browser/mentions.spec.mjs tests/browser/settings.spec.mjs --no-deps
  • Unit coverage includes exact agent-only prefill, namesakes/deduplication, channel/thread isolation, rejected sends, removal, opt-out/re-enable, bounds, preference persistence/storage errors/retry/cross-window updates, and pending completion lifecycle.
  • Real-shell Settings route and keyboard order exercised; recipient hover/removal and plugin-disable behavior exercised.
  • Human native-app retry reported the typing correction worked before the styling-only main merge. This is attended dev-app evidence, not packaged-release certification.

Browser-only additions and regression evidence

Three browser cases added, none removed:

  1. Transient popup/layout and counted read regression (native contenteditable typing + MutationObserver/geometry calls). Controlled baseline had phantom popup/layout work; patched fixture shows 0 phantom popup insertions, 0 popup-anchor geometry reads, 0 extra relay reads during 28 characters of post-mention prose. This is not a global CPU or network benchmark; provider filtering still runs.
  2. Repeated identical agent-prefill sends, then direct keyboard typing and exact signed recipient/content assertions. Controlled case produced icen before the send-caret correction and nice after it in both engines.
  3. Blur → insertion → focus → input ordering, modeled from a failing native trace. The controlled browser replay produced icen before the focus correction and nice afterward in both engines. It deliberately models the native ordering; it is not an automated reproduction of the native window itself.

Existing empty-after-send and one-message recipient journeys explicitly opt out of remembering agents, preserving those assertions; prefill-on is covered separately. Settings navigation coverage extends an existing journey. No retries, timeouts, or assertion budgets were relaxed.

CI corrections and validation at 84c3b28a1b50e0cb45c6edb597a742f301b18f6c

  • Restore remembered selection on ordinary Chromium refocus; preserve the live caret only during the existing pending native edit. The channel/ThreadPanel journey now asserts the restored caret explicitly, and the native-first-edit regression remains covered.
  • Scope Messages navigation to the Pages region and assert accessible recipient controls rather than obsolete visible prose. The batched-command journey asserts both exact persisted mention spans and one deduplicated exact-key avatar; these are distinct contracts.
  • Repair a retry-fixture race by waiting for the exact current query before selecting its publication index and asserting publication acceptance. No retry, sleep, or timeout increase.
  • Independent read-only review by Pinky found no remaining blockers in the correction diff at this exact head; this is not maintainer approval.
  • 86/86 browser cases passed, retries disabled, in both Chromium and WebKit across ten complete affected/adjacent files (1.8 minutes):
    bin/pnpm test:browser tests/browser/agent-activity.spec.mjs tests/browser/messages.spec.mjs tests/browser/typeahead.spec.mjs tests/browser/conversation.spec.mjs tests/browser/mention-edit.spec.mjs tests/browser/completion-work.spec.mjs tests/browser/completion-layout.spec.mjs tests/browser/composer-links.spec.mjs tests/browser/mentions.spec.mjs tests/browser/settings.spec.mjs --no-deps
  • The typeahead file also passed three repetitions per engine at ce24c17 (126 cases); the only later source delta is the persisted-span assertion in the conversation test.
  • Mandatory push hooks passed at 84c3b28: TypeScript, 151 related unit tests / 16 files, design types and all design guards. Both new commits have DCO sign-offs, remote head matches, and hosted DCO Check passed.
  • Hosted CI run 35757544460 passed at 84c3b28. Logs confirm all four functional browser shards (486 cases total), browser measurements (7 cases), the full Vitest suite (2,030 tests / 195 files), Rust tests/doctests and Node integrations ran successfully. The original failing integration journeys passed in both browser engines. CI required, DCO Check, Semgrep OSS, and zizmor are green. Windows validation was not selected by this automatic Linux workflow.
  • After this run, main advanced to eced798 (Add global search palette and dev reload shortcut #125). A non-mutating git merge-tree --write-tree HEAD origin/main check identifies one conflict in src/features/messages/MessageComposer.test.tsx: independent appended tests on both branches. No source or branch integration was performed as part of this CI repair; this overlap still needs resolution before merge.

Remaining gates / limits

Hosted CI is green at the corrected head 84c3b28. Required maintainer/code-owner approval and the newly introduced main-branch test conflict remain outstanding. Independent read-only source review by Pinky at 84c3b28 found no remaining blockers in the CI-correction diff. One non-blocking visual inconsistency remains: recipient avatars use the profile agent flag for their shape, so a library-known agent without that flag appears circular here but squircle-shaped in the picker. Recipient classification and notification identity are unaffected; this cosmetic follow-up is deferred. No full local scan/native build or live-agent sends; existing CI owns broader validation. Local agent-runtime resource banner is unrelated and deliberately unchanged.

Origin: Buzz channel 35743957-7089-47f2-8007-eed47e5e83b1, thread bd635caa92843ced25ecbb577ff8e1b3500ffd6b4f6e2a55a787ceb33a950064.

Brain added 2 commits September 22, 2026 10:30
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
@wesbillman
wesbillman requested review from a team and comp615 as code owners September 22, 2026 16:33
@wesbillman

Copy link
Copy Markdown
Collaborator Author
Screen.Recording.2026-09-22.at.10.25.27.AM.mov

Brain added 3 commits September 22, 2026 10:51
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
@wesbillman
wesbillman merged commit 298a50a into main Sep 22, 2026
12 checks passed
@wesbillman
wesbillman deleted the brain/composer-suggestion-flash branch September 22, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant