Skip to content

fix(ui): prepare history reviews before terminal handoff - #989

Draft
benvinegar wants to merge 1 commit into
feat/hunk-log-responsivefrom
feat/hunk-log-handoff
Draft

fix(ui): prepare history reviews before terminal handoff#989
benvinegar wants to merge 1 commit into
feat/hunk-log-responsivefrom
feat/hunk-log-handoff

Conversation

@benvinegar

@benvinegar benvinegar commented Sep 5, 2026

Copy link
Copy Markdown
Member

Stack

Problem

Opening a commit from hunk log destroyed the history renderer before starting and bootstrapping the review child. That restored the shell's previous terminal screen for the entire startup interval. Returning used the same sequential renderer boundary.

Approach

  • keep the themed history surface mounted while the selected review bootstraps
  • show a restrained Opening commit / Preparing review… transition state
  • add a private, versioned IPC handoff between the history parent and review child
  • resolve CLI configuration, extensions, provider changeset, theme, and renderer module before the child reports readiness
  • destroy history only after readiness, then release terminal ownership to the child
  • buffer and bound bootstrap diagnostics so child stderr cannot corrupt the loading surface
  • preserve opaque, provider-owned Git, jj, and third-party review actions
  • propagate the already-resolved terminal theme mode without querying a terminal owned by the parent
  • handle readiness timeout, disconnect, cancellation, signals, early exit, and signal-ignoring children with bounded termination and escalation
  • consume the private handoff environment before running the review so descendants cannot inherit it

Normal hunk diff, hunk show, pager, and static startup remain unchanged.

Validation

  • 1,848 unit/CLI/session tests passed, 3 skipped
  • 146 PTY integration tests passed, 1 platform-specific test skipped
  • 9 TTY smoke tests passed
  • focused handoff/startup suite passed
  • typecheck and lint passed
  • docs check passed
  • dependency and source-boundary checks passed
  • independent lifecycle/IPC review completed; valid race and cleanup findings fixed
  • git diff --check passed

Animation scope

This PR removes the user-visible bootstrap-length flash and shows a real loading surface. It does not fake a cross-process slide: history and review still use separate OpenTUI renderers, so they cannot safely composite live frames. A genuine slide-in review panel requires a single long-lived renderer and should reuse the animation primitive from #941 after that work lands, alongside an embeddable fresh review-session lifecycle.

This PR description was generated by Pi using GPT-5.6-sol

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hunk-web Ready Ready Preview Sep 5, 2026 4:12am UTC

Request Review

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