Repository navigation
Fix mobile background agent banner - #1734
Conversation
|
🚨 SLOP COP 🚨 · I am SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and mobile behavior. |
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain-English summary: This patch gives compact mobile banners a count. Users can expand the banner to see each background agent, model, and duration.
I reviewed head 15b14600 first. The pull request moved to 5528f403 during this review, so I checked the updated head too.
The rebase fixed the merge conflicts. One blocking model defect and one related contract defect remain.
- A restarted Claude background agent can lose its requested model. Live QA used
haiku, but the restarted active row returnedmodel: null. - Completed background-agent rows also keep
model: null. Model enrichment occurs only inside the active, pending-task selector.
The projection should correlate the model once and preserve it across task generations. This also removes the current mutation from the active selector.
I found no security defect. I found no meaningful CPU or allocation regression.
I tested a 390×844 viewport through the real app. The app, project, thread, Agent task, and live timeline API worked.
All 370 thread-view tests passed. The focused app tests passed five tests. Contract, generated declaration, and relevant TypeScript checks passed.
The current CI run passes all completed checks. The macOS package smoke check remains active.
5528f40 to
9fd6b0a
Compare
Summary
Agentcall into background-agent timeline rows, including completed and restarted task generationsRunning N background agentsand make even a single agent expandable to reveal its full description and modelRoot cause
The single-agent banner always used a non-expandable one-line
truncatelayout, so the label and task description collapsed to an ellipsis at mobile widths. Background-task events also do not include the requested model; although Claude Code includes it on the parentAgenttool call, the timeline projection discarded that metadata before building the banner row. Restarted Claude task generations may omit that parent link, and the original enrichment ran only inside the pending-task selector, so restarted and terminal rows could still lose the resolved model.Validation
pnpm exec turbo run test --filter=@bb/thread-view --force(373 tests)pnpm exec turbo run test --filter=@bb/server-contract --force(45 tests)pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/promptbox/banner/ThreadBackgroundCommandsCard.test.tsxpnpm exec turbo run typecheck --filter=@bb/server-contract --filter=@bb/thread-view --filter=@bb/app --filter=@get-bb/plugin-sdk --filter=@bb/templatesnode packages/plugin-sdk/scripts/check-npm-version-guard.mjsdev-browserat 412x915 and 1440x900Closes #1653