Skip to content

Keep the new-thread project trigger stable while submitting - #1820

Merged
ymichael merged 2 commits into
mainfrom
bb/fix-new-thread-prompt-shift-thr_i47vzqrztr
Aug 18, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/fix-new-thread-prompt-shift-thr_i47vzqrztr

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Problem

Submitting a new thread makes the option strip under the prompt box jump left, then snap back when the request settles.

NewThreadComposer disables the project picker for the length of a submission (and while attachments upload). ProjectSelector rendered its ChevronDown only when enabled, so the trigger lost the 14px icon plus its 4px flex gap. The selector is the first item in the left flex row of the strip, so the environment/branch pickers beside it shift ~18px for the whole create request.

Fix

  • ProjectSelector gains showChevronWhenDisabled, matching the existing OptionPicker prop.
  • The composer passes showChevronWhenDisabled: !locks.project, so transient busy states keep the trigger geometry. A real lock still renders as a plain label, so the side-chat / plugin read-only look is unchanged.
  • New ProjectSelector.test.tsx covers both cases.

Typecheck, lint, and tests pass for @bb/app.

AGENT GENERATED: by Claude Opus 5

ymichael and others added 2 commits August 18, 2026 14:24
The composer disables the project picker for the length of a submission
(and while attachments upload). ProjectSelector dropped its chevron
whenever it was disabled, so the trigger narrowed by the icon plus its
gap and every control to its right in the strip jumped left, then back
when the request settled.

Add showChevronWhenDisabled, matching OptionPicker, and set it for the
transient busy states. A real lock (locks.project) still renders as a
plain label.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 SLOP COP 🚨 · review

I am SlopCop. I am reviewing this pull request under the review rule.

I will check security, code quality, performance, architecture, and the new-thread user flow.

@ymichael
ymichael merged commit 73d9ebf into main Aug 18, 2026
10 checks passed
@ymichael
ymichael deleted the bb/fix-new-thread-prompt-shift-thr_i47vzqrztr branch August 18, 2026 21:32

@bb-slop-cop bb-slop-cop Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 SLOP COP 🚨 · review

Plain-English summary

This change keeps the project arrow visible while a new thread starts. The project control remains disabled, and the control row no longer moves.

Review findings

I found no blocking issues in commit 00b407e.

  • Security: The change does not alter permissions, input handling, or data access.
  • Code quality: The new option clearly separates a temporary lock from a permanent project lock.
  • Performance: The change adds one Boolean check. It adds no state, effects, timers, callbacks, or extra renders.
  • Architecture: OptionPicker already uses the same rule. ProjectSelector has special actions, so a shared component refactor does not help here.
  • Test coverage: The selector tests cover both disabled-arrow states. The browser test covers the complete submission path.

Validation

  • The full @bb/app suite passed with 364 files and 2,883 tests.
  • The @bb/app type check passed through Turbo.
  • The browser held POST /api/v1/threads open during submission.
  • The trigger width stayed at 114.84 pixels.
  • The trigger height stayed at 32 pixels.
  • The trigger became disabled and kept one chevron.
  • The final GPT-5.6 review gate found no issues.

Scope note

The pull request moved to 37514d6 during this run. This review covers the rule's specified commit, 00b407e.

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