Skip to content

Give plugin lists pin timestamps, hrefs, a row-status map, and the whole split layout - #4029

Merged
SawyerHood merged 2 commits into
thread-list/1g-use-sdkfrom
thread-list/1h-parity-fields
Sep 22, 2026
Merged

SawyerHood merged 2 commits into
thread-list/1g-use-sdkfrom
thread-list/1h-parity-fields

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Four more things bb's own list reads that a plugin could not: the pin timestamp that breaks ties in pinned order, the archive timestamp, an app-relative URL per thread and per project so rows can be real anchors (the host already routes plugin-root anchor clicks in place), and two whole-list reads for collapsed-group rollups, every row status by thread id and the whole split layout with the thread each pane shows.

What changed

  • PluginSidebarThread gains pinnedAt, archivedAt, href; PluginSidebarProject gains href and settingsHref.
  • useSidebarThreadRowStatuses() over a new cached snapshot in plugin-thread-row-status.ts, invalidated on every notify and identity-stable while unchanged.
  • useSidebarSplitLayout() over splitLayoutAtom, null on compact viewports and single-pane layouts, via a pure toPluginSidebarSplitLayout.
  • Harness fakes (sidebarSplitLayout option), guide, API index, and surfaces updated.

Prerequisite: #4027.

How you verified

Mapper test for the timestamps and href; hook tests for project hrefs (personal project resolves to /), row-status snapshot identity, and a pure split-layout test. Same typecheck/test filters as the lower PRs plus build:types.

🤖 Generated with Claude Code

AGENT GENERATED

SawyerHood and others added 2 commits September 21, 2026 17:08
…ole split layout

The remaining pieces bb's own list reads that a plugin could not: pinnedAt
as the pinned-order tie-breaker, archivedAt, an app-relative href per
thread and per project so rows can be real anchors the host routes, every
row status by thread id for collapsed-group rollups, and the whole split
layout with the thread each pane shows.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@SawyerHood
SawyerHood force-pushed the thread-list/1h-parity-fields branch from 670fd65 to d17ad02 Compare September 22, 2026 00:08
@SawyerHood
SawyerHood marked this pull request as ready for review September 22, 2026 00:15
@SawyerHood
SawyerHood merged commit a9963f0 into main Sep 22, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the thread-list/1h-parity-fields branch September 22, 2026 00:18
SawyerHood added a commit that referenced this pull request Sep 22, 2026
## Human comments

## What was wrong

The sidebar's layout state (organization mode, sort, section orders,
hidden groups, six collapsed-id lists) lives in a closed enum of
`sidebar.*` UI preferences that only the host can read or write. A
thread list that is a plugin needs to own that state. This layer stands
the plugin up with its state before any rendering moves.

## What changed

- New bundled plugin `plugins/thread-list` (`bb.branding.icon:
ListView`, registered in the builtin registry, bundled-plugins package,
official catalog, and the marketplace snapshot). Its
`experimental_threadList` registration renders `Original` for now, so
enabling it changes nothing visible.
- `server.ts`: preference store on `bb.storage.kv` validated by the
plugin's own zod schemas (`shared/preferences.ts`),
`listPreferences`/`setPreference`/`resetPreference` RPC, `preferences`
realtime channel, `bb thread-list prefs list|get|set|reset`, and a
one-time migration copying non-default `sidebar.*` values from
`bb.sdk.system.uiPreferences`.
- Frontend `app/preferences/`: jotai atoms with the same
`createSyncedPreferenceAtom(key)` shape the host uses (so later slices
port by changing an import), hydrated from a localStorage mirror then
RPC, patched by realtime unless a local write is pending, written back
debounced and coalesced.
- Skill `plugins/thread-list/skills/thread-list/SKILL.md` and the
bb-guide customization template mention the command.

Prerequisite: #4029.

## How you verified

Server tests: defaults, valid write with realtime fan-out, schema
rejection leaves storage alone, hidden-group dedupe and reset, invalid
stored value falls back, migration copies once and never overwrites,
migration skipped without marking done when bb is unreachable, CLI
list/get/set/reset with bad key and bad value. Frontend tests: hydrate
and mirror, mirror-first paint with junk ignored, coalesced debounced
writes, remote signal precedence, no write for an unchanged value.
Bundled-plugin, catalog generator, and guide parity suites pass;
`prepare:bundled` builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
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