Skip to content

Improve intro terminal layout and wrapping for narrow/mobile viewports#272

Open
smcga wants to merge 1 commit intomainfrom
codex/fix-text-truncation-issues-on-mobile
Open

Improve intro terminal layout and wrapping for narrow/mobile viewports#272
smcga wants to merge 1 commit intomainfrom
codex/fix-text-truncation-issues-on-mobile

Conversation

@smcga
Copy link
Copy Markdown
Owner

@smcga smcga commented Apr 4, 2026

Motivation

  • Intro terminal text was getting clipped and wrapping incorrectly on narrow/mobile screens, causing letters to be hidden and lines to wrap oddly.

Description

  • Add IntroLayoutMetrics and getIntroLayoutMetrics(width, height, theme) to compute responsive fontSize, lineHeight, padding, windowWidth, and windowHeight when the viewport is narrow.
  • Set the canvas font before measuring character width so measureText and wrapping calculations match the rendered glyph sizes.
  • Apply the responsive metrics consistently to content layout, title bar sizing, cursor block height, and the explosion-text pass to preserve the console look while avoiding clipping.
  • Update src/renderer/intro/terminalIntro.ts and add tests in src/renderer/intro/terminalIntro.test.ts for the new layout behavior.

Testing

  • Ran npm test -- src/renderer/intro/terminalIntro.test.ts and the test suite passed (1 file, 7 tests all green).

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 4, 2026

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

Project Deployment Actions Updated (UTC)
codexperimental Ready Ready Preview, Comment Apr 4, 2026 6:20pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant