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

102. Mobile's thread list has an Inbox bell with the open count ([#830](https://github.com/Jacksondr5/j5code/issues/830)), as web's rail does. J5-owned `apps/mobile/src/j5/inbox/InboxBell.tsx` reads every connected server's open count (`inboxCountSourcesAtom`, case 101), says it through `inboxBellPresentation` (`packages/client-runtime/src/j5/inbox.ts`, shared with web's bell), and opens the `Inbox` screen. It counts open asks only; web's also counts Crew requests and seat approvals, which come to mobile with Crews. Two headers mount it, each with one import and one or two lines: `apps/mobile/src/features/home/ThreadListToolbar.tsx` (Android) adds it beside `filterButton` in the toolbar row's `filter` slot when a server is saved, and `apps/mobile/src/features/workspace/WorkspaceToolbar.ios.tsx` adds it as a `Toolbar.Custom` in the right toolbar of the thread list on iPhone and iPad alike (iOS draws its sidebar's header natively, through this toolbar). Android's split view draws its sidebar header with the same `ThreadListToolbar`, so it gets the bell there; no other header holds the thread list's filter. Upstream's symbol set has no plain bell on Android, so J5's `BellGlyph` draws Tabler's there and the SF Symbol on iOS. On a pin advance: if upstream moves the thread list's filter, move the bell with it.

103. Mobile's persona forms are pushed settings pages ([#894](https://github.com/Jacksondr5/j5code/issues/894)), since Android's `Menu` draws in the app's root window and can't appear over an RN `Modal` or upstream's `Sheet`. `apps/mobile/src/Stack.tsx` imports J5-owned `j5PersonaFormRoutes` (`apps/mobile/src/j5/agents/routes.ts`) and spreads it into `SETTINGS_SCREENS` after `SettingsAgents`, adding `SettingsPersonaNew` and `SettingsPersonaEdit`. They follow upstream's `SettingsScheduledTaskNew` and `SettingsScheduledTaskEdit`, including the guard against losing unsaved changes. On a pin advance: if upstream reshapes `SETTINGS_SCREENS`, spread the routes among them again.

## Pin and upstream advance runbook

Current pin: `d2c440312e5f39d59827ed466838a623516454d6`, upstream's stable release tag `v0.1.3` on `main` (frozen 2026-10-27). The previous pin was `70d60e03a7a35c6fa131825bbfa05ec893e69912`, upstream's nightly tag `v0.1.1-nightly.20261017.3238`.
Expand Down Expand Up @@ -738,7 +740,7 @@ explicitly marked.
| `apps/mobile/src/features/settings/SettingsRouteScreen.tsx` | A | 72, Role library |
| `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, Role library |
| `apps/mobile/src/Stack.tsx` | A | 72, 98, 101, 103, Role library |
| `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 @@ -1056,11 +1058,11 @@ The 2026-09-08 import correction adds bounded file-content schemas and shared se

The imported-agent lifecycle follow-up adds `setImportedAgentPersonaEnabled` under `settings:write` authorization, an Owner's like every Persona change (People and access AC20). J5-owned library storage preserves an optional enabled flag (legacy records default on), strips it from portable definitions/snapshots, and preserves it on replacement. Catalogs expose a disabled availability reason; launch preparation rejects disabled IDs before creating a task. Shared presentation and J5 web/mobile Settings show On/Off beside Remove import. Tests cover persistence, re-enable, launch rejection/receipt replay, replacement, and removal without affecting saved tasks.

The source-agent removal correction adds `removeSourceAgentPersona` under `settings:write` authorization and exposes Remove from library for folder-loaded agents/examples in the J5 Settings screens. J5 library code atomically persists per-environment source-ID exclusions without deleting user files or snapshots; imported copies can restore excluded IDs. Regression tests cover My Local Scout, restart persistence, unchanged source files/snapshots, rejected new launches, reimport, concurrent removals, and stale source actions after import. The 2026-09-10 restore follow-up (Tyler Barton's #85 review) adds `restoreSourceAgentPersona` to the same J5 RPC group; the catalog lists excluded source and bundled definitions as `removed` entries and both J5 settings screens show a Restore action in place of the trash, so removing a bundled example is no longer a one-way door now that imports are YAML-only. The same day's personal-agent follow-up adds `createAgentPersona` to the J5 RPC group with J5-owned create dialogs on web and mobile (`AgentCreateDialog.tsx`, `AgentCreateModal.tsx`) sharing route and policy fields with the editors; created agents are ordinary imported definitions, so no upstream file changes. A further pass adds `readAgentPersona` (read scope) for instruction editing, Duplicate, and Export YAML on both clients, and makes `acceptedInput`, `inputArtifacts`, and `outputArtifact` optional in the J5 definition schema so personal agents carry no synthetic handoff fields.
The source-agent removal correction adds `removeSourceAgentPersona` under `settings:write` authorization and exposes Remove from library for folder-loaded agents/examples in the J5 Settings screens. J5 library code atomically persists per-environment source-ID exclusions without deleting user files or snapshots; imported copies can restore excluded IDs. Regression tests cover My Local Scout, restart persistence, unchanged source files/snapshots, rejected new launches, reimport, concurrent removals, and stale source actions after import. The 2026-09-10 restore follow-up (Tyler Barton's #85 review) adds `restoreSourceAgentPersona` to the same J5 RPC group; the catalog lists excluded source and bundled definitions as `removed` entries and both J5 settings screens show a Restore action in place of the trash, so removing a bundled example is no longer a one-way door now that imports are YAML-only. The same day's personal-agent follow-up adds `createAgentPersona` to the J5 RPC group with J5-owned create dialogs on web and mobile (`AgentCreateDialog.tsx`, `AgentCreateScreen.tsx`) sharing route and policy fields with the editors; created agents are ordinary imported definitions, so no upstream file changes. A further pass adds `readAgentPersona` (read scope) for instruction editing, Duplicate, and Export YAML on both clients, and makes `acceptedInput`, `inputArtifacts`, and `outputArtifact` optional in the J5 definition schema so personal agents carry no synthetic handoff fields.

The agent-row cleanup places availability badges beside names and keeps switches plus accessible destructive trash icons in the action area on web/desktop/mobile. The current UI uses `removeAgentPersona` (`settings:write`): J5 library code excludes the source ID before deleting an imported copy, so removed overrides never reveal another definition. Existing import-only/source-only RPCs are retained for compatibility. Source files and snapshots remain intact; reimport restores an agent. Focused tests cover source, import, disabled override, restart, snapshot preservation, and explicit restoration.

The imported-agent editor removes input/output/policy/route metadata from library rows and mounts J5-owned `AgentEditorDialog.tsx` (web/desktop) and `AgentEditorModal.tsx` (mobile). Shared presentation supplies edit drafts and model options from the selected environment. Additive catalog metadata carries editable targets and a content digest, not instructions. The authenticated `editImportedAgentPersona` mutation validates the digest and full definition, increments version, preserves enabled state and unedited fields, and atomically saves only the imported copy. Instructions/source files/snapshots remain untouched. Source entries require importing a copy before editing. Focused tests cover edit persistence, source/snapshot preservation, invalid/stale/removed saves, and editing visibility/model choices.
The imported-agent editor removes input/output/policy/route metadata from library rows and mounts J5-owned `AgentEditorDialog.tsx` (web/desktop) and `AgentEditorScreen.tsx` (mobile). Shared presentation supplies edit drafts and model options from the selected environment. Additive catalog metadata carries editable targets and a content digest, not instructions. The authenticated `editImportedAgentPersona` mutation validates the digest and full definition, increments version, preserves enabled state and unedited fields, and atomically saves only the imported copy. Instructions/source files/snapshots remain untouched. Source entries require importing a copy before editing. Focused tests cover edit persistence, source/snapshot preservation, invalid/stale/removed saves, and editing visibility/model choices.

The import-control cleanup removes the Replace existing IDs checkbox/switch on web/desktop/mobile. Current clients always submit `replaceExisting: false`; conflict errors direct users to edit, remove before reimporting, or choose a different ID. The existing RPC replacement capability remains compatible. This preserves duplicate-ID protection and prevents imports from silently overwriting in-app edits.

Expand Down
2 changes: 2 additions & 0 deletions apps/mobile/src/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { useConnectOnboardingNavigation } from "./features/cloud/connectOnboardi
import { AttachmentFileScreen } from "./features/files/AttachmentFileScreen";
import { ThreadFilesTreeScreen, ThreadFileScreen } from "./features/files/ThreadFilesRouteScreen";
import { j5ThreadArtifactRoutes } from "./j5/artifacts/routes";
import { j5PersonaFormRoutes } from "./j5/agents/routes";
import { j5InboxRoutes } from "./j5/inbox/routes";
import { AdaptiveWorkspaceLayout } from "./features/layout/AdaptiveWorkspaceLayout";
import { selectedPullRequestKey } from "./features/pull-requests/pullRequestSelection";
Expand Down Expand Up @@ -354,6 +355,7 @@ const SETTINGS_SCREENS = {
title: "Personas",
},
}),
...j5PersonaFormRoutes(SETTINGS_PAGE_OPTIONS),
SettingsProjectGrouping: createNativeStackScreen({
screen: SettingsProjectGroupingRouteScreen,
linking: "settings/project-grouping",
Expand Down
237 changes: 0 additions & 237 deletions apps/mobile/src/j5/agents/AgentCreateModal.tsx

This file was deleted.

Loading
Loading