Skip to content

feat(chat): add switchable markdown rendering and refine sync job tracking#32

Merged
sirily11 merged 3 commits into
mainfrom
scrolling-performance-fix
May 20, 2026
Merged

feat(chat): add switchable markdown rendering and refine sync job tracking#32
sirily11 merged 3 commits into
mainfrom
scrolling-performance-fix

Conversation

@sirily11
Copy link
Copy Markdown
Contributor

This pull request introduces a new, switchable Markdown rendering system in RxCodeChatKit, allowing users to choose between the existing Textual renderer and the new Swift MarkdownUI renderer. It also updates dependencies and refines job tracking logic in mobile sync services. The most important changes are as follows:

Markdown Rendering System

  • Added a new MarkdownContentView that can switch between the Textual and MarkdownUI renderers based on a setting in RxCodeChatKitSettings, and implemented a custom MarkdownUI-based renderer with RxCode-specific theming and code block UI. (Packages/Sources/RxCodeChatKit/MarkdownView.swift, Packages/Sources/RxCodeChatKit/Settings.swift) [1] [2] [3] [4] [5] [6] [7] [8]

  • Added the swift-markdown-ui package as a dependency and integrated it into the build configuration. (Packages/Package.swift, Packages/Package.resolved, RxCode.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved) [1] [2] [3] [4] [5] [6] [7]

Mobile Sync Service Improvements

  • Enhanced job tracking in MobileSyncService by updating or removing previous jobs when a session ID changes, ensuring accurate job state and UI updates. (RxCode/Services/MobileSyncService.swift) [1] [2]

These changes make Markdown rendering more flexible and visually consistent, while improving job tracking reliability during session transitions.

Copilot AI review requested due to automatic review settings May 20, 2026 18:53
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
rxcode Ready Ready Preview, Comment May 20, 2026 7:43pm

Request Review

@sirily11 sirily11 enabled auto-merge (squash) May 20, 2026 18:53
@autopilot-project-manager autopilot-project-manager Bot changed the title fix: duplicate activity items and improve desktop scrolling feat(chat): add switchable markdown rendering and refine sync job tracking May 20, 2026
@autopilot-project-manager autopilot-project-manager Bot added bug Something isn't working enhancement New feature or request labels May 20, 2026
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

This PR modernizes markdown rendering across the macOS app by switching the preview UI to RxCodeChatKit and introducing a new MarkdownUI-backed renderer option, while also tightening mobile session/job tracking during session redirects to reduce duplicate activity items.

Changes:

  • Added a MarkdownUI-based markdown renderer to RxCodeChatKit and routed markdown preview to use MarkdownContentView.
  • Updated job/session redirect handling in mobile state + desktop sync service to keep job tracking consistent when session IDs change.
  • Updated SwiftPM dependencies/resolution to include swift-markdown-ui (and transitive pins).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
RxCodeWidget/RxCodeJobActivity.swift Adds secondary deduplication logic for Live Activity job display.
RxCodeMobile/State/MobileAppState.swift Removes redirected “previous session” rows from the sessions list.
RxCode/Views/Sidebar/MarkdownPreviewView.swift Replaces WKWebView HTML rendering with SwiftUI MarkdownContentView in a ScrollView.
RxCode/Services/MobileSyncService.swift Updates job tracking to migrate/clear tracked jobs when previousSessionID changes.
RxCode.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Adds new pins for MarkdownUI and transitive dependencies for the Xcode workspace resolver.
Packages/Sources/RxCodeChatKit/Settings.swift Introduces renderer selection types/default.
Packages/Sources/RxCodeChatKit/MarkdownView.swift Implements renderer switching + new MarkdownUI theming and code-block UI.
Packages/Package.swift Adds swift-markdown-ui dependency and links MarkdownUI into RxCodeChatKit.
Packages/Package.resolved Updates package resolution to include MarkdownUI and transitive pins.

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

Comment on lines +69 to +77
var displayIdentity: String {
[
phase.rawValue,
projectName,
title,
"\(todoDone)/\(todoTotal)",
currentStep ?? "",
].joined(separator: "\u{1F}")
}
Comment on lines +1 to +3
enum RxCodeChatKitSettings {
static let markdownRenderer: MarkdownRendererKind = .markdownUI
}
Comment on lines +21 to +35
public var body: some View {
switch RxCodeChatKitSettings.markdownRenderer {
case .textual:
TextualMarkdownContentView(
text: text,
showsTrailingCursor: showsTrailingCursor,
isCursorVisible: isCursorVisible
)
case .markdownUI:
MarkdownUIMarkdownContentView(
text: text,
showsTrailingCursor: showsTrailingCursor,
isCursorVisible: isCursorVisible
)
}
Comment on lines 98 to +104
ordered.append(job)
}
}
return ordered

var visible: [Job] = []
var indicesByDisplay: [String: Int] = [:]
for job in ordered {
PlanSheetView.planBody renders the plan markdown through MarkdownUI.
ViewInspector's findAll(ViewType.Text.self) crashes ("Index out of
range") while traversing the MarkdownUI view tree, which made
testSheet_decidedPlan_showsSummaryAndHidesButtons and
testSheet_sendFeedbackFromComposer_dispatchesRejectWithFeedback fail
the test plan.

Those two tests only assert on the sheet chrome (decision buttons,
footer, feedback composer), never the rendered body. Build their plans
with empty markdown so planBody renders its plain Text fallback,
keeping the inspected view tree fully traversable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sirily11 sirily11 force-pushed the scrolling-performance-fix branch from a8cb8bd to dcb4705 Compare May 20, 2026 19:43
@sirily11 sirily11 enabled auto-merge (squash) May 20, 2026 19:43
@sirily11 sirily11 merged commit 4ff879a into main May 20, 2026
6 checks passed
@sirily11 sirily11 deleted the scrolling-performance-fix branch May 20, 2026 19:47
@sirily11
Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

bug Something isn't working enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants