fix(desktop): non-blocking rebase conflict handoff + word-diff freeze guard#129
Open
devlint wants to merge 1 commit into
Open
fix(desktop): non-blocking rebase conflict handoff + word-diff freeze guard#129devlint wants to merge 1 commit into
devlint wants to merge 1 commit into
Conversation
… guard Closes the interactive-rebase modal on a conflict halt so the existing non-blocking rebase banner + inline MergeEditor take over instead of trapping resolution behind the overlay. Also guards diffHighlight.ts's word-level LCS against pathological line lengths (minified/base64 lines) that could freeze the main thread on every resolution click. - RebaseEditor.vue emits a dedicated `conflict` event on conflict halts only (edit/split halts keep the modal open, unchanged). - App.vue's onRebaseConflict() closes the modal, refreshes repo state, and opens MergeEditor on the first conflicted file. - advanceToNextConflictOrFinalize() is now rebase-aware, avoiding a spurious `git merge --continue` error mid-rebase. - diffHighlight.ts falls back to whole-line highlighting above a 1,000,000-cell token-product threshold instead of computing the full O(m*n) LCS. Fixes #128
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #128 — two of the three reported issues; the third (MergeEditor "clunky" UI) is intentionally scoped out, see below.
RebaseEditornow closes its blocking modal and hands off to the existing non-blocking rebase banner + inlineMergeEditor, instead of trapping the user behind an overlay with no resolution UI.edit/splithalts (not a conflict) are unaffected — the modal still opens for those, with its "Split this commit…" affordance intact.git merge --continueerror; the rebase banner's own Continue button is now the sole finalize path during a rebase (this also fixes a pre-existing latent bug affecting plainpull --rebaseconflicts).diffHighlight.ts's word-level LCS highlighting is unguarded O(m·n) — a conflicting line with thousands of tokens (minified bundle, long JSON, base64) could blow up the DP table and freeze the UI on every resolution click. Added aWORD_DIFF_MAX_CELLS = 1,000,000threshold guard that falls back to whole-line highlighting above it, mirroring the guard already used inpackages/core/src/diff/lcs.tsfor a different LCS shape.Scoped out: issue #128 also described the resolution UI (
MergeEditor.vue) as generally "clunky." After review there's no single, cheap, unambiguously-broken affordance to fix there — it's a diffuse complaint about several overlapping resolution mechanisms. A redesign belongs in its own chantier, not bundled into this bug-fix PR.Known limitation (documented in ROADMAP.md): after this handoff closes the modal on a conflict, a later
edit/splithalt within the same rebase won't re-surface the "Split this commit…" affordance — only the banner's Continue/Skip/Abort. Still strictly better than the prior always-blocking modal; tracked as a follow-up.Test plan
pnpm test— 84 files / 651 tests pass (includes newdiffHighlight.test.tsregression test for the freeze fix)vue-tsc --noEmit— cleanpnpm test:parity— pre-existing unrelated failure only (scan-secrets.test.mjs, stale prebuilt Rust binary predating the secrets scanner; reproduces identically onmain, confirmed via stash A/B)pnpm dev:web, real git backend, no mocking) against throwaway temp repos:MergeEditorinline — nothing blockedgit status/git log)edit/splithalt (no conflict) still keeps the modal open with Split intact — no regressionuseInteractiveRebaseconflict signal was attempted but destabilized the parallel test suite (confirmed via A/B againstmain) without adding real coverage beyond the manual QA above — dropped rather than left flaky or backed by a mocked git layer.