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
23 changes: 23 additions & 0 deletions .github/workflows/closura-arc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
vp run --filter @t3tools/client-runtime typecheck
vp run --filter @t3tools/provider-core typecheck
vp run --filter t3 typecheck
vp run --filter @t3tools/mobile typecheck

- name: Test AssemblyAI dictation, native inbox and thread placement behavior
shell: bash
Expand All @@ -162,6 +163,28 @@ jobs:
apps/web/src/lib/attachmentUploadQueue.test.ts \
apps/server/src/ws.test.ts

- name: Test mobile new-task placement, outbox and uploads
shell: bash
working-directory: apps/mobile
run: |
set -euo pipefail
vp test run \
src/state/thread-placement.model.test.ts \
src/state/threadOutboxDelivery.placement.test.ts \
src/state/composer-attachment-uploads.test.ts \
src/lib/composerAttachmentUploadQueue.test.ts \
src/lib/attachmentUpload.test.ts \
src/state/use-composer-drafts.test.ts \
src/state/thread-outbox.test.ts \
src/state/threadOutboxDelivery.permissions.test.ts \
src/state/threadOutboxDelivery.test.ts \
src/state/pending-thread-creation.test.ts \
src/lib/projectThreadStartTurn.test.ts \
src/features/threads/thread-route-state.test.ts \
src/features/threads/new-task-flow-provider.test.tsx \
src/features/home/pendingTaskRoute.test.tsx \
src/features/threads/NewTaskDraftRouteScreen.test.tsx

- name: Build native T3 server
shell: bash
run: vp run --filter t3 build:bundle
Expand Down
12 changes: 8 additions & 4 deletions apps/mobile/src/Stack.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { isDraftThreadRoute } from "./features/threads/thread-route-state";
import {
explicitDraftRouteEntry,
isDraftThreadRoute,
type NewTaskDraftRouteParams,
} from "./features/threads/thread-route-state";
import { ComponentCatalogScreen } from "./features/development/ComponentCatalogScreen";
import { PullRequestGuideStopScreen } from "./features/pull-requests/guide/PullRequestGuideScreen";
import { PullRequestInlineCommentScreen } from "./features/pull-requests/PullRequestInlineCommentScreen";
Expand Down Expand Up @@ -399,9 +403,8 @@ function RootStackLayout(props: {
const draftRouteOnTop =
draftRoute !== undefined &&
props.state.routes.findLast((route) => route.name === "Thread") === draftRoute;
const draftParams = (
draftRoute?.params as { draft?: { draftId?: string | string[] } } | undefined
)?.draft;
const draftParams = (draftRoute?.params as { draft?: NewTaskDraftRouteParams } | undefined)
?.draft;
const routeDraftId = Array.isArray(draftParams?.draftId)
? draftParams.draftId[0]
: draftParams?.draftId;
Expand All @@ -411,6 +414,7 @@ function RootStackLayout(props: {
active={draftRouteOnTop}
flowKey={draftRoute === undefined ? undefined : newTaskFlowKey(draftRoute)}
routeDraftId={routeDraftId}
routeEntry={explicitDraftRouteEntry(draftParams)}
>
<HardwareKeyboardCommandProvider pathname={pathname}>
<ShowcaseReadyMarker />
Expand Down
9 changes: 2 additions & 7 deletions apps/mobile/src/features/home/HomeRouteScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { uuidv4 } from "../../lib/uuid";
import { threadBranchDraftParams } from "../threads/thread-route-state";
import { ThreadUndoNotice } from "./ThreadUndoNotice";
import { use } from "react";
import { NativePrimaryColumnContext } from "../../native/v5-workspace-context";
Expand Down Expand Up @@ -79,13 +80,7 @@ export function HomeRouteScreen() {
selectThreadRoute({ environmentId: String(thread.environmentId), threadId: String(thread.id) });
const handleNewThreadOnBranch = (thread: EnvironmentThreadShell) => {
selectThreadRoute({
draft: {
requestId: uuidv4(),
environmentId: String(thread.environmentId),
projectId: String(thread.projectId),
branch: thread.branch,
worktreePath: thread.worktreePath,
},
draft: threadBranchDraftParams(thread, uuidv4()),
});
};

Expand Down
Loading
Loading