Skip to content

Frame terminal canvas with chrome padding#247

Open
kirich1409 wants to merge 2 commits intomainfrom
fix/terminal-chrome
Open

Frame terminal canvas with chrome padding#247
kirich1409 wants to merge 2 commits intomainfrom
fix/terminal-chrome

Conversation

@kirich1409
Copy link
Copy Markdown
Contributor

Summary

The terminal canvas (AgentTerminalView in AppRootView) rendered edge-to-edge inside the window, making the agent session feel cramped. Wrap the terminal in a clipped rounded container with DS.Spacing.md padding so the window's surface colour shows through around the edges.

Changes

  • AppRootView.swift: wrap TerminalViewRepresentable (and its Color.black connecting-state fallback) in a Group with .clipShape(.rect(cornerRadius: DS.Radius.md, style: .continuous)) + .padding(DS.Spacing.md).
  • Outer VStack gets .background(DS.Color.surfaceWindow) so the padding area adapts to light/dark/HCR with the rest of the chrome.
  • Color.black fallback retained — already excluded from the no_color_black SwiftLint rule in the Relay target for the terminal canvas (Wave 2 rationale, carried through Wave 6).

Verification

  • swiftlint lint --strict — 0 violations in 201 files.
  • xcodebuild build -scheme Relay -destination 'platform=macOS,arch=arm64' CODE_SIGN_IDENTITY=- — BUILD SUCCEEDED.
  • Manual: launch Relay.app, open a Claude Code session, confirm the terminal is framed with breathing room and the status bar stays flush.

Test plan

  • Visually compare before/after in light + dark modes.
  • Toggle Reduce Transparency — window surface remains opaque.
  • Resize the window; terminal re-flows inside the padded frame without clipping rows.

🤖 Generated with Claude Code

Wrap TerminalViewRepresentable in a clipped rounded container with
DS.Spacing.md padding so the terminal no longer bleeds to the window
edges. DS.Color.surfaceWindow fills the surrounding chrome.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 18, 2026 03:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Frames the terminal canvas in the main agent session view so it no longer renders edge-to-edge, allowing the window chrome/surface color to show around the terminal for a less cramped feel.

Changes:

  • Wrapes the terminal content (and connecting-state Color.black fallback) in a clipped, rounded container and adds design-system padding.
  • Adds a window-surface background behind the terminal area so the padding region adapts correctly across appearance modes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Design-review feedback on PR #247:
- Padding DS.Spacing.md → xs: 16pt was too generous for a content canvas.
- Radius DS.Radius.md → sm: parent NSWindow rounds ~10pt; child surface
  reads as distinctly smaller.
- Surface DS.Color.surfaceWindow → surfaceContent: windowBackgroundColor
  is the default fill and was near no-op; controlBackgroundColor makes
  the frame read as a distinct chrome band.
- Drop Divider() between canvas and status bar; surface-contrast now
  carries the separation.
- Connecting-state fallback reads from EnvironmentValues.terminalTheme
  instead of literal Color.black, so users on light palettes no longer
  see a black flash during session startup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants