You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): keep diff base selector available after errors - #27635
Choosing a comparison base with no common commit hides the diff panel's base selector. The choice is saved per thread, so reloading leaves the panel stuck with no way to select a valid base.
Change
Keep the existing comparison controls and branch choices available when the preview fails, using the thread's checkout and current Git status as fallbacks. Users can recover by choosing Automatic or another branch.
This is a small, focused fix for an obvious bug: the existing recovery controls disappear when a branch comparison fails. The change is limited to the shared web/desktop diff panel and its regression coverage.
Verification
Both browser regression cases failed before the fix and pass afterward: a saved unrelated branch can be reset to Automatic, and a failing automatic base can be replaced with an explicit branch. The tests also check that the recovered choice is saved.
vp test run --project browser src/components/DiffPanel.browser.test.tsx passed from apps/web, 2 tests.
vp run check:changed --concurrency 1 passed.
In the built-in Browser panel against an isolated development server, reproduced the error with an unrelated Git branch, reloaded with the invalid choice saved, and recovered the real file diff by selecting Automatic. The Electron shell was not tested separately.
Macroscope's review found this PR approvable — The branch comparison selector remains available after preview errors, allowing users to choose another base. The change preserves existing comparison defaults and access gates and does not mutate repository contents.
You can add or adjust custom eligibility rules. Learn more.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
DiffPanel now derives fallback comparison refs and keeps branch-base selection available when eligible. Browser tests verify that users can recover from preview errors caused by unrelated branch histories.
Changes: Diff comparison recovery
Layer / File(s)
Summary
Comparison refs and branch-base eligibility apps/web/src/components/DiffPanel.tsx
DiffPanel derives fallback head and base refs. Local and remote ref queries use the preview cwd or active cwd, and local choices exclude the derived head.
Comparison controls and recovery tests apps/web/src/components/DiffPanel.tsx, apps/web/src/components/DiffPanel.browser.test.tsx
The comparison controls use the derived refs and appear when branch-base selection is eligible. Browser tests verify recovery after an unrelated saved branch or an automatic base produces an initial error.
The recovery controls remain available after preview errors, with no actionable merge-blocking risk identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: keeping the web diff base selector available after comparison errors.
Description check
The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the bug, implementation, linked issue, tests, manual validation, screenshots, and the …
Linked Issues check
Issue #27547 requires recovery controls after a branch comparison has no common commit. DiffPanel.tsx keeps the comparison selector available for branch selection and derives fallback head and base …
Out of Scope Changes check
The changes stay within issue #27547. Production changes are limited to the shared diff panel. The added browser tests cover the reported comparison failure, recovery controls, and per-thread persiste…
Full details: Description check
Explanation
The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the bug, implementation, linked issue, tests, manual validation, screenshots, and the untested Electron shell.
Full details: Linked Issues check
Explanation
Issue #27547 requires recovery controls after a branch comparison has no common commit. DiffPanel.tsx keeps the comparison selector available for branch selection and derives fallback head and base refs from Git status, the stored selection, or Automatic. It also uses the active checkout when preview data lacks cwd. DiffPanel.browser.test.tsx covers recovery from a saved unrelated branch and from a failing automatic base. The tests verify that the recovered selection is persisted.
Full details: Out of Scope Changes check
Explanation
The changes stay within issue #27547. Production changes are limited to the shared diff panel. The added browser tests cover the reported comparison failure, recovery controls, and per-thread persistence. No unrelated production behavior is demonstrated.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
kept NathanGlasby's implementation and both regression cases. the fallback refs and checkout path are already the smallest correct fix i found. merged current main without rebasing; no product or test changes were needed. head: 3e833383f5c1183a7e7650e2fc36a61d49b5cda2.
verification:
both existing browser cases fail on current main because the comparison selector disappears, then pass with this fix.
blacksmith vp run check:changed github/main passes: format, lint, knip, affected typechecks, both browser cases, and react compiler checks.
system chrome against the real dev server and a repository with unrelated history: the saved bad base survives reload, the selector stays available, choosing Automatic restores the real patch, and reload retains the recovered base. replay supplied the chat only; git supplied the diff.
all 29 ci checks pass. two independent source reviews approve this head without findings. the old failed codex review produced no actionable finding; the latest automatic review reports no new changes to review.
unverified: electron shell, native mobile, remote/relay/tunnel, and other providers. this change is confined to the shared web/desktop diff panel.
verified as-is at 3e833383f5c1183a7e7650e2fc36a61d49b5cda2 on this linux vm. no code changes or pushes.
ran github/main (6d46336476) in a separate worktree, then stopped it before installing and running the exact pr head. drove the real web client with repository playwright and system chrome.
added a project through the app. a real codex gpt-6.1-sol turn initialized git, created main, feature/recovery and an unrelated orphan branch, committed changes, and left a working-tree edit. no replay, mocks or database fixtures.
main: selected unrelated. git reported no common commit, the comparison selector disappeared, and reload preserved the trapped state.
pr, same repository and saved selection: the selector remained available. selecting automatic restored the actual patch; reload retained the recovered selection.
a second real codex turn appended a line and configured an unrelated automatic base. after reload, automatic failed. selecting explicit main restored the patch and survived reload.
nearby behavior: uncommitted scope showed the expected working-tree line. latest-turn scope after the second turn showed exactly the new provider followup line, with no branch selector. the initial setup turn began outside git and had no usable initial checkpoint; the subsequent turn in the initialized repository produced a working checkpoint diff.
blacksmith: installed dependencies and chromium, then ran cd apps/web && vp test run --project browser src/components/DiffPanel.browser.test.tsx: both cases passed. current head has 29 successful ci checks, zero failing or pending.
runtime transcript:
main dev: server 16733, web 8693
codex setup: completed; feature/recovery, main, unrelated; example.txt modified
main unrelated comparison: selector count 0, including after reload
pr dev: server 13773, web 5733
pr same error: selector count 1
automatic recovery: baseRef null persisted after reload; error count 0
failing automatic recovery: explicit main persisted after reload
latest turn: +1 -0, provider followup
blacksmith: 1 test file passed, 2 tests passed
Not verified
native electron, ios/android, macos/windows, remote/relay/tunnel, other providers, and permission-restricted sessions were not exercised. this pass verified local web and real codex. no product changes required a new check:changed run; focused browser regressions passed remotely. captures were inspected and uploaded video playback and seeking passed in chrome.
- The linked PR status test loads index.css: the fork's CSS-mask icons are
sized by Tailwind classes, so without it the merged icon has no size.
- Upstream's DiffPanel test drives its base-ref combobox, which the fork's
scope menu and target-branch picker replace; that picker already keeps the
worktree cwd when the preview fails (pingdotgg#27635).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laurin-Notemann
added a commit
to otterware-app/otter-code
that referenced
this pull request
Nov 1, 2026
* fix(otter): release checks after the 2026-10-31 sync (#63)
* fix(otter): release checks after the 2026-10-31 sync
Upstream's new tests assume T3 names: the SSH device script tests use
~/.t3/device and the web brand asset test omits the fork's favicon.svg.
The DesktopProtocols test also kept node imports the removed Clerk
fixture used, which fails lint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(otter): web release tests after the 2026-10-31 sync
Upstream made the standard dark canvas black (pingdotgg#25948), and its new
command palette composition test stubs every atom, which the fork's
project space hook cannot read session state from.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* test(otter): installer and mobile app ID tests use Otter names
Upstream's new installer test runs bin/t3 and its app variant test expects
com.t3tools.t3code; the fork links otter-code and ships dev.otterware.code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(otter): fit upstream's new web browser tests to the fork
- The linked PR status test loads index.css: the fork's CSS-mask icons are
sized by Tailwind classes, so without it the merged icon has no size.
- Upstream's DiffPanel test drives its base-ref combobox, which the fork's
scope menu and target-branch picker replace; that picker already keeps the
worktree cwd when the preview fails (pingdotgg#27635).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
github-actionsBot
added a commit
to omarcresp/t3code-flake
that referenced
this pull request
Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Choosing a comparison base with no common commit hides the diff panel's base selector. The choice is saved per thread, so reloading leaves the panel stuck with no way to select a valid base.
Change
Keep the existing comparison controls and branch choices available when the preview fails, using the thread's checkout and current Git status as fallbacks. Users can recover by choosing Automatic or another branch.
Scope and approval
Fixes #27547.
This is a small, focused fix for an obvious bug: the existing recovery controls disappear when a branch comparison fails. The change is limited to the shared web/desktop diff panel and its regression coverage.
Verification
vp test run --project browser src/components/DiffPanel.browser.test.tsxpassed fromapps/web, 2 tests.vp run check:changed --concurrency 1passed.After choosing Automatic:
Created with gpt-6.1-sol in Codex.