feat(chat): add switchable markdown rendering and refine sync job tracking#32
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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
RxCodeChatKitand routed markdown preview to useMarkdownContentView. - 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 { |
9c0beee to
8bf9bcf
Compare
8bf9bcf to
fd7f7c8
Compare
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>
a8cb8bd to
dcb4705
Compare
Contributor
Author
|
🎉 This PR is included in version 1.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MarkdownContentViewthat can switch between the Textual and MarkdownUI renderers based on a setting inRxCodeChatKitSettings, 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-uipackage 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
MobileSyncServiceby 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.