fix(web): keep ref picker steady when opening - #9472
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped UI positioning fix: it prevents the branch trigger from shifting under press and uses the correct anchor behavior for single-select popups while preserving multi-select handling. The shared-component impact is limited to popup geometry, with no schema, security, deployment, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
5ff195e to
2ba160b
Compare
Dismissing prior approval to re-evaluate 2ba160b
4174026 to
f191fa5
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe branch trigger now keeps its scale while pressed. Single-select combobox popups no longer use the chips container as their default anchor. ChangesBranch popup behavior
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This updates branch-picker popup alignment behavior and removes press scaling from its trigger. No concrete current-head merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
f191fa5 to
a862ba8
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Dismissing prior approval to re-evaluate a862ba8
Merges `pingdotgg/t3code` `8b2838e0e..a37c664` — 43 commits. `343` files landed against `343` changed in the upstream range; fork delta `723` files. Exact match, so nothing upstream changed was dropped. Details in [`docs/fork/upstream-merge-log.md`](../blob/merge/upstream-2026-09-08/docs/fork/upstream-merge-log.md). ## Two fork deltas this merge had to re-apply **Upstream split the server-update banner into two routes.** pingdotgg#10596 added `useAutoBalanceUpdateBanner` beside the single-machine condition the fork already gates. The conflict was on the first line only, so resolving it correctly still left the auto-balance route ungated — an auto-balanced project would have been offered `npx t3` against a backend that does not implement `server.updateServer`. `FEATURES.serverUpdateBanner` now carries two gates in `ChatView.tsx`. **A new settings page needs a gate even though it degrades politely.** pingdotgg#8103 added `/settings/snap-shot` for desktop window capture. Every control drives `window.desktopBridge`, and upstream renders an "unavailable" notice rather than hiding the page, so a hosted build listed a sidebar section and six searchable rows for a feature it can never run. Gated with `FEATURES.snapShots`. Two smaller fixes: `packages/moatless-api` still ran `tsgo --noEmit` after upstream replaced `@typescript/native-preview` with TypeScript 7.0.2, and `duplicate-adds.mjs` now skips `pnpm-lock.yaml` (it read `iconv-lite: 0.6.3` as taken twice; `d3-dsv` and `encoding` each declare it). ## Usable as-is - Stop-thread keybinding command (pingdotgg#4308). - Project import tolerates servers that predate the git-identity scan (pingdotgg#10547). - Proactive panels open when entering a thread (pingdotgg#10610); pull-request markdown links open in the panel (pingdotgg#10623); markdown images navigate as galleries (pingdotgg#10625); pull-request videos play inline (pingdotgg#10617). - Settings project scopes are searchable and scrollable (pingdotgg#10570); ref picker stays steady when opening (pingdotgg#9472); sidebar timer uses `tabular-nums` (pingdotgg#10592); popup triggers stay steady when pressed (pingdotgg#9468); settled PR colors restore on hover (pingdotgg#10023). - Composer Fast mode persists across new chats (pingdotgg#2981); inserted citations are removed on cancel (pingdotgg#10518). - TypeScript 7.0.2 (pingdotgg#10663) and the knip desktop-export rules (pingdotgg#10269). ## Unsupported in Moatless / needs implementation - **Cross-platform window capture** (pingdotgg#8103) — `apps/desktop/src/snapShot/**`, `apps/web/src/components/settings/SnapShotSettings.tsx`, `apps/web/src/lib/desktopSnapShot.ts`. Needs an Electron `window.desktopBridge`; a browser tab has none. Gated behind `FEATURES.snapShots` in this PR. - **Auto-balance server update** (pingdotgg#10596) — `apps/web/src/components/chat/useAutoBalanceUpdateBanner.tsx`. Needs `server.updateServer`, which Moatless does not dispatch. Gated behind `FEATURES.serverUpdateBanner` in this PR. - **Preview recording transfer** (pingdotgg#10572) — `apps/server/src/mcp/toolkits/preview/handlers.ts`, `apps/web/src/browser/browserRecordingUpload.ts`. Moves a finished preview recording into the agent environment over the desktop bridge. Adds four error types to `packages/contracts/src/previewAutomation.ts` and no new RPC method, so no union changed. Sits behind the `previewAutomation.connect` / `focusHost` / `respond` gap already in the register. - **Local media linked from remote threads** (pingdotgg#10619) and **browser editing shortcuts** (pingdotgg#10621) — Electron shell only. - **iOS Keychain access group** (pingdotgg#3665) and the mobile provider account badge (pingdotgg#9899) — the fork ships no mobile build against Moatless. ## Backend behavior to consider reproducing in Moatless - **Name the usage limit and its reset instead of relaying "out of credits"** (pingdotgg#10473, `apps/server/src/provider/**` Codex adapter). Moatless owns its provider runtime, so the clearer limit message has to be produced there. - **Report usage limits on retried turns** (pingdotgg#10549, Claude adapter). A retry currently loses the limit signal; same ownership. - **Disable executable capabilities in Claude metadata generation** (pingdotgg#4169, `apps/server/src/textGeneration/ClaudeTextGeneration.ts`). Title and metadata generation should not be able to run tools. Worth mirroring wherever Moatless generates thread titles. ## Verification `verify.mjs`: duplicate-adds, tripwires, resolution-check, unsupported-methods (0 ADD, 0 DROP, 2 KEEP), fmt, lint and typecheck all pass. Tests pass except `@t3tools/desktop`, which cannot compile `scripts/browser-secret-native.test.mjs` because the sandbox has no `libsecret-1` — 1283 tests pass, 0 fail, and the file is byte-identical to upstream. New entry in `docs/fork/gaps.md`. `t3` failed `GrokAdapter.test.ts` once under parallel load and passes 42/42 alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/6d8ea486-2fcb-4c25-bd34-dcd15cc4a7ac
What Changed
Single-select comboboxes now use their trigger as the positioning anchor from the first frame. The branch picker trigger also stays at full scale while pressed.
Why
The old empty chips anchor caused a second positioning pass, and the trigger's press scale moved the live popup anchor a few pixels. Together these made the ref picker jump as it opened.
The composer-focus portion of the original PR is no longer needed after
mainstopped collapsing the desktop composer on focus loss in #10437, so it was dropped during the rebase.UI Changes
Before
Screen.Recording.2026-09-03.205609.mp4
After
Screen.Recording.2026-09-03.212547.mp4
Validation
vp test run apps/web/src/components/chat/composerEventScope.test.ts(7 tests passed)git diff --checkmainChecklist
Built with GPT-5.6 Sol in the Codex harness.
Note
Medium Risk
Changes desktop composer expand/collapse focus rules and global single-select combobox popup anchoring, so regressions could show up outside the branch picker if other comboboxes relied on the old implicit anchor.
Overview
Fixes the branch/ref picker jumping sideways when opened from the expanded thread composer. Focus moving into the portaled combobox was treated as leaving the composer, which collapsed the surface and re-anchored the popup mid-open.
Composer focus scope now treats context toolbar controls (via
data-chat-composer-focus-scope) and existing composer floating layers as in-composer for blur and desktop focus tracking.resolveDesktopComposerFocuskeeps an already expanded composer focused across branch-picker focus transitions but does not expand a resting composer when only the picker receives focus.Branch picker UI: the selector wrapper is marked as a composer focus scope, and the combobox trigger uses
active:scale-100so press-scale does not shrink the anchor while the popup is aligned to it.Combobox positioning:
ComboboxPopuponly falls back tochipsRefas the positioner anchor whenmultipleis true; single-select popups use the default trigger anchor from the first frame, avoiding a second layout pass that used an empty chips anchor.Reviewed by Cursor Bugbot for commit 4174026. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix ref picker popup shift by disabling trigger scale and restricting chips anchor
BranchToolbarBranchSelectortrigger from applying a scale transform while pressed, which stops the popup anchor from shifting.chipsanchor reference to multi-select comboboxes only inComboboxPopup.chipsreference as their implicit positioner anchor unless an explicit anchor is provided.Macroscope summarized a862ba8.
Summary by CodeRabbit