镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(drafts-sent): bundle Drafts & sent for everyone - #2644

Merged
atishpatel merged 2 commits into
mainfrom
atish/drafts-sent-bundled
Nov 5, 2026
Merged

atishpatel merged 2 commits into
mainfrom
atish/drafts-sent-bundled

Conversation

@atishpatel

@atishpatel atishpatel commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Why

Drafts & sent is a marketplace plugin today (squareup/agents buzz-plugins/plugins/drafts-sent). It answers two questions people keep asking the app: "what did I start and not send?" and "did anyone reply after my last message?" Shipping it bundled and enabled by default puts it in every community's sidebar without an install step.

What

  • A Drafts & sent page after Activity in the sidebar, with the number of unsent drafts in the current community as its badge.
  • Drafts lists the viewer's saved composer drafts for this community, newest change first. Selecting one opens its conversation (a thread draft opens at the thread root). It reads only this device's saved drafts and never changes them.
  • Sent lists the viewer's latest 100 messages, grouped by day, as they read now (latest edit applied, deletions dropped). Each row shows who replied after yours ("2 after you") or that you were last ("You're last"); a channel post shows its reply count. A "N with replies after yours" pill summarises conversations waiting on you.
  • Search filters both lists by conversation name and what you wrote. Refresh rereads channels, sent messages, conversation context and deletions.

How

Ports the plugin onto host-owned helpers instead of a parallel implementation: listDraftViews/subscribeView and the composer's mentionDraft/hasDraftContent for drafts, threadReference, messageAuthor/deletionApplies, identity names, plainText previews, and relativeTimestamp. UI uses the design system (PanelHeader, SearchField, InlineHeader, NavigationItem, AvatarStack, EmptyState, LoadingRegion) and semantic tokens only.

Status is only ever derived from a complete read of a conversation: a view that is loading, failed, capped at its limit, or near the host's retention caps shows no status rather than a wrong "You're last". Deletion reads run alongside their targets and are rebuilt as one read past eight small ones. Relay-signed messages in the viewer's name count as the viewer's.

Registration: src/bundled/index.ts (enabled by default), sidebar order and Tabler send icon in src/app/shell/presentation.ts, Settings catalog icon.png (a rendered placeholder in the Activity icon's style; a designer should replace it), README for the catalog, and a buzz-help entry.

Screenshots

Captured from this branch's web shell in Chromium against the plugin's simulated demo relay (fictional people and channels), with a thread reply left unsent so Drafts has an entry. The sidebar entry shows the draft count; the Sent header shows how many conversations have replies after yours.

Light

Drafts & sent page in light mode: one draft, then today's sent messages with "You're last", "1 reply" and "2 after you" pills

Dark

Drafts & sent page in dark mode with the same content

No drafts

Drafts & sent page with no drafts: the Drafts section explains that unsent messages wait here

Narrow window (640px): rows stack their conversation, text and status.

Drafts & sent page in a narrow window, rows stacked

Local build

bin/just desktop-bundle on this branch succeeded and produced target/debug/bundle/macos/Buzz.app (169 MiB). The packaged app was not launched against a live relay.

Testing

  • New tests in src/bundled/drafts-sent/ (30): sent/thread/edit/deletion rules, conversation context and activity, draft reading (scoped, legacy follow-up seeds excluded, 500 cap, unreadable records, change times without text), and page behaviour (badge, drafts/continue, day groups, live updates, Retry, identity switch and view disposal, status pills, readiness across reloads, relay-signed replies, deletion view lifecycle and Refresh, retention and read caps, post + reply as one conversation, deleted own reply).
  • src/app/pages.integration.test.mjs updated for the new bundled page (count and registration order).
  • crates/plugin-manager/src/lib.rs: the native bundled catalog lists the new manifest and buzz.drafts-sent as enabled by default, so native_catalog_matches_desktop_bundles stays in step with src/bundled/index.ts (cargo test -p buzzodz-plugins --locked passes).
  • tests/browser/layout.spec.mjs: the sidebar destination list includes the new row, accepting its draft count beside the label; both affected journeys pass locally in chromium and webkit.
  • Rebased onto main 8230222 (after the Inbox → Activity rename in feat(inbox): rename to Activity and simplify the filter bar #2543). Full vitest run passes via the pre-push hook. pnpm check (tsc + Biome) and pnpm design:check pass; pre-commit and pre-push hooks pass.

Human test steps

  1. Open a community, type something in a channel composer and in a thread reply without sending, then open Drafts & sent from the sidebar. Both appear under Drafts, newest first, and the sidebar badge shows 2. Select the thread draft: the thread opens at its root with your draft in the composer.
  2. Send a message in a channel and have someone (or an agent) reply after you. Under Sent the message shows "1 after you" with their avatar; reply yourself and it becomes "You're last".
  3. Switch communities: the page and badge show that community's drafts and sent messages only.

Not yet exercised: a packaged release build. Locally, cargo test --workspace passes every test and then SIGSEGVs at process exit on this machine, including on main; CI's Rust job is the reference.

🤖 Generated with Claude Code

@atishpatel
atishpatel marked this pull request as ready for review November 5, 2026 18:03
@atishpatel
atishpatel requested a review from a team as a code owner November 5, 2026 18:03

@joahg joahg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Read the registration, drafts reader, and badge code. It stays read-only over composer drafts and stores only a fingerprint for change times. One thing to check: anyone who already installed the marketplace drafts-sent plugin will now see two Drafts & sent pages, so decide whether that needs a migration or a retirement note.

atishpatel and others added 2 commits November 5, 2026 14:53
Ship the Drafts & sent page as a bundled plugin, enabled by default, so
every community gets it without installing the marketplace plugin.

- Lists the viewer's unsent drafts in this community, newest change
  first, with a sidebar count, and the latest 100 sent messages grouped
  by day with "N after you" / "You're last" status read from complete
  conversation reads only.
- Ports the marketplace plugin onto host helpers (view-state drafts,
  thread references, fold authorship, identity names, design-system
  components and semantic tokens).
- Registers the page after Inbox in the sidebar with a Tabler send icon,
  adds a Settings catalog icon and README, and documents it in buzz-help.
- Updates the bundled page count and order in pages.integration.test.

Co-authored-by: Worker Bee (Opus) <4a3bc7fd57a7b2c126e4f3d3462dd16f375242e1c176b4b3f25ca93e3edb6a84@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Atish Patel <atishpatel2012@gmail.com>
…urneys

The plugin manager's native catalog must mirror src/bundled/index.ts, so
add the Drafts & sent manifest and its enabled-by-default id. The layout
journeys enumerate the sidebar's page rows; add the new row and accept
its draft count beside the label once a draft exists.

Co-authored-by: Worker Bee (Opus) <4a3bc7fd57a7b2c126e4f3d3462dd16f375242e1c176b4b3f25ca93e3edb6a84@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Atish Patel <atishpatel2012@gmail.com>
@atishpatel
atishpatel force-pushed the atish/drafts-sent-bundled branch from 7cde44b to 251c085 Compare November 5, 2026 20:59
@atishpatel
atishpatel merged commit f6b0c2c into main Nov 5, 2026
50 checks passed
@atishpatel
atishpatel deleted the atish/drafts-sent-bundled branch November 5, 2026 21:14
baxen added a commit that referenced this pull request Nov 5, 2026
Bring in bundled Drafts & sent (#2644), the Builderlab sign-in (#2576)
and the changes before them. Drafts & sent is a sidebar page, so it
lists in the Messages sidebar rather than the dock; help says so.

Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Signed-off-by: Bradley Axen <baxen@squareup.com>
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…leanup

* origin/main:
  fix(dialog): limit footer click-through to the gradient gutter (#2545)
  fix(channels): put the huddle launcher after the other header tools (#2660)
  feat(drafts-sent): bundle Drafts & sent for everyone (#2644)
  feat(identity): one Builderlab sign-in, the native NIP-FI session (#2576)
  fix(agents): let people dismiss connection setup cards (#2631)

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>

# Conflicts:
#	.github/workflows/release.yml
#	crates/plugin-manager/src/lib.rs
#	docs/configuration.md
#	src/bundled/builderlab/apps/client.test.ts
#	src/bundled/builderlab/apps/environment.ts
#	src/features/identity/builderlab-hosted.test.ts
#	src/features/identity/identity.test.tsx
#	vite.config.ts
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…-service

* origin/main:
  fix(sidebar): highlight collapsed sections with unread channels (#2539)
  perf(threads): isolate thread rows inside the scroller (#2462)
  perf(messages): skip the glass on closed message action bars (#2461)
  perf(threads): measure long-thread scrolling in browsers and the macOS app (#2460)
  docs(threads): set scrolling requirements and targets for long threads (#2459)
  fix(composer): seed required recipients in saved briefs (#2667)
  fix: preserve agent activity ownership and remove Solo composer gap (#2613)
  feat(agents): open agent card links in Create agent (#2662)
  Align Bestie messaging with the shared conversation workspace (#2614)
  feat(messages): add a compact message density (#2547)
  fix(dialog): limit footer click-through to the gradient gutter (#2545)
  fix(channels): put the huddle launcher after the other header tools (#2660)
  feat(drafts-sent): bundle Drafts & sent for everyone (#2644)
  feat(identity): one Builderlab sign-in, the native NIP-FI session (#2576)
  fix(agents): let people dismiss connection setup cards (#2631)
  AIDA-2425: Preserve links beside pasted images (#2520)
  feat(activity): show reactions to your messages in Activity (#2638)

# Conflicts:
#	docs/identity.md
#	src-tauri/src/federated_identity/agent/mod.rs
#	src-tauri/src/federated_identity/mod.rs
#	src-tauri/src/federated_identity/tests.rs
#	src/bundled/codex/runtime.ts
baxen added a commit that referenced this pull request Nov 6, 2026
App navigation moves to a left dock, and the header keeps only history,
Search and window controls.

### What changes

- **Dock.** Bestie, Activity, Messages, Reminders, Agents, Workflows and
any plugin page placed in the topbar or toolbar are icon tabs in a left
column, Bestie first. Labels show at once, as a documented dock label
hover bucket, and on keyboard focus; inactive Activity keeps its hover
preview and shows the latest reaction emoji. With a plugin shell
backdrop, the dock keeps the same solid floor as header controls. The
community picker and profile sit at the bottom of the dock, and their
menus open to the right.
- **Header.** Back/forward, a centered Search capsule with its shortcut
(⌘K by default, follows rebinding), and window controls. Search fills
the space at smaller widths and drops to its own row when narrow. The
old header page tabs and "More pages" overflow are removed.
- **Sidebar only on Messages.** Pages without their own sidebar
(Activity, Agents, Bestie, Usage, Settings…) use their main view.
Sidebar-placed pages (Usage, Drafts & sent) list in the Messages
sidebar. New and ⌘N follow the creation sidebar.
- **Conversation headers.** Member avatars and the conversation name
form one button that opens the existing access dialog, named after what
that dialog offers: "Manage members of …", or "Share access to …", "Chat
access for …" or "Channel access for …" for Solo chats, visitors and
guests. Solo chats show their agents. A conversation with one tab no
longer shows a tab strip.
- **Design system.** `Tabs` gets a `dock` variant and `orientation`,
`Tooltip` gets `hint="dock"`, and `PanelHeader`'s divider changes for
every panel header.
- **Also:** macOS traffic lights move to 16,24; message history fades at
its top and bottom edges (profiled: no frame cost in WebKit or Chromium,
~18% more scroll CPU in headless Chromium); Activity row avatars change
size.

### Since the first draft

- Rebased once onto main, then merged main up to `f6b0c2c62` (Activity
rename #2543, reactions in Activity #2638, Drafts & sent #2644,
Builderlab sign-in #2576).
- Restored the Search shortcut hint. `PageNavigation` takes
`placement="dock"` and labels its tablist "Apps".
`ChannelHeaderIdentity` owns the conversation avatars, label and hint.
Header measurement uses refs. Removed dead attributes, keys and a
duplicate check.
- Browser tests from main updated for the dock: the Activity reaction
emoji is on the dock tile, Manage members is named by its conversation,
and Activity toolbar widths leave room for the dock.
- Merged main again, up to `fd6296a5c`. Then review fixes: dock labels
show on keyboard focus, and the dock label hover bucket is documented.
The header access names match their dialog. The sidebar grip's backdrop
halo is gone, since the grip now sits on the opaque joined seam. The
Search shortcut chip no longer makes the topbar 48px tall. Test fixes
for the shell backdrop, wrapped link drag and Drafts & sent placement
checks.

### Validation (on `92fb0abe6`)

- `pnpm check` and pre-push hooks pass. Full vitest: 18,294 pass, 1
fails: `ChannelMembersDialog.test.tsx` "drains a gated action … after
cancellation", which fails the same way on a clean main checkout on this
Mac and passes in isolation.
- 248 browser tests across the layout, Activity, page placement,
backdrop, channel settings, sidebar, Solo, lifecycle, permissions and
profile specs, plus the wrapped-link and zoom tests, pass in Chromium
and WebKit. Integration tests (261) passed before the last two merges
from main. The full browser suite runs in CI.
- One local failure, `layout.spec.mjs` "Alt+ArrowUp from a message link
preserves native scroll ownership", fails the same way on a clean main
checkout on this Mac.
- Native rendering, traffic lights, window dragging and real sign-in
were checked by hand in the desktop app.

---------

Signed-off-by: Arjun Mahanti <arjun@squareup.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: bmo <a7b504d9a2bfe905589e9ac237d7d8d023b8d10547060ec9618e6487b55d756c@buzz.block.builderlab.xyz>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
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.

2 participants