Skip to content

fix(github): support PR session drops and fresh comments - #574

Merged
Neonforge98 merged 2 commits into
developfrom
codex/fix-pr-session-comment-dnd-cache
Jul 30, 2026
Merged

fix(github): support PR session drops and fresh comments#574
Neonforge98 merged 2 commits into
developfrom
codex/fix-pr-session-comment-dnd-cache

Conversation

@Neonforge98

Copy link
Copy Markdown
Collaborator

Summary

  • accept sidebar Session drags in the PR RichMarkdownEditor, insert at the active ProseMirror selection, and show the shared passive session pill preview immediately while keeping the canonical URI as the submitted markdown
  • update the bounded PR detail cache after successful comments, reviews, and inline replies without extending its 10-minute freshness window; stale/in-flight panel loads can no longer overwrite a mutation in the current panel
  • add regression coverage for custom drop targets, markdown & round-tripping, rich-editor insertion, cache freshness, and post-close/reopen comment retention

Verification

  • pnpm typecheck
  • ESLint on all changed TS/TSX files
  • focused Vitest: 5 files / 14 tests
  • full pnpm test: 770 files / 6,823 tests
  • pnpm build
  • Windows production Tauri builds for independent main and instance2 identities
    • main SHA256: A747A43A5CCF32B38DF9082D77C539912696C99853AA28AB6328FB539D59D331
    • instance2 SHA256: 2A5CB0D905DECB7C56D26B34916648FA640D95B0CEB5A8C6A539D52BBA7A6245

Dual-instance Windows E2E

Validated with the default profile (My Personal Org) and the isolated .orgii-instance2 profile (CU Vanta Shares 0721):

  • dragged Review Agent Session Before Merging into PR feat(runtime): add team runtime sharing #570 on Windows
  • Raw editor retained the exact contiguous orgii://cloud/session/ref URI with no &; the passive Review Age... pill appeared immediately
  • posted one comment from each instance, closed/reopened PR feat(runtime): add team runtime sharing #570 in both, and confirmed both comments persisted and cross-loaded
  • the entitled instance resolved the real session title; the other identity rendered the expected Team session 7094561c fallback
  • GitHub API confirmed the exact URI and both markers: main comment, instance2 comment
  • local pill-only recheck was cleared without posting another comment

Performance / UI audit

  • pointermove is attached only for an active Session drag and removed on drag end/unmount
  • PR detail cache remains bounded and mutation patches preserve the original cachedAt
  • 20-second idle sample: instance2 0% CPU / 0 MB working-set delta; main 6.8% CPU / 0.1 MB delta
  • manual frontend UI audit (the routed skill was unavailable): 0 fix, 5 keep-with-reason, 0 abstract

Neonforge98 and others added 2 commits July 29, 2026 10:55
Audit follow-ups for the session-drop and PR-cache work, dual-instance
verified on the live app:

- insertReferenceText resolves the drop coordinates via posAtCoords and
  never replaces an active range (collapses to its end); a walk-left
  retry covers Chromium returning null for points right of a short line
  (found live: same x resolves once the line grows past it)
- inserted references strip ambient marks (unsetAllMarks over the exact
  inserted range - a zero-mark content object degrades to the mark-
  inheriting typing path), so a drop inside a bold run or link label
  stays an independent plain-text URI
- drops on the Preview tab switch back to Raw before inserting instead
  of writing into the hidden editor at an invisible caret
- tab-drag cancel (Escape) now dispatches tab-drag-end so drop targets
  can never strand a document pointermove listener
- successful PR mutations schedule a dedup-bypassing background
  reconciliation fetch, so an interrupted refresh no longer freezes
  commits/checks/files or the inline-comment head SHA anchor
- request-id guards are scoped per PR key: switching PRs no longer
  discards an unrelated in-flight load's cache write
- inline comment/reply paths gain try/catch, error surfacing, and a
  submitting flag, and never patch the cache on failure

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Neonforge98
Neonforge98 merged commit ec6eef6 into develop Jul 30, 2026
2 checks passed
Neonforge98 added a commit that referenced this pull request Jul 30, 2026
…cache

fix(github): support PR session drops and fresh comments
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