Uh oh!
There was an error while loading. Please reload this page.
fix(terminal): persist collapsed state across page refresh - #3023
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryPrevents terminal from auto-opening on page refresh by tracking initialization state and skipping the first sync after console hydration. Changes
How it WorksThe fix uses a flag pattern to distinguish between:
The Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Browser
participant Terminal
participant Store
participant Effect
Note over Browser,Store: Page Refresh / Initial Load
Browser->>Store: Rehydrate terminal state
Store-->>Browser: terminalHeight, console entries
Browser->>Terminal: Mount component
Terminal->>Effect: Run auto-open effect
alt Console not yet hydrated
Effect->>Effect: hasConsoleHydrated = false
Effect->>Effect: Exit early
end
alt First run after hydration
Effect->>Effect: hasInitializedEntriesRef = false
Effect->>Effect: Set hasInitializedEntriesRef = true
Effect->>Effect: Store current length
Effect->>Effect: Skip auto-open (prevent opening on hydrated entries)
end
Note over User,Effect: New Workflow Run
User->>Terminal: Execute workflow
Terminal->>Store: Add console entry
Store->>Terminal: New entry added
Terminal->>Effect: allWorkflowEntries.length increased
alt openOnRun enabled & terminal collapsed
Effect->>Terminal: expandToLastHeight()
Terminal->>Store: setTerminalHeight(lastExpandedHeight)
Store->>Browser: Update CSS variable
Browser->>User: Terminal expands
end
Note over User,Effect: Switch Workflows
User->>Terminal: Navigate to different workflow
Terminal->>Effect: activeWorkflowId changed
Effect->>Effect: Reset hasInitializedEntriesRef = false
Effect->>Effect: Re-initialize for new workflow
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Uh oh!
There was an error while loading. Please reload this page.
03aa239 to
e653ebdComparewaleedlatif1
commented
Jan 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
…ai#3023) * fix(terminal): persist collapsed state across page refresh * fix(terminal): add activeWorkflowId to auto-open effect deps
Summary
Type of Change
Testing
Tested manually
Checklist