Skip to content

fix(review): stabilize diff focus, navigation, and comments - #8

Merged
ahmedragab20 merged 4 commits into
mainfrom
fix/diff-review-stability
Sep 7, 2026
Merged

fix(review): stabilize diff focus, navigation, and comments#8
ahmedragab20 merged 4 commits into
mainfrom
fix/diff-review-stability

Conversation

@ahmedragab20

@ahmedragab20 ahmedragab20 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Upgrade @pierre/diffs from 1.3.2 to 1.4.1 and migrate editor factories/change events, annotation ownership, and saved-snapshot handling.
  • Keep comment keyboard events local; guard page shortcuts against handled events, IME composition, editable/shadow-DOM origins, and dialogs.
  • Stop passive sidebar tracking from stealing focus, remove idle viewport/search polling, and make line navigation bounded and cancellable.
  • Preserve viewed state when jumping to a line; ordinary collapse no longer advances to another file.
  • Compare actual diff content rather than hunk shape alone, and preserve unchanged renderer identities.
  • Validate comment responses, upsert duplicate IDs, await persistence, and retain drafts/editors after failures.
  • Add automated regression coverage. Remove the temporary manual browser fixture; production code and automated tests do not depend on it.

Scope

main (including #7) has been merged into this branch. PrReviewApp.tsx and usePrSession.ts match main; shared renderer/comment stability changes remain intact.

Verification

  • pnpm test:ts: 160 files, 1,603 tests passed.
  • pnpm build:ts: passed; client chunks over 500 kB still produce warnings.
  • Final test-typing corrections: 32 targeted tests passed.
  • Changed files have zero TypeScript errors. Repository-wide tsc --noEmit still reports 55 errors in unchanged files; it is not an all-green typecheck.
  • Earlier manual browser checks using the temporary fixture (now removed): 200 rendered rows; textarea focus and scroll position preserved through diff refresh and remote comment insertion; Ctrl+Enter created one comment without opening a review dialog; failed submission preserved the body and showed an error; zero browser errors in those checks.

Before ready for merge

  • Complete the broader manual cross-browser, edit-mode, and navigation matrix.
  • Complete before/after latency measurements; no comparative performance baseline is claimed here.
  • Human verification of the original scrolling and comment-submission workflows.

Automated verification passed again after fixture removal: 160 files, 1,603 tests. The manual verification items above remain outstanding.

Merge readiness update

  • Merged main into the branch in 04aefa8; resolved conflicts without dropping feat(gh-pr): harden PR sessions and add conversation inbox #7’s PR session and conversation features.
  • pnpm test: 167 Vitest files, 1,659 tests passed; 231 Rust tests passed.
  • pnpm build:ts: passed with browser externalization and chunk-size warnings.
  • GitHub CI is being verified before merge.
  • The author explicitly waived the remaining manual verification checklist above for this merge. Those checks were not completed; no comparative latency baseline is claimed.

@ahmedragab20
ahmedragab20 marked this pull request as ready for review September 6, 2026 23:21
@ahmedragab20
ahmedragab20 merged commit 35ba2df into main Sep 7, 2026
12 checks passed
@ahmedragab20
ahmedragab20 deleted the fix/diff-review-stability branch September 9, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant