Skip to content

feat(scott-tasks): sync with upstream bb tasks through 48c3a78 (BBP-13) - #187

Merged
smsunarto merged 19 commits into
mainfrom
scott/sync-scott-tasks
Nov 19, 2026
Merged

smsunarto merged 19 commits into
mainfrom
scott/sync-scott-tasks

Conversation

@smsunarto

@smsunarto smsunarto commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

BBP-13: sync the scott-tasks fork with get-bb/bb plugins/tasks, up to 48c3a78.

  • Upstream sync: ports the relevant upstream commits since base 80a9837, including the list empty-state fill, host-aware CLI file paths, the shared resize observer and the list scope-switch tests.
    • The held commits are listed in plugins/scott-tasks/README.md with reasons. #6419 and #7610 are held because the fork keeps its TanStack Query/DB + Zustand data layer.
  • Parent-notify double-wake fix: a delivery attempt that timed out could still send after a retry had already delivered, waking the parent twice. Each attempt now stops at its deadline and re-checks that it still owns the delivery right before threads.send. A regression test covers it.
  • Lint baseline: removes the scott-tasks list react(refs) entry the list fix resolved, so bun run lint shows 0 new and 0 resolved.

Includes the Captain-support commits (owned fields, crew snapshot, parent wakes) that the sync sits on.


Summary by cubic

Syncs the scott-tasks fork with upstream get-bb/bb plugins/tasks through 48c3a78 (BBP-13). The fork now matches upstream behavior for task moves, child-thread delegation, and owned-field writes, while keeping its TanStack Query/DB + Zustand data layer. Also fixes a parent-wake double delivery and clears the last scott-tasks lint baseline entry.

Highlights

  • bb tasks move moves a task and its sub-tasks between projects, keeping the old key as a working alias; the detail page and list context menu get project pickers.
  • delegate spawns child threads with --parent-thread, --parent-notifications auto|stuck|off, and --base-branch.
  • Captain support: owned-field RPCs, a crew-snapshot read, and parent-notify retries with redelivery from the database.
  • Ports upstream fixes for the list empty-state fill, host-aware CLI path resolution, shared resize observer batching, and list scope-switch tests, plus New-task drafts in localStorage.

Requires bb >=0.49.0 and bbPluginSdk >=0.6.132; drops unused hono and cron-parser pins.

Written for commit 72ec0bb. Summary will update on new commits.

View guided diff Turn on auto-fix

Port of upstream get-bb/bb#4679. The app's createComment waited for the
thread lookup and send before answering, so a slow or stuck worker
held the composer. The app now returns the saved comment at once and
delivers in the background; the CLI still waits so it can report the
notified count.
Port of the server and CLI half of upstream get-bb/bb#4100. A moved
task gets a fresh number in the target project, lands at the end of its
status column, and keeps its old key as an alias, so mentions and agent
instructions that name the old key still resolve. Labels are remapped
by name and created when missing. A sub-task moved on its own leaves
its parent. New: moveTaskToProject RPC and bb tasks move.
…text menu

The UI half of upstream get-bb/bb#4100. The properties rail and inline
chips get a project picker, and a list row's context menu gets Move to
project. Opening a task by a key it had before a move asks the server
and follows the task to its current key.
The dialog half of upstream get-bb/bb#4100. Title, description and
attributes save to localStorage as they change, so an outside click,
Escape or reload no longer throws a long task away; Discard draft
clears it. The dialog is capped at 85dvh with the description
scrolling, so Create task stays reachable.
- get-bb/bb#5097: label and preset row actions stay visible on screens
  without hover, such as a 13-inch iPad.
- get-bb/bb#5157: a narrow desktop pane keeps the compact topbar; only
  touch screens get the taller one.
- get-bb/bb#5903: the whole task embed card opens the task, and a
  loading card no longer highlights on hover.
- get-bb/bb#5508: attachment downloads go through bb's saveFile, which
  the iOS shell implements with WebKit's native download.
…parser

hono 4.11.9 was a vulnerable pin that nothing imports; cron-parser is unused too.
bb tasks delegate takes --parent-thread, --parent-notifications auto|stuck|off and --base-branch, passed to threads.spawn. An orchestrating agent dispatches its crew as children so bb reports their turns to it, and starts each worktree from its own branch. --base-branch always means a new worktree, whatever the preset names, and leaves the preset unchanged.
Attachment chips set state in an effect to hold the preview URL; the <img> ref callback now creates and revokes it. Clears a react(set-state-in-effect) lint error.
…aptain

- defineField/setField: typed fields only the owning plugin may write; a write
  bumps the task's updated_at.
- crewSnapshot({threadIds, changedSince}): one read of task, parent, fields,
  preset, live status and the last notifying comment with its delivery state.
- bb tasks comment --notify-parent sends a one-line wake to the commenting
  thread's parent and retries from the database (1, 2, 5, 15 min; 6 attempts),
  then marks it undeliverable; --attach puts files on the comment first.
- delegate takes reportContract and drops its built-in contract under stuck;
  taskThreadsAttach keeps presetName; plugin callers may author comments.
- Task threads get an archived live status that unarchive reverses.
Cuts 10 KB of app.css that Tailwind generated for components nothing imports.
Port of get-bb/bb#7613's Tasks part: the list's size container moves inside the scroller, and the empty state grows to fill it.
…rules

Port of get-bb/bb#6760: file flags resolve with the SDK's host-path parser, so Windows drive and UNC paths from a remote thread resolve on that machine instead of with the server's node:path.
Port of the Tasks part of get-bb/bb#4606: create inputs no longer take an id, comment updates take only notifiedCount, attachment updates only blobPath, and new comments rely on the column's 0 default. The tie-break test sets its ids with SQL, as upstream's does. Skipped: upstream blanking the is_image migration (it already ran here), and displayWidth and the description saver's schedule option, which fork tests still use.
Ports get-bb/bb#7056's regression tests. Upstream fixed a list stuck behind placeholders when it switched scope to a cached list; the fork's collection-backed list already passes them, so no code change was needed. All shows every task the shared collection holds, so the All step checks no absent row.
Port of get-bb/bb#7635's Tasks part. The board-width check and the list's row window read their size in a shared ResizeObserver and write it inside flushSync, so a resize never paints one frame of the old layout. lib/shared-resize-observer.ts is vendored from upstream's registry, which the desktop-v0.49.0 pin predates. The row window measures through a plain function of the element so the mount read stays a ref-derived layout measurement.
Names the new upstream base and every change the fork holds, with the reason for each.
…rom a ref

ListView read settledScope.current during render, the one oxlint error left in scott-tasks (react(refs)), so bunx oxlint on the plugin failed. The settled scope is now state set during render, like the saved preference above it, and settles in the same render its rows finish loading.
…etry

Promise.race ended the 30s wait but not the attempt, so a stalled thread lookup could resume after a retry had delivered and wake the parent twice. The deadline now aborts the attempt's signal, and the attempt re-checks right before threads.send (and before recording a target) that it is unexpired and still the latest claim on a pending record. Review's deterministic repro is the regression test; it fails on the old code.
@smsunarto
smsunarto merged commit 89d2045 into main Nov 19, 2026
5 checks passed
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