Follow-up from #28. The cycle was fixed by removing .textSelection(.enabled) from the agent Markdown view (MessageView, ChatView.swift), because MarkdownUI's layout + SwiftUI text selection on a large message form an AttributeGraph cycle.
What was lost: dragging to select part of an agent message's text (e.g. grabbing one line out of a reply). Whole-message copy still works (row-select + Cmd-C / context menu), and text selection on user + system messages is unaffected.
Goal: restore in-bubble partial text selection for agent (Markdown) messages without reintroducing the cycle. Candidate approaches, all uncertain:
- Bump MarkdownUI to a version where the textSelection layout cycle is fixed (verify with cycle count → 0).
- A custom selectable text/code view for the markdown content.
- Selection scoped to code blocks only (which is where partial-copy matters most), avoiding the whole-message selection layout.
Acceptance: partial text selection works in agent bubbles AND a large-agent-message click produces 0 AttributeGraph cycles.
Follow-up from #28. The cycle was fixed by removing
.textSelection(.enabled)from the agentMarkdownview (MessageView, ChatView.swift), because MarkdownUI's layout + SwiftUI text selection on a large message form an AttributeGraph cycle.What was lost: dragging to select part of an agent message's text (e.g. grabbing one line out of a reply). Whole-message copy still works (row-select + Cmd-C / context menu), and text selection on user + system messages is unaffected.
Goal: restore in-bubble partial text selection for agent (Markdown) messages without reintroducing the cycle. Candidate approaches, all uncertain:
Acceptance: partial text selection works in agent bubbles AND a large-agent-message click produces 0 AttributeGraph cycles.