Replace markdown pane with STTextView
Closed
LA
2mo ago+756+756+012345678901234567890123456789-236-236-012345678901234567890123456789
Replaces the markdown pane implementation with STTextView.
What changed:
- swaps the package dependency from MarkdownUI to STTextView
- renders markdown into a read-only STTextView surface
- keeps Ghostty font family, font size, and background/foreground colors
- enables line numbers in the markdown pane
- keeps link attributes and opens links on cmd-click
- adds focused unit coverage for renderer styling, theme application, and cmd-click link policy
Verification:
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux-unit -destination 'platform=macOS' -derivedDataPath /tmp/cmux-sttext-unit test -only-testing:cmuxTests/MarkdownPanelTextViewTests./scripts/reload.sh --tag sttext
Summary by cubic
Replaces the markdown pane with STTextView for native text rendering while keeping the Ghostty look and feel. Adds line numbers and cmd-click to open links, and removes MarkdownUI.
-
New Features
- Read-only
STTextViewmarkdown surface with Ghostty font, size, and colors. - Line numbers enabled; links keep attributes and open on cmd-click.
- Preserves scroll position on content/theme changes; adds focused tests for styling, theming, and link policy.
- Read-only
-
Dependencies
- Swap
MarkdownUI→STTextView(addsCoreTextSwiftandSTTextKitPlus). - Update Xcode project and
Package.resolved.
- Swap
Summary by CodeRabbit
-
Refactor
- Updated markdown panel rendering with improved text display component.
- Links in markdown panels now require Command modifier to open.
-
Tests
- Added comprehensive test coverage for markdown panel functionality.