Skip to content

Add a generator for bb's built-in host icon names - #53

Merged
erwinkn merged 1 commit into
mainfrom
bb/host-icon-names-script-thr_nca2xisxm9
Sep 13, 2026
Merged

erwinkn merged 1 commit into
mainfrom
bb/host-icon-names-script-thr_nca2xisxm9

Conversation

@erwinkn

@erwinkn erwinkn commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

bb's experimental_Icon renders icons by name, but the plugin SDK exports no list of valid names (get-bb/bb#1859). scripts/host-icon-names.mjs reads the core icon map and the extended registry from a bb source checkout at a release tag and writes a typed lib/host-icon-names.ts into a plugin, so each plugin's icon wrapper is typed against real names and a typo fails at compile time instead of silently rendering the fallback.

Part of WP0 of the approved plan "Adopt bb 0.43.x capabilities across the plugins". Each PM runs it for its plugin; this PR adds only the script.

Usage

node scripts/host-icon-names.mjs --tag desktop-v0.43.1 --plugin sidebar
node scripts/host-icon-names.mjs --bb /path/to/bb-src --out plugins/plans/lib/host-icon-names.ts
node scripts/host-icon-names.mjs --tag desktop-v0.43.1 --plugin sidebar --check   # CI-style drift check

Verification

  • Against a desktop-v0.43.1 checkout: 50 core plus 103 extended names, 153 total, sorted, deduplicated.
  • --tag mode (shallow clone) produces the same list as --bb mode.
  • --check exits 0 on an up-to-date target and 1 on a stale one.

🤖 Generated with Claude Code

bb's experimental_Icon renders icons by name, but the SDK exports no list
of valid names (get-bb/bb#1859). scripts/host-icon-names.mjs reads the
core map and extended registry from a bb source checkout at a release
tag and writes a typed host-icon-names.ts module into a plugin, so icon
wrappers are typed against real names and a typo fails at compile time.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@erwinkn
erwinkn marked this pull request as ready for review September 13, 2026 12:51
@erwinkn
erwinkn merged commit e3851fa into main Sep 13, 2026
2 checks passed
erwinkn pushed a commit that referenced this pull request Sep 13, 2026
erwinkn pushed a commit that referenced this pull request Sep 13, 2026
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
erwinkn pushed a commit that referenced this pull request Sep 13, 2026
#53 landed scripts/host-icon-names.mjs at the repo root; regenerate the
plugin's list so --check passes. Same commit, same names — only the
provenance label follows the checkout's tag.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
erwinkn added a commit that referenced this pull request Sep 13, 2026
…2) (#62)

* Questions: bump @get-bb/plugin-sdk to 0.4.87

Synced with bb plugin types against bb 0.43.1. Typecheck and the 106
existing tests pass unchanged.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Questions: render icons through the host registry

Replace the copied HugeIcons core map and lazy extended registry with a
thin wrapper over experimental_Icon. Names are typed against
lib/host-icon-names.ts, generated from bb desktop-v0.43.1 by
scripts/host-icon-names.mjs, so an unknown name fails typecheck; every
use still passes a fallback. Drops both @hugeicons dependencies.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Questions: keep the summary in thread plugin metadata

The Summary tab text now lives in the thread's plugin metadata under
questions.summary as { markdown, updatedAt, version: 1 }, validated on
every read to the 8,000-character bound; malformed or foreign values
count as no summary. Reads try metadata first and fall back to the
pre-metadata summaries table; a write moves the thread over and drops
its legacy row; `bb questions summary backfill [--dry-run]` migrates
the rest once. Rounds, answers, versions, attachments, and submission
receipts stay in the database.

A bb.agents.configure provider keeps the four tools selected and, when
the metadata snapshot holds a summary, adds it to the agent's
instructions framed as the agent's own earlier note, escaped as data,
and clipped to bb's 4,096-character instruction limit. Forks and
handoffs carry no metadata, so they get nothing.

engines.bb moves to >=0.43.1, the first release with the metadata API.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Questions: mark a submission cancelled when its queued message is removed

Submissions record BB's queued-message row id when delivery is queued.
On message.cancelled the matching queued submission becomes cancelled
with its frozen snapshot kept, and its answers stop counting as
submitted unless a newer submission already re-sent them. The panel
shows the cancelled attempt with a Resubmit action that restores the
frozen answers as drafts and submits the round again; nothing is ever
re-sent automatically. Frozen attachments stay attachable afterwards.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Questions: reopen only the held prompt when a thread is unarchived

An open_holds table records which round's native prompt is open. The
marker is written when a wait or hold starts, kept through thread
stops, archive interruptions, aborts, and plugin reloads, and cleared
only when the round is delivered or the user dismisses the prompt.
Archiving an active thread interrupts the pending interaction; on
thread.unarchived the marked round's prompt is held open again — never
a fresh prompt for every historical round that still lacks answers. A
hold that is still alive, a submitted round, and a dismissed prompt all
reopen nothing.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* README: record send/drain 500 and codex resume instruction drop

Found while live-verifying questions on 0.43.1: a queue-if-active send
that loses the race with a queue-drain turn start 500s, and codex
thread/resume accepts but never applies updated developerInstructions.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Questions: drop summary instruction injection, keep tool retrieval

The summary rides thread_plugin_metadata for durable storage, but
injecting its payload into every turn costs context and only reaches
Codex at thread start. The agent can read, set, or clear it on demand
through questions_summary, which now returns the current summary when
called without arguments.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Questions: regenerate icon names with the canonical script

#53 landed scripts/host-icon-names.mjs at the repo root; regenerate the
plugin's list so --check passes. Same commit, same names — only the
provenance label follows the checkout's tag.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: exedev <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
erwinkn added a commit that referenced this pull request Sep 13, 2026
…t icons (#61)

* Plans: bump @get-bb/plugin-sdk to 0.4.87

Pinned with bb plugin types on bb 0.43.1. Typecheck and tests pass unchanged.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Plans: render icons from the host registry with typed names

Replace the copied HugeIcons sets with experimental_Icon. lib/host-icon-names.ts
is generated from bb desktop-v0.43.1 by scripts/host-icon-names.mjs, so every
icon name is checked at compile time and each call still passes a fallback.
Keyboard and strikethrough glyphs, which bb does not ship, are registered by the
plugin as plans-keyboard and plans-strikethrough. The Comments view icon uses the
host MessageSquare. The frontend bundle shrinks from 230 KB to 114 KB.

engines.bb is raised to >=0.43.1 for the metadata pointer in the next commit.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Plans: thread metadata pointer, cancelled queued messages, unarchive handling

- Submit, update, and approval write { activePlanId, status, version } to the
  thread's plugin metadata (plans namespace); deleting a plan moves the pointer
  to the newest remaining plan or removes the keys. The database stays
  authoritative: bb plans get without an ID resolves the pointer and only
  returns the plan when it belongs to the calling thread. Writes are
  best-effort and serialized per thread.
- message.cancelled: when the user deletes the plugin's queued row, its batch
  becomes a new outbox state 'cancelled', delivery metadata is cleared, nothing
  is resent, and the review prompt is restored. Cards show
  'Not delivered · cancelled'; a cancelled approval is shown in the footer.
  A row cancelled while an append is in flight is no longer treated as
  delivered.
- thread.unarchived: clears the unavailable notice and restores the review
  hold for an open plan. Feedback dropped at archive time stays dropped.
- Docs: README, PLUGIN_OVERVIEW, and the plan-review skill.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Plans: settle cancellations that race an in-flight send

A message.cancelled for the row send() just created could arrive before
deliver() persisted delivery.queuedMessageId; the subscriber's pointer match
dropped the event and recovery later reconciled the batch as delivered even
though its message was deleted. Sessions now record cancellations that arrive
while a send is in flight and settle them when the queued result returns; the
subscriber routes every matching-thread cancellation to the session instead of
pre-filtering on the persisted pointer. The review prompt is only restored when
a cancellation actually applied. Point the icon-name regeneration note at the
generator's landing PR until it merges. Addresses Macroscope findings on #61.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Plans: point icon regeneration at the merged generator (#53)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Plans: await pointer writes, drop settled chains, latest-row badges

- create, update, approve and remove now await the metadata sync so a
  `bb plans get` issued right after the mutation resolves the fresh pointer
  instead of reading a stale or absent one.
- annotationDeliveryStatus reports only the newest outbox row per annotation,
  so a cancelled batch superseded by an edited and redelivered annotation no
  longer keeps the Not-delivered badge.
- The per-thread write chain map drops entries once drained, so a long-lived
  plugin does not accumulate a settled promise per thread.

Addresses Macroscope findings on the merged head of #61.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: exedev <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.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.

1 participant