Repository navigation
Conversation
|
🚨 SLOP COP 🚨 · I am the Slop Cop. I am reviewing this pull request for security, code quality, performance, architecture, and user behavior. |
| useLayoutEffect(() => { | ||
| if (reportQueuedEditorTypeaheadLayout === null) return; | ||
| const menu = typeaheadMenuRef.current; | ||
| if (!showTypeaheadMenu || menu === null) { |
There was a problem hiding this comment.
🚨 slopcop/review — Clear the queue reservation when zen mode opens
This effect reports every open menu as an external menu. However, zen mode moves the menu inside the form at line 3247. Desktop queued editors can enter zen mode. The queue then adds the menu height plus 8px as blank padding above the form. This can add about 200px of empty space and move nearby rows. Please report an open reservation only when mentionMenuPlacement === "top" && !isZenMode. Add both values to the effect dependencies, and cover the zen-mode transition in a test.
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain English summary
This change measures a mention menu inside a queued-message editor. It adds matching space above the editor, so the menu stays within the queue workspace.
Finding
P2: Zen mode keeps unwanted reserved space. Zen mode moves the menu inside the form, but the effect still reports an external menu. The browser test measured 42 pixels of reserved padding and about 50 pixels of blank space. This space moves the editor and nearby rows. I left an inline comment with the fix and test details.
Review details
- Security: I found no security or privacy issue.
- Performance: I found no render loop or listener leak. Both resize observers disconnect during cleanup.
- Architecture: I found no duplicate reservation code. The new context is specific, but its small scope does not require a refactor.
- Tests: The Turbo app type check passed. The focused Vitest run passed all 134 tests.
- CI: All current GitHub checks pass.
- Browser: Normal queued mention placement passed. Zen mode reproduced the issue.
I posted a comment-only review. I did not approve the pull request or request changes.
07067f1 to
744fa92
Compare
What was wrong
The queued editor rendered its mention typeahead above the prompt inside an overflow-clipped queue surface. Because the drawer reserved no space for that menu, first and last queued rows could hide it; a higher z-index could not escape the clipping boundary.
What changed
How you verified
pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/promptbox/banner/QueuedMessagesList.test.tsx src/components/promptbox/PromptBoxInternal.test.tsx— 135 tests passed.pnpm exec turbo run typecheck --filter=@bb/app— passed.pnpm exec turbo run lint --filter=@bb/app— passed with the repository's existing 147 warnings and no errors.Before / after
Responsive QA
Final-head dev-app captures from
744fa9289951d6b45cdc7e89306fbdd02c8d28ecwith the last queued-row mention menu open; the same run also passed the first queued row.BB-Thread-ID: thr_gts7ugydiz