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
10 changes: 6 additions & 4 deletions FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ migrations after upstream migrations.

97. Mobile's timeline delegate and queue-row formatter, the mobile half of case 7 and case 24 ([#699](https://github.com/Jacksondr5/j5code/issues/699), register D38). `apps/mobile/src/features/threads/ThreadFeed.tsx` imports J5-owned `apps/mobile/src/j5/a2a/timeline.tsx`. `ThreadFeed` calls `useJ5Timeline` (J5-owned `apps/mobile/src/j5/a2a/timelineState.ts`, kept apart because it reaches the connection) over its feed's messages: the reader's person id from `j5Sharing.connectionAccess`, and one identity read (`useParticipantIdentities`) for the senders the shared classifier names. It passes the result to `renderFeedEntry` as `j5Timeline`, adds it to `listAppearanceData`, and `getItemType` reads `resolveJ5FeedMessage` so rows J5 folds share upstream's agent recycling pool. In `renderFeedEntry`, `resolveJ5FeedMessage(message, props.j5Timeline)` replaces upstream's `resolveUserMessagePresentation`: upstream's shape with the letter without its envelope as `text`, `"agent"` for every participant who is not a person, `j5`, `side` and `preview`. Before upstream's rows, `renderJ5TimelineNotice` returns J5's silence line, or the labelled raw card for a Crew notice or a delivery notice no parser reads yet, until [#698](https://github.com/Jacksondr5/j5code/issues/698). The user row is `items-start` when `side` is `"left"`, mounts `J5MessageAuthorLine` above the bubble ("You · via Inbox", another person's name, or the sender's identity line with its tag or badge), passes `AgentMessageFoldHeader` its `label` and `summary` through J5-owned `j5FoldHeader` when J5 read the message: folded, an empty `label` (a new optional prop) and J5's `preview`; open, the sender's name and no summary when the body opens with it (a Crew seat's brief keeps it). The header renders the summary only when it is not empty, and its label then takes the row's width with `flex-1`, so the chevron stays at the end (web's shape in pingdotgg/t3code#29373, whose mobile half hides the summary whenever the row is open and uses `shrink`), opens the sender with `J5OpenSenderThread` (the identity read's thread, on this server or a peer, or a brief's spawner thread) where upstream's `OpenSenderThreadButton` reads only `senderThreadId`, and leaves the composer-context copy to upstream's plain copy for a message J5 unwrapped, so Copy never carries the envelope. `apps/mobile/src/features/threads/ThreadQueueControl.tsx`, which upstream rewrote at v0.1.7 with a compact sender line per row (`QueuedRunSender`), imports `useJ5QueuedDeliveries` from J5-owned `apps/mobile/src/j5/a2a/queuedDelivery.tsx` (Jackson's decision 15 of 2026-11-05). For a queued J5 delivery the row's text is the letter's first line (`preview`) and its sender line is J5's (`sender`): the participant's name with the Automation, Outside agent, Expects reply or Replied tag, or "You · via Inbox" or "<name> · via Inbox" for an Inbox reply, through the pure `presentJ5QueuedMessage` in `timelinePresentation.ts`. Anything J5 did not unwrap keeps upstream's `QueuedRunSender`, and J5's old `From <sender>:` prefix is gone. "Sent by T3 Code" reads "Sent by J5 Code". The mobile queue sheet has no sides. `apps/mobile/src/lib/filePreview.test.ts`, which renders `ThreadFeed` with upstream's state modules mocked, mocks `timelineState.ts` beside them. Proofs: `apps/mobile/src/j5/a2a/timelinePresentation.test.ts`, `packages/client-runtime/src/j5/participantIdentity.test.ts`, and the files' rows in `apps/mobile/src/j5/upstreamSeams.test.ts`. On every rebase, keep the calls that test lists; if upstream moves the agent fold out of `renderFeedEntry`, move the seam with it.

98. Mobile reads artifacts ([#833](https://github.com/Jacksondr5/j5code/issues/833)), landing two reserved mobile seams. Route registration: `apps/mobile/src/Stack.tsx` imports J5-owned `j5ThreadArtifactRoutes` (`apps/mobile/src/j5/artifacts/routes.ts`) and spreads it after `ThreadFile`, adding the thread-scoped `ThreadArtifacts` list and `ThreadArtifact` viewer (`apps/mobile/src/j5/artifacts/ThreadArtifactsScreen.tsx`), read-only, with no delete. Link resolver: `onMarkdownLinkPress` in `apps/mobile/src/features/threads/ThreadFeed.tsx` makes one call to J5-owned `openArtifactLink` before its thread, media and file branches, so an `artifacts/…` link opens the viewer instead of a missing workspace file; its `fileContextMenu` and `onFileContextMenuAction` each make one call first (`artifactLinkContextMenu`, `onArtifactLinkMenuAction`), so an artifact link's long press offers Open artifact and Copy path instead of workspace-file actions. Links inside a Markdown artifact go through the same helpers in the J5 viewer. Recognition, preview kind and the HTTP read are shared with web in `packages/client-runtime/src/j5/artifacts.ts`. No upstream entry point reaches the list yet; it is one tap from any opened artifact.
98. Mobile reads artifacts ([#833](https://github.com/Jacksondr5/j5code/issues/833)), landing two reserved mobile seams. Route registration: `apps/mobile/src/Stack.tsx` imports J5-owned `j5ThreadRoutes` (`apps/mobile/src/j5/threadRoutes.ts`) and spreads it after `ThreadFile`, adding the thread-scoped `ThreadArtifacts` list and `ThreadArtifact` viewer (`apps/mobile/src/j5/artifacts/ThreadArtifactsScreen.tsx`), read-only, with no delete; since case 114 it also registers the `ThreadCrewProposal` review screen. Link resolver: `onMarkdownLinkPress` in `apps/mobile/src/features/threads/ThreadFeed.tsx` makes one call to J5-owned `openArtifactLink` before its thread, media and file branches, so an `artifacts/…` link opens the viewer instead of a missing workspace file; its `fileContextMenu` and `onFileContextMenuAction` each make one call first (`artifactLinkContextMenu`, `onArtifactLinkMenuAction`), so an artifact link's long press offers Open artifact and Copy path instead of workspace-file actions. Links inside a Markdown artifact go through the same helpers in the J5 viewer. Recognition, preview kind and the HTTP read are shared with web in `packages/client-runtime/src/j5/artifacts.ts`. No upstream entry point reaches the list yet; it is one tap from any opened artifact.

99. Mobile's shared conversations show who wrote each message and who answered each prompt, the mobile half of case 80 ([#832](https://github.com/Jacksondr5/j5code/issues/832), register D33, Shared conversations AC9 to AC11, AC14 and AC16). The record and its change feed are `threadAuthors` and `threadAuthorsChanges` in `packages/client-runtime/src/j5/sharing.ts`, beside who reaches the thread (`scopePeople` and `scopePeopleChanges`), which says the thread is shared before any author is recorded (`mayBeSharedConversation`, [#871](https://github.com/Jacksondr5/j5code/issues/871)); and the reading of it (`sharedMessageView`, the typed text, the answers without their mark, the search label) is `packages/client-runtime/src/j5/sharedConversation.ts`, both shared with web. `apps/mobile/src/features/threads/ThreadRouteScreen.tsx` imports `useSharedConversationFeed` from J5-owned `apps/mobile/src/j5/sharing/sharedConversation.tsx` and passes its answer as `ThreadDetailScreen`'s `selectedThreadFeed` in place of `composer.selectedThreadFeed`: an authored message shows as typed, after its note to the agent as a muted line that opens (drawn by case 97's `renderJ5TimelineNotice`), a message whose author is not read yet is held back or shown as this client typed it, and a question's answers lose the platform's `[Answer from …]` mark. Case 97's `useJ5Timeline` also reads the record, so `resolveJ5FeedMessage` puts another person's message on the left and `J5MessageAuthorLine` names them, or says who edited the reader's own. `apps/mobile/src/features/threads/thread-work-log.tsx` mounts `PromptAnswerTail` after a work row's label: a question's answer and who gave it (" · answered by Priya", on an approval too), outside the label so the question truncates first. An answered question's opened row no longer draws the raw item JSON beneath its question and answer, as web draws neither ([#891](https://github.com/Jacksondr5/j5code/issues/891)). `apps/mobile/src/features/threads/ThreadQueueControl.tsx` reads its rows through `useSharedQueuedRuns` where it builds `queuedRuns`, ahead of case 97's hook, so a queued message's row and the text an edit loads are the words typed. `apps/mobile/src/features/threads/thread-search-match.tsx` labels a hit with `threadSearchMatchLabel` instead of "You:" for every user-role hit. `apps/mobile/src/lib/filePreview.test.ts` mocks `sharedConversation.tsx` as it mocks case 97's `timelineState.ts`. Proofs: `apps/mobile/src/j5/sharing/sharedConversationFeed.test.ts`, `apps/mobile/src/j5/a2a/timelinePresentation.test.ts`, `packages/client-runtime/src/j5/sharedConversation.test.ts`, `packages/client-runtime/src/j5/threadSearchMatchLabel.test.ts`, and the four files' rows in `apps/mobile/src/j5/upstreamSeams.test.ts`. On every rebase, keep the calls that test lists.

Expand Down Expand Up @@ -549,6 +549,8 @@ migrations after upstream migrations.

113. Metro doesn't watch a worktree's `.j5code` folder ([#964](https://github.com/Jacksondr5/j5code/issues/964)). `apps/mobile/metro.config.js` watches the whole workspace and blocks only upstream's `.t3` state folder. J5's dev and test homes live in `.j5code`, so every server write there reached Metro's watcher and showed React Native's "Refreshing…" banner. One more `blockList` entry, beside upstream's, blocks it. Release bundles also go through Metro, but nothing the app imports lives in `.j5code`, so the entry only changes what the dev watcher reacts to. On a pin advance: if upstream moves or renames its `.t3` entry, keep `.j5code` beside it.

114. Mobile roster review for a Captain's Crew proposal ([#836](https://github.com/Jacksondr5/j5code/issues/836), Jackson's decisions 1 and 2 of 2026-11-07/08: a phone approves, declines and removes seats, showing each seat's access; other edits stay on web). `apps/mobile/src/features/threads/ThreadDetailScreen.tsx` mounts J5-owned `J5ComposerControls` (`apps/mobile/src/j5/composer/`) beside case 49's `PlaybookComposerControl`, under the same conditions; every J5 row above the composer joins there, not as another seam. Its first row, `CrewRosterStrip` (`apps/mobile/src/j5/crew/`), shows one row per open, human-approved proposal for the thread and opens the `ThreadCrewProposal` screen, which case 98's `j5ThreadRoutes` spread registers. The gate filter, seat lines, playbook notes and preview binding live in `packages/client-runtime/src/j5/crewProposals.ts` (a new `./j5/crew-proposals` export in `packages/client-runtime/package.json`), shared with web's card; approval sends only the token from a complete preview of the seats on screen.

## Pin and upstream advance runbook

Current pin: `322f6544dfad0a3c8a0c8cbecf2c7f7874b14268`, upstream's stable release tag `v0.1.7` on `main` (released 2026-11-04, frozen 2026-11-07). The previous pin was `d2c440312e5f39d59827ed466838a623516454d6`, upstream's stable release tag `v0.1.3`.
Expand Down Expand Up @@ -763,12 +765,12 @@ explicitly marked.
| `apps/mobile/metro.config.js` | A | 113 |
| `apps/mobile/package.json` | A | B, 45 |
| `apps/mobile/src/features/threads/NewTaskDraftScreen.tsx` | A | 45, 90, 100, Saved-agent mentions |
| `apps/mobile/src/features/threads/ThreadDetailScreen.tsx` | A | 45, 49 |
| `apps/mobile/src/features/threads/ThreadDetailScreen.tsx` | A | 45, 49, 114 |
| `apps/mobile/src/features/threads/ThreadRouteScreen.tsx` | A | 69, 90, 99 |
| `apps/mobile/src/features/settings/SettingsRouteScreen.tsx` | A | 72, Role library, 105 |
| `apps/mobile/src/features/settings/components/SettingsScreen.tsx` | N | 72 |
| `apps/mobile/src/features/settings/settings-environment-filter.tsx` | N | 72 |
| `apps/mobile/src/Stack.tsx` | A | 72, 98, 101, 103, Role library, 105 |
| `apps/mobile/src/Stack.tsx` | A | 72, 98, 101, 103, Role library, 105, 114 |
| `apps/mobile/src/features/home/ThreadListToolbar.tsx` | N | 102 |
| `apps/mobile/src/features/workspace/WorkspaceToolbar.ios.tsx` | N | 102 |
| `apps/mobile/src/features/archive/ArchivedThreadsRouteScreen.tsx` | N | 72 |
Expand Down Expand Up @@ -935,7 +937,7 @@ explicitly marked.
| `apps/web/src/routeTree.gen.ts` | R | generated route registrations for 6/9 |
| `apps/web/src/components/onboarding/WelcomeWizard.tsx` | R | 39, B |
| `apps/web/tsconfig.json` | R | B |
| `packages/client-runtime/package.json` | R | 7, 23, 34, 45, 69, 70, 75, 101, Role library |
| `packages/client-runtime/package.json` | R | 7, 23, 34, 45, 69, 70, 75, 101, 114, Role library |
| `packages/client-runtime/src/connection/compatibility.ts` | A | 56 |
| `packages/client-runtime/src/operations/commands.ts` | R | Saved-agent mentions |
| `packages/contracts/package.json` | N | 34 |
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { ownerOnlySettingsRoute } from "./j5/sharing/ownerOnlySettingsRoute";
import { ConnectOnboardingRouteScreen } from "./features/cloud/ConnectOnboardingRouteScreen";
import { AttachmentFileScreen } from "./features/files/AttachmentFileScreen";
import { ThreadFilesTreeScreen, ThreadFileScreen } from "./features/files/ThreadFilesRouteScreen";
import { j5ThreadArtifactRoutes } from "./j5/artifacts/routes";
import { j5ThreadRoutes } from "./j5/threadRoutes";
import { j5SettingsFormRoutes } from "./j5/agents/routes";
import { j5InboxRoutes } from "./j5/inbox/routes";
import { AdaptiveWorkspaceLayout } from "./features/layout/AdaptiveWorkspaceLayout";
Expand Down Expand Up @@ -873,7 +873,7 @@ const RootStackConfig = createWorkspaceStackNavigator({
linking: `${THREAD_LINKING_PREFIX}/files/:path*`,
options: GLASS_HEADER_OPTIONS,
}),
...j5ThreadArtifactRoutes(THREAD_LINKING_PREFIX, GLASS_HEADER_OPTIONS),
...j5ThreadRoutes(THREAD_LINKING_PREFIX, GLASS_HEADER_OPTIONS),
ThreadMcpApp: createNativeStackScreen({
screen: McpAppFullscreenScreen,
linking: `${THREAD_LINKING_PREFIX}/apps/:itemId`,
Expand Down
18 changes: 13 additions & 5 deletions apps/mobile/src/features/threads/ThreadDetailScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
} from "@t3tools/client-runtime/state/thread-settled";
import type { WorktreeSetupCardProps } from "./worktree-setup-card";
import type { ComposerTextPaste } from "../../native/T3ComposerEditor.types";
import { J5ComposerControls } from "../../j5/composer/J5ComposerControls";
import { PlaybookComposerControl } from "../../j5/playbooks/PlaybookComposerControl";
import { type EnvironmentConnectionPhase } from "@t3tools/client-runtime/connection";
import type { EnvironmentThreadShell } from "@t3tools/client-runtime/state/shell";
Expand Down Expand Up @@ -1602,11 +1603,18 @@ function ThreadDetailBody(
{!props.draftMode &&
!props.activePendingApproval &&
!props.activePendingUserInput && (
<PlaybookComposerControl
key={selectedThreadKey}
environmentId={props.environmentId}
threadId={props.selectedThread.id}
/>
<>
<J5ComposerControls
key={`j5:${selectedThreadKey}`}
environmentId={props.environmentId}
threadId={props.selectedThread.id}
/>
<PlaybookComposerControl
key={selectedThreadKey}
environmentId={props.environmentId}
threadId={props.selectedThread.id}
/>
</>
)}
{props.queuedRunEdit !== null ? (
<Animated.View
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,9 @@ function OwnerAgentLibrarySettingsScreen() {
<SettingsSection title="Playbooks">
<PlaybookLibrarySettingsSection environmentId={effectiveEnvironmentId} />
</SettingsSection>
<SettingsSection title="Crews">
<InfoRow text="Crew settings (auto-approve, member models and reasoning) are in Agent Setup on web and desktop. The phone follows them." />
</SettingsSection>
</ScreenScrollView>
{notification ? (
<AgentLibraryToast notification={notification} onDismiss={dismissNotification} />
Expand Down
20 changes: 0 additions & 20 deletions apps/mobile/src/j5/artifacts/routes.ts

This file was deleted.

11 changes: 11 additions & 0 deletions apps/mobile/src/j5/composer/J5ComposerControls.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { EnvironmentId, ThreadId } from "@t3tools/contracts";

import { CrewRosterStrip } from "../crew/CrewRosterStrip";

/**
* J5's rows above a thread's composer, mounted once beside upstream's playbook bar, so each
* J5 control (a Crew's roster review, the adjudication dock) joins here without another seam.
*/
export function J5ComposerControls(props: { environmentId: EnvironmentId; threadId: ThreadId }) {
return <CrewRosterStrip environmentId={props.environmentId} threadId={props.threadId} />;
}
Loading
Loading