Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/mobile/src/features/threads/ThreadRouteScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -764,12 +764,12 @@ function ThreadRouteContent(
const renderThreadRouteBody = (showActionControls: boolean) => (
// A real flex host (not a fragment) keeps the thread body filling the
// screen so the absolute composer overlay anchors to the true bottom.
<View className="flex-1 bg-screen">
<View testID="thread-conversation-surface" className="flex-1 bg-screen" style={{ flex: 1 }}>
<ThreadGitControls {...threadGitControlProps} showActionControls={showActionControls} />

<GitActionProgressOverlay progress={gitActionProgress} onDismiss={dismissGitActionResult} />

<View className="flex-1">
<View className="flex-1" style={{ flex: 1 }}>
<ThreadDetailScreen
selectedThread={selectedThreadWithDraftSettings ?? selectedThread}
contentPresentation={contentPresentation}
Expand Down
29 changes: 29 additions & 0 deletions apps/mobile/src/mobileSurfaceExistence.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Existence contracts for mobile product surfaces that stack conflict
* resolution can accidentally leave structurally present but unrenderable.
*/
// @effect-diagnostics nodeBuiltinImport:off - existence contract reads source text on disk.
import * as NodeFS from "node:fs";
import * as NodePath from "node:path";
import * as NodeURL from "node:url";
import { describe, expect, it } from "vite-plus/test";

const root = NodePath.dirname(NodeURL.fileURLToPath(import.meta.url));

function readSrc(relativePath: string): string {
return NodeFS.readFileSync(NodePath.join(root, relativePath), "utf8");
}

describe("mobile surface existence (anti stack-drop)", () => {
it("keeps the conversation feed inside an explicit flex host", () => {
const threadRoute = readSrc("features/threads/ThreadRouteScreen.tsx");

expect(threadRoute).toContain('testID="thread-conversation-surface"');
expect(threadRoute).toMatch(
/testID="thread-conversation-surface"[\s\S]*?style=\{\{ flex: 1 \}\}/,
);
expect(threadRoute).toMatch(
/<View className="flex-1" style=\{\{ flex: 1 \}\}>[\s\S]*?<ThreadDetailScreen/,
);
});
});
Loading