Skip to content

fix(web): keep ref picker steady when opening - #9472

Merged
maria-rcks merged 2 commits into
pingdotgg:mainfrom
Adamulek123:fix/ref-picker-composer-collapse
Sep 7, 2026
Merged

fix(web): keep ref picker steady when opening#9472
maria-rcks merged 2 commits into
pingdotgg:mainfrom
Adamulek123:fix/ref-picker-composer-collapse

Conversation

@Adamulek123

@Adamulek123 Adamulek123 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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 main stopped 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 --check
  • Clean merge-tree against current main
  • Fresh CI triggered for the rebased head

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after UI evidence
  • I included video for the interaction change

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. resolveDesktopComposerFocus keeps 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-100 so press-scale does not shrink the anchor while the popup is aligned to it.

Combobox positioning: ComboboxPopup only falls back to chipsRef as the positioner anchor when multiple is 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

  • Prevents the BranchToolbarBranchSelector trigger from applying a scale transform while pressed, which stops the popup anchor from shifting.
  • Restricts the implicit chips anchor reference to multi-select comboboxes only in ComboboxPopup.
  • Behavioral Change: Single-select combobox popups no longer use the chips reference as their implicit positioner anchor unless an explicit anchor is provided.

Macroscope summarized a862ba8.

Summary by CodeRabbit

  • Bug Fixes
    • Improved branch selector button behavior while its popup is open.
    • Corrected popup positioning for single-select and multi-select comboboxes.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 3, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 3, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at a862ba8

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.

@Adamulek123
Adamulek123 force-pushed the fix/ref-picker-composer-collapse branch from 5ff195e to 2ba160b Compare September 4, 2026 23:11
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 4, 2026 23:11

Dismissing prior approval to re-evaluate 2ba160b

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 4, 2026
@Adamulek123
Adamulek123 force-pushed the fix/ref-picker-composer-collapse branch from 4174026 to f191fa5 Compare September 7, 2026 18:56
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: abeedd7b-1e50-4c2f-838e-40e8bffc4bb6

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1bf50 and a862ba8.

📒 Files selected for processing (2)
  • apps/web/src/components/BranchToolbarBranchSelector.tsx
  • apps/web/src/components/ui/combobox.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/components/ui/combobox.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The branch trigger now keeps its scale while pressed. Single-select combobox popups no longer use the chips container as their default anchor.

Changes

Branch popup behavior

Layer / File(s) Summary
Adjust branch popup positioning
apps/web/src/components/BranchToolbarBranchSelector.tsx, apps/web/src/components/ui/combobox.tsx
The branch trigger adds active:scale-100. ComboboxPopup anchors to chipsRef only for multi-select comboboxes.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a862b

This updates branch-picker popup alignment behavior and removes press scaling from its trigger. No concrete current-head merge-blocking risk remains.

Suggested reviewers: juliusmarminge

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: keeping the ref picker stable while it opens.
Description check ✅ Passed The description includes the required What Changed, Why, UI Changes, and Checklist sections. It explains the fix, provides before/after UI evidence, documents validation, and identifies the interactio…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@Adamulek123
Adamulek123 force-pushed the fix/ref-picker-composer-collapse branch from f191fa5 to a862ba8 Compare September 7, 2026 19:04
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

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.

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 7, 2026 19:05

Dismissing prior approval to re-evaluate a862ba8

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 7, 2026
@maria-rcks
maria-rcks merged commit d67157a into pingdotgg:main Sep 7, 2026
25 checks passed
aorwall added a commit to aorwall/t3code that referenced this pull request Sep 8, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants