Skip to content

Commit f86d466

Browse files
juliusmarmingecodex
andcommitted
Enhance mobile review comments with diff previews
- Add syntax-highlighted diff rendering and cached review state - Support pasted/attached images in review comments - Improve mobile review sheet handling for large or partial diffs Co-authored-by: codex <codex@users.noreply.github.com>
1 parent 78a95fb commit f86d466

17 files changed

+1567
-575
lines changed

.oxfmtrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/routeTree.gen.ts",
1212
"apps/web/public/mockServiceWorker.js",
1313
"apps/web/src/lib/vendor/qrcodegen.ts",
14-
"apps/mobile/uniwind-types.d.ts"
14+
"apps/mobile/uniwind-types.d.ts",
1515
"*.icon/**"
1616
],
1717
"sortPackageJson": {}

apps/mobile/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"react-native-reanimated": "4.2.1",
7474
"react-native-safe-area-context": "~5.6.2",
7575
"react-native-screens": "~4.23.0",
76+
"react-native-shiki-engine": "^0.3.9",
7677
"react-native-svg": "15.15.3",
7778
"react-native-worklets": "0.7.2",
7879
"shiki": "^4.0.2",

apps/mobile/src/app/threads/[environmentId]/[threadId]/_layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default function ThreadLayout() {
4646
options={{
4747
animation: "slide_from_right",
4848
contentStyle: sheetStyle,
49+
headerBackButtonDisplayMode: "minimal",
4950
headerShown: true,
5051
headerTitle: "Files changed",
5152
headerBackTitle: "",

apps/mobile/src/components/ComposerAttachmentStrip.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export interface ComposerAttachmentStripProps {
1515
readonly imageSize?: number;
1616
/** Border radius of each image thumbnail. Defaults to 16. */
1717
readonly imageBorderRadius?: number;
18+
/** Whether the remove button should sit in its own gutter instead of overlapping the image. */
19+
readonly removeButtonPlacement?: "overlay" | "gutter";
1820
}
1921

2022
/**
@@ -25,6 +27,8 @@ export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) {
2527
const subtleBg = useThemeColor("--color-subtle");
2628
const size = props.imageSize ?? 72;
2729
const radius = props.imageBorderRadius ?? 16;
30+
const removeButtonPlacement = props.removeButtonPlacement ?? "overlay";
31+
const removeButtonGutter = removeButtonPlacement === "gutter" ? 10 : 0;
2832

2933
if (props.attachments.length === 0) {
3034
return null;
@@ -39,7 +43,14 @@ export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) {
3943
>
4044
<View style={{ flexDirection: "row", gap: 10 }}>
4145
{props.attachments.map((image) => (
42-
<View key={image.id} style={{ position: "relative" }}>
46+
<View
47+
key={image.id}
48+
style={{
49+
position: "relative",
50+
paddingTop: removeButtonGutter,
51+
paddingRight: removeButtonGutter,
52+
}}
53+
>
4354
<Pressable
4455
onPress={props.onPressImage ? () => props.onPressImage!(image.previewUri) : undefined}
4556
>
@@ -57,8 +68,8 @@ export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) {
5768
<Pressable
5869
style={{
5970
position: "absolute",
60-
top: 4,
61-
right: 4,
71+
top: removeButtonPlacement === "gutter" ? 0 : 4,
72+
right: removeButtonPlacement === "gutter" ? 0 : 4,
6273
width: 22,
6374
height: 22,
6475
borderRadius: 11,

0 commit comments

Comments
 (0)