forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When oclite boots, previous terminal output is visible above the header. The new session starts mid-screen with no visual separation. Users see stale output from prior runs mixed with the fresh oclite header.
Solution
Clear the screen on boot to give a clean start.
Boot sequence:
\x1b[2J\x1b[H— Clear screen + cursor to home (top-left)- Render header:
oclite v0.1.0 - Show
Setting up environment...with spinner while backend bootstraps - Once bootstrap completes: clear the setup message, show
Ready, render prompt with visible cursor
Important: Do NOT use alternate screen buffer (\x1b[?1049h) — this kills scrollback history. Use main buffer clear instead.
Research Findings (from exploration of Lazygit, Aider, Claude Code, htop)
- Chat TUIs (Claude Code, Aider) never use alternate screen — users need scrollback
- Editors/monitors (Lazygit, htop) do use alternate screen — but they don't need scrollback
- Recommended: main buffer clear (
\x1b[2J) for clean start while preserving future scrollback - Handle SIGWINCH for terminal resize
Related
- UX: Show initialization progress and hide cursor until backend ready #57 (no initialization feedback during MCP bootstrap)
- [Architecture] oclite: Live Block rendering with log-update for tools, tasks, and todos #82 (Live Block architecture)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request