Skip to content

fix(terminal): reduce default scrollback from 2500 to 1000 lines#3365

Merged
gregpriday merged 1 commit intodevelopfrom
feature/issue-3278-reduce-default-terminal
Mar 16, 2026
Merged

fix(terminal): reduce default scrollback from 2500 to 1000 lines#3365
gregpriday merged 1 commit intodevelopfrom
feature/issue-3278-reduce-default-terminal

Conversation

@gregpriday
Copy link
Collaborator

Summary

  • Reduces SCROLLBACK_DEFAULT from 2500 to 1000 lines, cutting per-terminal buffer memory by 60% and bringing Canopy in line with VS Code's default
  • Lowers the agent scrollback maximum cap from 10,000 to 5,000 lines, reducing worst-case memory with 20 agent panels open from ~300MB to ~150MB
  • Adds a store migration (007) so users on the old default are silently moved to the new one on next launch, without touching settings they've manually changed

Resolves #3278

Changes

  • shared/config/scrollback.tsSCROLLBACK_DEFAULT 2500 → 1000
  • electron/store.ts — default store value updated to match
  • src/utils/scrollbackConfig.ts — agent max cap 10,000 → 5,000; UI slider max updated
  • electron/services/migrations/007-reduce-default-terminal-scrollback.ts — new migration that resets the stored value when it matches the old default
  • src/components/Settings/TerminalSettingsTab.tsx — memory estimate and slider label reflect new bounds
  • Tests updated across scrollback.test.ts, StoreMigrations.test.ts, and TerminalInstanceService.scrollback.test.ts

Testing

  • npm run check passes clean (0 errors, warnings only from pre-existing patterns)
  • Unit tests for the migration, scrollback config, and terminal instance service all pass
  • Memory estimate in the settings UI correctly reflects the updated default and agent cap

- Change SCROLLBACK_DEFAULT from 2500 to 1000 (matches VS Code/iTerm2)
- Reduce agent scrollback policy maxLines from 10000 to 5000, minLines from 1000 to 500
- Update Settings UI presets to [500, 1000, 2500, 5000] with updated labels
- Add migration 007 to migrate existing users from old 2500 default to 1000
- Fix memory estimate to include opencode agent type in calculation
- Replace hardcoded 2500 in SettingsDialog with SCROLLBACK_DEFAULT constant
- Update all affected tests and search index
gregpriday added a commit that referenced this pull request Mar 16, 2026
- Align with PR #3365 which reduces SCROLLBACK_DEFAULT from 2500 to 1000
- At 1000, background reduction would be a no-op since both values match
- 500 lines preserves meaningful memory savings for background terminals
@gregpriday
Copy link
Collaborator Author

Review status: Ready

@gregpriday gregpriday merged commit fadcacb into develop Mar 16, 2026
4 checks passed
@gregpriday gregpriday deleted the feature/issue-3278-reduce-default-terminal branch March 16, 2026 06:26
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.

Reduce default terminal scrollback from 2500 lines

1 participant