Skip to content

Commit 9fdb85d

Browse files
authored
Merge branch 'main' into fix/claude-thinking-blocks
2 parents 5650c2e + 96bfa67 commit 9fdb85d

31 files changed

Lines changed: 296 additions & 309 deletions

‎.github/VOUCHED.td‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ github:jappyjan
3838
github:justsomelegs
3939
github:UtkarshUsername
4040
github:SunkenInTime
41+
github:bil0000

‎AGENTS.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ An empty database is a bad test. Seed your worktree's `.t3` with a copy of real
114114
- Never make a PR unless the developer explicitly asks you to do so.
115115
- Conventional commit titles, plain language: `fix(web): new threads no longer spike CPU`.
116116
- Body: the problem in a sentence or two, then how you fixed it. End with the model and harness that did the work.
117-
- **Rebase onto latest main before opening.** Stale branches conflict and burn a review round.
118117
- UI changes need before/after images. Motion or timing needs a short video.
119118
- One concern per PR. If the description says "also", split it.
120119
- When babysitting: poll checks and comments newer than the last push, verify each bot finding against the source, fix real ones, dismiss false positives with a written reason. Stay quiet when nothing is new. Stop when the bots are green on the latest commit.

‎apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.ios.tsx‎

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ import type { MarkdownNode } from "react-native-nitro-markdown/headless";
44

55
import { CopyTextButton } from "./CopyTextButton";
66
import { MarkdownTextPrimitive } from "./MarkdownTextPrimitive";
7-
import {
8-
nativeMarkdownDocumentRuns,
9-
nativeMarkdownListItemBlocks,
10-
nativeMarkdownTextRuns,
11-
} from "./nativeMarkdownText";
7+
import { nativeMarkdownDocumentRuns, nativeMarkdownListItemBlocks } from "./nativeMarkdownText";
128
import { NativeMarkdownSelectableText } from "./NativeMarkdownSelectableText.ios";
139
import type {
1410
MarkdownCodeHighlighter,
1511
MarkdownHighlightedToken,
1612
NativeMarkdownTextStyle,
13+
SelectableMarkdownSkill,
1714
} from "./SelectableMarkdownText.types";
1815

1916
type HighlightedCode = ReadonlyArray<ReadonlyArray<MarkdownHighlightedToken>>;
@@ -48,12 +45,13 @@ function documentFor(node: MarkdownNode): MarkdownNode {
4845

4946
function SelectableNode(props: {
5047
readonly node: MarkdownNode;
48+
readonly skills: ReadonlyArray<SelectableMarkdownSkill>;
5149
readonly textStyle: NativeMarkdownTextStyle;
5250
readonly onLinkPress?: (href: string) => void;
5351
}) {
5452
return (
5553
<NativeMarkdownSelectableText
56-
runs={nativeMarkdownDocumentRuns(documentFor(props.node))}
54+
runs={nativeMarkdownDocumentRuns(documentFor(props.node), props.skills)}
5755
textStyle={props.textStyle}
5856
onLinkPress={props.onLinkPress}
5957
/>
@@ -322,6 +320,7 @@ function collectTableRows(node: MarkdownNode): MarkdownNode[] {
322320

323321
function NativeTable(props: {
324322
readonly node: MarkdownNode;
323+
readonly skills: ReadonlyArray<SelectableMarkdownSkill>;
325324
readonly textStyle: NativeMarkdownTextStyle;
326325
readonly onLinkPress?: (href: string) => void;
327326
}) {
@@ -359,7 +358,7 @@ function NativeTable(props: {
359358
}}
360359
>
361360
<NativeMarkdownSelectableText
362-
runs={nativeMarkdownTextRuns(cell).map((run) =>
361+
runs={nativeMarkdownDocumentRuns(documentFor(cell), props.skills).map((run) =>
363362
rowIndex === 0 || cell.isHeader ? { ...run, bold: true } : run,
364363
)}
365364
textStyle={props.textStyle}
@@ -376,6 +375,7 @@ function NativeTable(props: {
376375

377376
function NativeMarkdownImage(props: {
378377
readonly node: MarkdownNode;
378+
readonly skills: ReadonlyArray<SelectableMarkdownSkill>;
379379
readonly textStyle: NativeMarkdownTextStyle;
380380
readonly onLinkPress?: (href: string) => void;
381381
}) {
@@ -384,6 +384,7 @@ function NativeMarkdownImage(props: {
384384
return (
385385
<SelectableNode
386386
node={props.node}
387+
skills={props.skills}
387388
textStyle={props.textStyle}
388389
onLinkPress={props.onLinkPress}
389390
/>
@@ -445,6 +446,7 @@ function inlineGroups(nodes: ReadonlyArray<MarkdownNode>): MarkdownNode[] {
445446

446447
function NativeMixedParagraph(props: {
447448
readonly node: MarkdownNode;
449+
readonly skills: ReadonlyArray<SelectableMarkdownSkill>;
448450
readonly textStyle: NativeMarkdownTextStyle;
449451
readonly onLinkPress?: (href: string) => void;
450452
}) {
@@ -455,13 +457,15 @@ function NativeMixedParagraph(props: {
455457
<NativeMarkdownImage
456458
key={nodeKey(child, index)}
457459
node={child}
460+
skills={props.skills}
458461
textStyle={props.textStyle}
459462
onLinkPress={props.onLinkPress}
460463
/>
461464
) : (
462465
<SelectableNode
463466
key={nodeKey(child, index)}
464467
node={child}
468+
skills={props.skills}
465469
textStyle={props.textStyle}
466470
onLinkPress={props.onLinkPress}
467471
/>
@@ -473,6 +477,7 @@ function NativeMixedParagraph(props: {
473477

474478
function NativeList(props: {
475479
readonly node: MarkdownNode;
480+
readonly skills: ReadonlyArray<SelectableMarkdownSkill>;
476481
readonly textStyle: NativeMarkdownTextStyle;
477482
readonly highlightCode: MarkdownCodeHighlighter;
478483
readonly onLinkPress?: (href: string) => void;
@@ -534,6 +539,7 @@ function NativeList(props: {
534539
<NativeMarkdownBlock
535540
key={nodeKey(child, childIndex)}
536541
node={child}
542+
skills={props.skills}
537543
textStyle={props.textStyle}
538544
highlightCode={props.highlightCode}
539545
onLinkPress={props.onLinkPress}
@@ -551,6 +557,7 @@ function NativeList(props: {
551557

552558
export function NativeMarkdownBlock(props: {
553559
readonly node: MarkdownNode;
560+
readonly skills: ReadonlyArray<SelectableMarkdownSkill>;
554561
readonly textStyle: NativeMarkdownTextStyle;
555562
readonly highlightCode: MarkdownCodeHighlighter;
556563
readonly onLinkPress?: (href: string) => void;
@@ -566,6 +573,7 @@ export function NativeMarkdownBlock(props: {
566573
<NativeMarkdownBlock
567574
key={nodeKey(child, index)}
568575
node={child}
576+
skills={props.skills}
569577
textStyle={props.textStyle}
570578
highlightCode={props.highlightCode}
571579
onLinkPress={props.onLinkPress}
@@ -587,6 +595,7 @@ export function NativeMarkdownBlock(props: {
587595
return (
588596
<NativeTable
589597
node={props.node}
598+
skills={props.skills}
590599
textStyle={props.textStyle}
591600
onLinkPress={props.onLinkPress}
592601
/>
@@ -595,6 +604,7 @@ export function NativeMarkdownBlock(props: {
595604
return (
596605
<NativeMarkdownImage
597606
node={props.node}
607+
skills={props.skills}
598608
textStyle={props.textStyle}
599609
onLinkPress={props.onLinkPress}
600610
/>
@@ -624,6 +634,7 @@ export function NativeMarkdownBlock(props: {
624634
<NativeMarkdownBlock
625635
key={nodeKey(child, index)}
626636
node={child}
637+
skills={props.skills}
627638
textStyle={props.textStyle}
628639
highlightCode={props.highlightCode}
629640
onLinkPress={props.onLinkPress}
@@ -637,6 +648,7 @@ export function NativeMarkdownBlock(props: {
637648
return (
638649
<NativeList
639650
node={props.node}
651+
skills={props.skills}
640652
textStyle={props.textStyle}
641653
highlightCode={props.highlightCode}
642654
onLinkPress={props.onLinkPress}
@@ -647,12 +659,14 @@ export function NativeMarkdownBlock(props: {
647659
return (props.node.children ?? []).some((child) => child.type === "image") ? (
648660
<NativeMixedParagraph
649661
node={props.node}
662+
skills={props.skills}
650663
textStyle={props.textStyle}
651664
onLinkPress={props.onLinkPress}
652665
/>
653666
) : (
654667
<SelectableNode
655668
node={props.node}
669+
skills={props.skills}
656670
textStyle={props.textStyle}
657671
onLinkPress={props.onLinkPress}
658672
/>
@@ -673,6 +687,7 @@ export function NativeMarkdownBlock(props: {
673687
>
674688
<SelectableNode
675689
node={props.node}
690+
skills={props.skills}
676691
textStyle={props.textStyle}
677692
onLinkPress={props.onLinkPress}
678693
/>
@@ -690,6 +705,7 @@ export function NativeMarkdownBlock(props: {
690705
<NativeMarkdownBlock
691706
key={nodeKey(child, index)}
692707
node={child}
708+
skills={props.skills}
693709
textStyle={props.textStyle}
694710
highlightCode={props.highlightCode}
695711
onLinkPress={props.onLinkPress}
@@ -703,6 +719,7 @@ export function NativeMarkdownBlock(props: {
703719
return (
704720
<SelectableNode
705721
node={props.node}
722+
skills={props.skills}
706723
textStyle={props.textStyle}
707724
onLinkPress={props.onLinkPress}
708725
/>

‎apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export function SelectableMarkdownText({
6969
chunk.kind === "rich" ? (
7070
<NativeMarkdownBlock
7171
node={chunk.node}
72+
skills={skills}
7273
textStyle={textStyle}
7374
highlightCode={highlightCode}
7475
onLinkPress={onLinkPress}

‎apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,22 @@ const EMPTY_CONTEXT: RunContext = {
7070

7171
const INLINE_HTML_TAG_PATTERN = /<\/?(?:kbd|mark|sub|sup|u)(?:\s[^>]*)?>/gi;
7272

73+
function decodeCodePoint(codePoint: number, entity: string): string {
74+
if (!Number.isInteger(codePoint) || codePoint < 0 || codePoint > 0x10ffff) {
75+
return entity;
76+
}
77+
return String.fromCodePoint(codePoint);
78+
}
79+
7380
function decodeHtmlEntitiesOnce(value: string): string {
7481
return value.replace(
7582
/&(?:#(\d+)|#x([0-9a-f]+)|amp|apos|gt|lt|nbsp|quot);/gi,
7683
(entity, decimal: string | undefined, hexadecimal: string | undefined) => {
7784
if (decimal) {
78-
return String.fromCodePoint(Number.parseInt(decimal, 10));
85+
return decodeCodePoint(Number.parseInt(decimal, 10), entity);
7986
}
8087
if (hexadecimal) {
81-
return String.fromCodePoint(Number.parseInt(hexadecimal, 16));
88+
return decodeCodePoint(Number.parseInt(hexadecimal, 16), entity);
8289
}
8390
switch (entity.toLowerCase()) {
8491
case "&amp;":
@@ -661,6 +668,7 @@ function appendDocumentBlock(
661668
function containsRichBlock(node: MarkdownNode): boolean {
662669
if (
663670
node.type === "code_block" ||
671+
node.type === "blockquote" ||
664672
node.type === "table" ||
665673
node.type === "image" ||
666674
node.type === "horizontal_rule" ||

‎apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3HeaderButtonView.kt‎

Lines changed: 0 additions & 97 deletions
This file was deleted.

‎apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3NativeControlsModule.kt‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,5 @@ class T3NativeControlsModule : Module() {
3232
?.resolve("t3-showcase-ready")
3333
?.writeText(scene)
3434
}
35-
36-
View(T3HeaderButtonView::class) {
37-
Prop("label") { view: T3HeaderButtonView, label: String ->
38-
view.setLabel(label)
39-
}
40-
Prop("systemImage") { view: T3HeaderButtonView, systemImage: String ->
41-
view.setSystemImage(systemImage)
42-
}
43-
44-
Events("onTriggered")
45-
}
4635
}
4736
}

0 commit comments

Comments
 (0)