You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking the evaluation of upstream off-grid-ai#358 ("text selection + code copy") for the fork. The merge was resolved and reviewed but parked pending product decisions — this issue records what it is, what's done, and what blocks it.
Enables native text selection in chat messages (long-press + drag, including across paragraphs) and a per-code-block Copy button.
Mechanism: swaps the markdown renderer @ronradtke/react-native-markdown-display → react-native-enriched-markdown (a Fabric / New-Architecture native C renderer), and replaces the message-bubble TouchableOpacity wrapper with View (the TouchableOpacity was intercepting selection gestures).
Evaluation status
The merge onto the fork was resolved cleanly and adversarially reviewed. Resolutions verified correct: dropping the bare react-native-fs re-add (fork uses @dr.pogodin/react-native-fs via shim), taking-ours for ChatScreen (PR's debug-logs drift was unrelated), and the onRemember + text-selection auto-merge. Fixes already applied and staged: setTimeout cleanup leak, removed the now-dead @ronradtke dep, and a jest mock for the native renderer (cleared 31 of 46 broken tests).
The work is staged, uncommitted, not pushed in worktree feat/text-selection-code-copy.
Open decisions (why it's parked)
GFM tables regress vs cross-paragraph selection (the core trade-off). react-native-enriched-markdown defaults to flavor="commonmark" = single-TextView → enables the cross-paragraph selection that is the feature's headline, but renders pipe tables as raw | a | b | text. flavor="github" restores tables but is container-based → likely reintroduces the per-block selection boundary the PR set out to remove. Pick one: selection (commonmark) or tables (github).
UX change: long-press no longer opens the action menu.
~13 ChatMessage tests fail because they open the Copy/Regenerate/Edit menu via long-press, which Feat/text selection code copy off-grid-ai/OGAM#358 repurposes to text-selection (menu moves to the ••• button). Updating those tests bakes in that behavior change — needs sign-off.
Native rebuild required. The renderer is a Fabric/New-Arch native module → pod install + a fresh iOS/Android build to run at all (JS reload crashes with "unregistered component").
To resume
Decide (1) commonmark-vs-github and (2) whether the long-press→selection UX change is wanted, then finish the ~15 test updates and do a native build to verify. Depends on the onRemember tsc break on main being resolved first (unrelated in-flight feature).
Tracking the evaluation of upstream off-grid-ai#358 ("text selection + code copy") for the fork. The merge was resolved and reviewed but parked pending product decisions — this issue records what it is, what's done, and what blocks it.
What off-grid-ai#358 does
@ronradtke/react-native-markdown-display→react-native-enriched-markdown(a Fabric / New-Architecture native C renderer), and replaces the message-bubbleTouchableOpacitywrapper withView(the TouchableOpacity was intercepting selection gestures).Evaluation status
The merge onto the fork was resolved cleanly and adversarially reviewed. Resolutions verified correct: dropping the bare
react-native-fsre-add (fork uses@dr.pogodin/react-native-fsvia shim), taking-ours forChatScreen(PR's debug-logs drift was unrelated), and theonRemember+ text-selection auto-merge. Fixes already applied and staged:setTimeoutcleanup leak, removed the now-dead@ronradtkedep, and a jest mock for the native renderer (cleared 31 of 46 broken tests).The work is staged, uncommitted, not pushed in worktree
feat/text-selection-code-copy.Open decisions (why it's parked)
GFM tables regress vs cross-paragraph selection (the core trade-off).
react-native-enriched-markdowndefaults toflavor="commonmark"= single-TextView → enables the cross-paragraph selection that is the feature's headline, but renders pipe tables as raw| a | b |text.flavor="github"restores tables but is container-based → likely reintroduces the per-block selection boundary the PR set out to remove. Pick one: selection (commonmark) or tables (github).UX change: long-press no longer opens the action menu.
~13
ChatMessagetests fail because they open the Copy/Regenerate/Edit menu via long-press, which Feat/text selection code copy off-grid-ai/OGAM#358 repurposes to text-selection (menu moves to the•••button). Updating those tests bakes in that behavior change — needs sign-off.Native rebuild required. The renderer is a Fabric/New-Arch native module →
pod install+ a fresh iOS/Android build to run at all (JS reload crashes with "unregistered component").To resume
Decide (1) commonmark-vs-github and (2) whether the long-press→selection UX change is wanted, then finish the ~15 test updates and do a native build to verify. Depends on the
onRemembertsc break onmainbeing resolved first (unrelated in-flight feature).Refs: upstream off-grid-ai#358