Skip to content

feat(mobile): start a playbook from upstream's new chat, picking the project in its heading - #990

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/mobile-playbook-start-new-chat
Nov 9, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/mobile-playbook-start-new-chat

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

At Checkpoint 3, Jackson asked whether starting a playbook could use upstream's new chat, which picks the project from its "What should we build in ?" heading, instead of J5's page with its own project menu. Closes #963, together with #989.

What changed

  • Prepare chat (a playbook row's action) opens upstream's new chat on a prepared draft. The draft has the project Settings is showing, or the first one, and "Start playbook ". The person changes the project from the heading if they want, then sends.
  • Create playbook does the same, with Playbook Author picked in the draft's persona row and its opening prompt filled in. Create now needs a Send: today's page started the turn the moment you tapped Open Playbook Author.
    • Model: unchanged, from code. Both the old launch and the draft send the playbook-author persona in the thread's creation, and the server resolves the persona's route there. ensurePlaybookAuthor still runs first, creating or updating the author as before.
    • Runtime mode: unchanged in effect. The draft stores the composer's mode, but a persona's Workspace write access still runs it as auto-accept-edits with a workspace-write sandbox (agentPersonaRuntime.ts, providerPolicy.ts), as the old launch did.
  • Back from the draft: on Android, Back from the new chat before sending goes to the Chats list, not Settings. That's upstream's own new-chat behaviour, which the Captain accepted over adding a J5 override; Jackson sees it at Checkpoint 4. The old J5 page went back to Settings.
  • Removed: PlaybookConversationScreen and its SettingsPlaybookConversation route, from fix(mobile): the Playbook conversation form is a pushed page, so Android's picker opens #906. FORK.md case 103 is updated, and Stack.tsx is unchanged.
  • Another server's project: upstream's heading lists projects on every connected server. A playbook that isn't on the chosen project's server fails visibly. Its error now says so: "No playbook named on this server. Use j5_playbook_list." The Captain chose this over filtering the picker. This is J5's own tool error text, read by the agent; the repo's eval rule covers upstream's model-facing text. The tester's wrong-server run is the proof.

UI changes

Android 16, two projects and a second server: before on 3abc2ea8a7, after on de5a367b65. Before, both actions open J5's page with a project menu. After, they open upstream's new chat, with the project in its heading.

Before After
Prepare chat Prepare chat page with its project menu, Android, before New chat with Start playbook filled in, Android, after
Create playbook Create playbook page with its project menu, Android, before New chat with Playbook Author picked and its prompt, Android, after

After only:

The heading's project picker listing both projects and the second server, Android, after
Prepare chat draft reopened from Unsent with its text and project, Android, after
Create playbook draft reopened with Playbook Author and its prompt, Android, after
Prepared playbook completed in the chosen project, Android, after
Playbook Author asking its first question in the chosen project, Android, after
Missing-playbook tool error naming this server, Android, after
Back from the unsent draft landing on Chats with its draft row, Android, after

Prepare chat: the unsent draft kept, the project chosen from the heading, and the run completing (excerpts):

prepare-retention-project-de5a367-after.mp4

Create playbook: the project chosen from the heading, Send, and Playbook Author's reply (excerpts):

create-project-send-excerpts-de5a367-after.mp4

Prepare chat on another server's project: the prompt kept, and the missing-playbook result (excerpts):

wrong-server-excerpts-de5a367-after.mp4

Live testing

Android: PASS at de5a367b65 (crew tester, report test-reports/pr-990/de5a367b65.md), with real turns.

  • Prepare chat: opens the new chat with "Start playbook android-release-smoke" filled in. Switching the project to the second one in the heading and sending ran the playbook on Haiku 5.5 to completion, two of two steps, with its child agent and file checked.
  • Create playbook: opens the new chat with Playbook Author and its prompt. After switching the project and sending, Playbook Author answered on GPT-5.6-Luna High, the model ensurePlaybookAuthor set up, by asking what the playbook should accomplish.
  • Drafts survive Back: Back before sending lands on Chats, as upstream's new chat does. Both unsent drafts are kept, and reopening from Unsent restores the text, the project, and for Create, Playbook Author.
  • Another server's project: the agent's tool reports "No playbook named android-release-smoke on this server."

Not exercised: iOS, which waits for Checkpoint 4, and dark mode.

Checklist

Built by Claude Opus 5.5 in Claude Code (J5 Code crew seat builder-composer).

🤖 Generated with Claude Code

…project in its heading

Create playbook and Prepare chat opened a J5 page with its own project
menu. Both now open upstream's new chat on a prepared draft, where the
project is picked from the "What should we build in <project>?" heading:
Prepare chat fills "Start playbook <name>", and Create picks Playbook Author
with its opening prompt, so it now needs a Send. A playbook missing on the
chosen project's server fails with a message that says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 9, 2026 4:55am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 9 billable files and costs up to $2.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 6 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 30 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3abc2ea and de5a367.

Files selected for processing: 9

  • FORK.md
  • apps/mobile/src/j5/agents/SettingsFormScreen.tsx
  • apps/mobile/src/j5/agents/routes.ts
  • apps/mobile/src/j5/playbooks/PlaybookConversationScreen.tsx
  • apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx
  • apps/mobile/src/j5/playbooks/startPlaybookConversation.ts
  • apps/server/src/j5/playbooks/PlaybookLibrary.ts
  • apps/server/src/j5/playbooks/PlaybookStore.ts
  • packages/client-runtime/src/j5/playbooks.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined panel review (reviewer-opus + reviewer-sol) at de5a367

Verdict: no correctness findings, and the panel approves the source. Still pending: a live run with real agents (Create and Prepare chat, picking the project from the new-chat heading), the cross-server not-found case, captures, and J5 CI.

The builder's four points

  • Create's model: same route. The old playbookAuthorLaunch and the new draft both carry playbook-author as the persona in the thread's creation. The server resolves the route through the same resolveAgentPersonaLaunch → prepareAgentPersonaLaunch, ignoring the client's model selection, so the model doesn't change. ensurePlaybookAuthor re-reads the catalog after creating the persona, which refreshes the shared catalog atom the draft's persona row reads, so a first-ever Create shows its agent row. A project change in the heading keeps the same draft key, so the prompt and the chosen persona carry over.
  • Runtime mode. The thread's stored mode now follows the composer, whose default is full-access, where the old launch hard-coded auto-accept-edits. But a persona's effective policy comes from its access level: workspace-write translates to auto-accept-edits plus a workspace-write sandbox in agentPersonaRuntime.ts and providerPolicy.ts. So Playbook Author doesn't get full access just because the composer says so.
  • The removed route has no consumers. SettingsPlaybookConversation and PlaybookConversationScreen have no remaining references, and FORK.md case 103 is updated. Web keeps playbookAuthorLaunch in its own dialog. PLAYBOOK_AUTHOR_PROMPT is the old text, byte for byte.
  • Error text and evals. The two not_found messages in PlaybookStore.ts and PlaybookLibrary.ts only gain "on this server". That's J5's own tool text, not upstream's model-facing text, and not a model-behaviour fix, so the evals rule doesn't call for a run. A live wrong-server run is the useful proof. Optional: in the PR body, give that narrow reason instead of a blanket "J5 doesn't run paid evals".

Reviewer-run checks

  • server src/j5/playbooks: 93 passed in 7 files. Mobile reactCompilerCoverage.test.ts and upstreamSeams.test.ts: 1131 (reviewer-opus). Reviewer-sol: 99 draft, shared-playbook and server-store tests plus 4 targeted mobile compiler checks.
  • vp run typecheck: mobile and server exit 0
  • lint: clean on the changed files; git diff --check: clean

The guide update belongs to the wave-4 docs PR.

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

@github-actions github-actions Bot added size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Nov 9, 2026
@Jacksondr5
Jacksondr5 merged commit a4784fd into j5/main Nov 9, 2026
40 of 43 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/mobile-playbook-start-new-chat branch November 9, 2026 07:00

This branch was successfully deployed

1 active deployment
Preview — de5a367b Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile Settings: "Personas & Playbooks", playbook sheet close buttons, and starting a playbook like upstream's new chat

1 participant