Repository navigation
Revert terminal rendering changes from #10692, #10794, #10871, and #10907 - #11338
Conversation
…tablyai#10871)" This reverts commit 5a6a9e0. Reverted for terminal rendering regressions (flashing, lost content). Conflict resolution preserves the forwardRef signature from stablyai#10433 and drops the parked-presentation gating stablyai#11016 fed with its effective set. Co-authored-by: Orca <[email protected]>
…i#10794)" and "fix(terminal): stop switch bold flash and Windows lag (stablyai#10692)" This reverts commits 4681edb and 8f5a454. stablyai#10794 was itself a partial revert of stablyai#10692, so both are reverted together: the Windows retained-WebGL LRU and the macOS pre-paint (layout-phase) visibility transition that survived it. Terminal visibility resume returns to passive disposal and recreation on every platform, and the WebGL context ceiling returns to a flat 128. Co-authored-by: Orca <[email protected]>
… on reveal (STA-2694) (stablyai#10907)" This reverts commit 97cb32c.
…nal-render-flash # Conflicts: # src/renderer/src/components/Terminal.tsx # src/renderer/src/components/terminal-pane/TerminalPaneOverlayLayer.tsx
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (36)
📝 WalkthroughWalkthroughTerminal presentation handoff state and initial-render settlement callbacks were removed. Overlay and terminal visibility now derive from direct visibility, activity portal, and active-group state. Visibility resume operations execute inline, including backlog recovery, WebGL restoration, viewport synchronization, fitting, and repaint scheduling. Cold-parking returns its parked-tab set directly, while synchronized-output release calls and related observation coverage were removed. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| expect(props).not.toContain('branch') | ||
| expect(props).toContain('pr') | ||
| expect(props).toContain('automation') | ||
| expect(props).toContain('cli') | ||
| expect(props).toEqual(DEFAULT_WORKTREE_CARD_PROPERTIES) |
There was a problem hiding this comment.
Out-of-scope test assertion removal
expect(props).toContain('cli') is removed here, but 'cli' is still present in DEFAULT_WORKTREE_CARD_PROPERTIES and this file has no relation to the terminal rendering changes being reverted. The surviving toEqual(DEFAULT_WORKTREE_CARD_PROPERTIES) check makes the assertion redundant, so coverage isn't weakened — but it's worth confirming this deletion was intentional and not an accidental side-effect of the revert.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Was this assertion removal intentional? It isn't related to the terminal rendering reverts and 'cli' is still in DEFAULT_WORKTREE_CARD_PROPERTIES.
Greptile SummaryThis PR reverts four terminal rendering improvements (#10692, #10794, #10871, #10907) — WebGL visibility transitions, cold-park presentation gating, and synchronized-output release hooks — while preserving hidden-worktree retention and SSH parking from current
Confidence Score: 4/5Safe to merge; the revert is mechanically clean and the key visibility-state invariants are preserved across all code paths. The revert removes a sizable chunk of WebGL transition and synchronized-output logic that was actively causing artifacts. The bookkeeping refs are updated correctly in the inlined single-effect path, and the window-wake ordering still satisfies the pre-sync-before-resume invariant. Two minor items: non-split path missing Files Needing Attention: src/renderer/src/components/Terminal.tsx (missing
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/Terminal.tsx | Removes isPresented/presentedWorktreeId state from both split and non-split worktree rendering paths; reverts visibility gating back to isVisible alone. Missing inert on non-split hidden-but-measured terminals. |
| src/renderer/src/components/terminal-pane/TerminalOverlaySlot.tsx | Removes isPresented/isWorktreePresented props and associated interaction guards; inlines formerly-extracted CSS anchor-positioning constants; simplifies style/display logic to use only isVisible. |
| src/renderer/src/components/terminal-pane/use-terminal-pane-global-effects.ts | Replaces the two-phase useLayoutEffect+useEffect visibility transition (via applyTerminalVisibilityTransition) with a single useEffect, inlining resume/hide logic. Removes macOS-specific pre-paint effect path. |
| src/renderer/src/components/terminal-pane/terminal-visibility-resume.ts | Removes post-paint recovery return type; moves backlog drain into resumeTerminalVisibilityHeavy; reorders recoverVisibleTerminalWindowWake to drain before sync-intent. Intentional revert of the two-phase reveal approach. |
| src/renderer/src/lib/pane-manager/terminal-synchronized-output-release.ts | File deleted entirely — removes the DEC 2026 synchronized-output latch release that prevented stale canvas renders on reveal. Callers in pane-reveal-repaint.ts and pane-webgl-renderer.ts cleaned up. |
| src/renderer/src/components/terminal-pane/TerminalPaneOverlayLayer.tsx | Removes useTerminalOverlayPresentation and buildTerminalOverlayAssignments imports; inlines a simpler assignment map; drops coldParkedTerminalTabIds from cold-parking hook return. |
| src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.ts | Return type simplified from {parkedTerminalTabIds, coldParkedTerminalTabIds} to just ReadonlySet<string> since coldParkedTerminalTabIds is no longer consumed after the presentation hook was removed. |
| src/shared/worktree-card-properties.test.ts | Removes expect(props).toContain('cli') — an out-of-scope change unrelated to terminal rendering. Coverage is not weakened because the surviving toEqual(DEFAULT_WORKTREE_CARD_PROPERTIES) is stricter. |
| src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts | Removes onInitialRenderSettledRef dep and the scheduleTerminalInitialRenderSettled call that drove worktree presentation settling. |
| src/renderer/src/lib/pane-manager/pane-reveal-repaint.ts | Removes releaseAbandonedSynchronizedOutput call from schedulePaneRevealPresent; the synced-output release is gone with the deleted file. |
Sequence Diagram
sequenceDiagram
participant R as React
participant GE as useTerminalPaneGlobalEffects
participant TVR as terminal-visibility-resume
participant PM as PaneManager
Note over R,PM: Tab switch (worktree-active path)
R->>GE: useEffect [isActive, isWorktreeActive, rendererVisible]
GE->>TVR: "resumeTerminalVisibility({shouldUseLightTabResume})"
alt Heavy resume (first reveal or surface restore)
TVR->>PM: drain backlog + flushTerminalOutput
TVR->>PM: syncTerminalViewportIntents
TVR->>PM: resumeRendering()
TVR->>PM: fitAllRevealedPanes()
TVR->>TVR: resetAndRefreshAllTerminalWebglAtlases
TVR->>PM: scheduleRevealRepaint()
else Light tab resume (intra-worktree)
TVR->>PM: requestLightTabBacklogRecovery
TVR->>PM: scheduleRevealRepaint()
end
GE->>GE: update wasVisible/hasCompleted refs
Note over R,PM: Window wake recovery
R->>GE: useTerminalWindowWakeRecovery
GE->>TVR: recoverVisibleTerminalWindowWake
TVR->>PM: drain + flushTerminalOutput (per pane)
TVR->>PM: syncTerminalViewportIntents
TVR->>PM: resumeRendering()
TVR->>PM: fitAllRevealedPanes()
TVR->>PM: enforceTerminalViewportIntents
TVR->>PM: scheduleRevealRepaint / scheduleRevealPresent
Comments Outside Diff (1)
-
src/renderer/src/components/Terminal.tsx, line 2368-2385 (link)Missing
inerton hidden-but-measured worktree containerThe non-split worktree
<div>lost itsinertattribute (the old code hadinert={!isPresented}), while the split-surface path inWorktreeSplitSurfacestill setsinert={!isVisible}. WhenshouldMeasureHiddenWorktreeis true, the non-split container renders withopacity-0 pointer-events-nonebut withoutinert, allowing keyboard focus (Tab key) to land inside invisible terminal content. Thearia-hidden={!isVisible}alone hides it from the accessibility tree but does not block keyboard navigation.
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
…stablyai#10871, and stablyai#10907 (stablyai#11338) * Revert "fix(terminal): avoid flash while restoring parked terminals (stablyai#10871)" This reverts commit 785158b. Reverted for terminal rendering regressions (flashing, lost content). Conflict resolution preserves the forwardRef signature from stablyai#10433 and drops the parked-presentation gating stablyai#11016 fed with its effective set. Co-authored-by: Orca <[email protected]> * Revert "fix(terminal): limit pre-paint WebGL resume to macOS (stablyai#10794)" and "fix(terminal): stop switch bold flash and Windows lag (stablyai#10692)" This reverts commits 5a5adaa and 0c09b5d. stablyai#10794 was itself a partial revert of stablyai#10692, so both are reverted together: the Windows retained-WebGL LRU and the macOS pre-paint (layout-phase) visibility transition that survived it. Terminal visibility resume returns to passive disposal and recreation on every platform, and the WebGL context ceiling returns to a flat 128. Co-authored-by: Orca <[email protected]> * Revert "fix(terminal): release an abandoned synchronized-output frame on reveal (STA-2694) (stablyai#10907)" This reverts commit 0520c27. --------- Co-authored-by: Orca <[email protected]>
Summary
Validation
pnpm typecheck