Skip to content

feat: terminal padding and thin scroll indicator - #47

Merged
bgultekin merged 2 commits into
mainfrom
feat/terminal-padding
May 7, 2026
Merged

bgultekin merged 2 commits into
mainfrom
feat/terminal-padding

Conversation

@bgultekin

Copy link
Copy Markdown
Owner

Summary

  • Add 4pt top / 8pt side and bottom padding around terminal content so text isn't flush against card edges
  • Replace SwiftTerm's built-in legacy scroller with a 3px CALayer indicator pinned to the right edge
  • Scroll indicator is hidden when there is no scrollback content, visible only when needed
  • Indicator position updates on all scroll events via scrolled(source:position:) and scrolled(source:yDisp:) overrides

Test plan

  • Open the drawer and verify terminal text has visible padding from the card edges
  • Run a command that produces many lines of output to build up scrollback
  • Scroll up — confirm the thin indicator appears and tracks position correctly
  • Scroll back to bottom — confirm the indicator disappears when at the bottom with no scrollback
  • Verify light and dark themes both look correct

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented May 7, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@bgultekin has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 12 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c254e00b-b639-4ccf-b80a-3740d90b0920

📥 Commits

Reviewing files that changed from the base of the PR and between cf5112c and 4d043c3.

📒 Files selected for processing (3)
  • macos/Sources/Ocak/Terminal/OcakTerminalView.swift
  • macos/Sources/Ocak/Views/SessionListView.swift
  • macos/Sources/Ocak/Views/TerminalPaneView.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/terminal-padding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

bgultekin and others added 2 commits May 7, 2026 11:32
- Add 4/8pt inset padding around terminal content in TerminalPaneView
- Replace SwiftTerm's built-in scroller with a 3px CALayer indicator
- Show scroll indicator only when there is scrollback content
- Update indicator position on all scroll events via scrolled() overrides

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use NSColor.secondaryLabelColor for scroll indicator so it adapts to
  light and dark terminal themes instead of hardcoded white
- Cache NSScroller reference during setup to avoid subview scan on
  every scroll event
- Set zPosition = 1000 on indicator layer to stay above SwiftTerm's
  internal sublayers
- Remove extra blank line before SessionDragPreview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bgultekin
bgultekin force-pushed the feat/terminal-padding branch from a76d52c to 4d043c3 Compare May 7, 2026 08:35
@bgultekin
bgultekin marked this pull request as ready for review May 7, 2026 08:35
@bgultekin
bgultekin merged commit f2328c6 into main May 7, 2026
2 checks passed
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.

1 participant