Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The unresolved main-actor isolation issue can prevent the warnings-as-errors build from compiling.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds floating previews for built-in themes in the editor settings menus when hovered.
Changes:
- Adds palette data for built-in themes.
- Introduces reusable preview panels.
- Tracks native menu highlighting and positions previews.
Blocking critical finding: ThemeMenuPreview requires @MainActor isolation, or its controller initialization must move into an isolated initializer, to avoid strict-concurrency build failures.
File summaries
| File | Summary |
|---|---|
MarkEditMac/Sources/Settings/EditorSettingsView.swift |
Integrates menu tracking and preview positioning. |
MarkEditMac/Sources/Main/AppTheme.swift |
Defines preview palettes for built-in themes. |
MarkEditMac/Modules/Sources/SharedUI/ThemePreview.swift |
Provides configurable floating preview panels. |
MarkEditMac/Modules/Sources/SharedUI/MenuHighlightTracker.swift |
Reports highlighted native menu items. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
Theme preview positioning has an unresolved coordinate-system issue.
Review details
Suppressed comments (1)
MarkEditMac/Sources/Settings/EditorSettingsView.swift:250
accessibilityFrame()uses the accessibility screen coordinate system, whose y-axis is top-down, whileNSScreen.frame/visibleFrameandNSWindow.setFrameOriginuse AppKit's bottom-up screen coordinates. Passing this rect through unchanged makes the preview appear at the wrong vertical position (and can choose the wrong display on multi-monitor setups); convert the frame before both the screen lookup and placement.
rowFrame: item?.accessibilityFrame()
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
ab81de1 to
87f29dd
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
One or more issues must be addressed before approval.
Review details
Suppressed comments (1)
MarkEditMac/Modules/Sources/SharedUI/ThemePreview.swift:70
- After
rootViewis replaced,fittingSizeis read without forcing the hosting view to lay out. Since the panel is initially built with an empty preview, this can leave the first preview at a stale or zero size; the existingView.measuredSizehelper explicitly callsneedsLayoutandlayoutSubtreeIfNeeded()before readingfittingSize(MarkEditMac/Modules/Sources/TextCompletion/Extensions/View+Extension.swift:11-15). Flush the hosting view's layout before sizing the panel.
panel.setContentSize(previewView.fittingSize)
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
No description provided.