Skip to content

Run, pause, delete, create and edit a Bot's routines from the mobile profile - #1902

Merged
DoodleBears merged 4 commits into
mainfrom
claude/project-thread-8m750l
Oct 15, 2026
Merged

DoodleBears merged 4 commits into
mainfrom
claude/project-thread-8m750l

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Vain · project thread

Why the change

On the phone a PersonaBot's routines were a read-only list, so stopping a noisy routine or running one now meant going back to the computer.

Closes #1897 (parent #1893). Agent claim: #1897 (comment), task claude/cloud/session_01QvN8ywuXcKzbbQRkufut27.

Special things to note

  • Merge risk: two-way door, revert the commit; small blast radius, only the mobile Bot profile's Routines section changes, and every write goes through the existing Bot Schedule bridge methods as the Human (no Host, schema or CLI change, so no CLI parity entry). Review focus: the named arguments in apps/mobile/src/host/routines.ts (scheduleCreate {slug, input}, scheduleUpdate {slug, id, change}), which the device gateway matches against the remote method's parameter names.
  • Verification: pnpm lint, pnpm format:check, mobile typecheck and pnpm vitest run apps/mobile (307 passed) pass. New node scripts/e2e-mobile-routines-web.mjs drove the web export against a fresh isolated Host and passed all 7 checks: Pause and Resume change enabled on the Host, Run now adds a manual firing to scheduleHistory, Delete only after confirming, a cron routine offers the full client, and a new weekly routine's preview matches the Host's schedulePreview and lands on the Host. Not run: a native development build on a phone or Simulator (owed in the simulator batch).
  • CI test plan: affected; the plan selects the mobile tests above. No new config, test directory or repo-reading test, so no scripts/ci-plan.mjs rule changed.

Change outline

apps/mobile/
├── src/host/routines.ts          new: botRoutines(client, slug) over scheduleList/History/RunNow/Update/Delete/Preview/Create;
│                                      RoutineForm (daily | weekly | every N hours) ⇄ ScheduleTrigger, validation
├── src/host/wire.ts              BotScheduleSummary gains prompt + lastFiring; BotScheduleFiring (contract-checked against the Host)
├── src/ui/chat/routine-sheet.tsx new: detail (Run now, Pause/Resume, instruction, Recent runs, Edit, Delete) · delete confirm · editor with live preview
├── src/ui/chat/routine-text.ts   trigger / next-run / firing copy, shared with the profile
├── src/ui/chat/bot-profile.tsx   routine rows tappable + "New routine" row; ProfileRoutines { load, sheet } refreshes only Routines after a change
└── app/bot/[slug]/index.tsx      wires botRoutines + RoutineSheet; advanced triggers open the full client at the Bot's DM

Weekdays are ISO (Monday 1 to Sunday 7) as the Host takes them; the existing label lookup now also names Sunday 7, which used to print nothing.

Screenshots: 390 × 844 web export against a live isolated Host, light on the left and dark on the right in each row.

Control: profile, detail, paused, after Run now

Before: the profile's routine rows had no chevrons and no New routine row, and tapping did nothing (not re-captured; the web export of main was not rebuilt for this PR). After, top to bottom: the Routines section with tappable rows and New routine; the routine sheet; the same routine paused (Off, Resume); after Run now, with the manual firing under Recent runs.

Profile routines, routine detail, paused routine and after Run now, light and dark

Delete asks in place; a schedule the phone cannot express

Delete confirmation, and a cron routine whose Edit opens the full client, light and dark

Authoring: Edit, New routine with the Host's next runs, profile after Create

Edit form, new weekly routine form with next runs, and the profile after creating it, light and dark

🤖 Generated with Claude Code

https://claude.ai/code/session_01QvN8ywuXcKzbbQRkufut27

…profile

Tapping a routine in the Bot profile opens a sheet with its trigger, next
run and recent runs, with Run now, Pause/Resume, Edit and Delete (asked in
place). New routine and Edit author daily, weekly and every-N-hours
routines with a live preview from the Host; other triggers open the full
client. Every change goes through the existing Bot Schedule bridge
methods as the Human, so the desktop Schedules entry sees the same state.

Issue: #1897
Agent-Task: claude/cloud/session_01QvN8ywuXcKzbbQRkufut27

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QvN8ywuXcKzbbQRkufut27
@DoodleBears DoodleBears self-assigned this Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57b946f4-8f16-4add-860c-06610dcb2453
📥 Commits

Reviewing files that changed from the base of the PR and between 90b9916 and ae400b7.

⛔ Files ignored due to path filters: 3
  • .github/pr-screenshots/1897-mobile-routines/a-control.png is excluded by !**/*.png
  • .github/pr-screenshots/1897-mobile-routines/b-delete-advanced.png is excluded by !**/*.png
  • .github/pr-screenshots/1897-mobile-routines/c-authoring.png is excluded by !**/*.png
📒 Files selected for processing: 17
  • .agents/skills/verify-deepseekbot/features/README.md
  • .agents/skills/verify-deepseekbot/features/phone-routines.md
  • apps/mobile/DESIGN.md
  • apps/mobile/app/bot/[slug]/index.tsx
  • apps/mobile/src/host/routines.ts
  • apps/mobile/src/host/wire.ts
  • apps/mobile/src/ui/chat/bot-profile.tsx
  • apps/mobile/src/ui/chat/routine-sheet.tsx
  • apps/mobile/src/ui/chat/routine-text.ts
  • apps/mobile/src/ui/strings.ts
  • apps/mobile/test/bot-profile-sheet.test.tsx
  • apps/mobile/test/react-native-shim.ts
  • apps/mobile/test/routine-sheet.test.tsx
  • apps/mobile/test/routines.test.ts
  • apps/mobile/test/wire-contract.ts
  • changes/1897-mobile-routines.md
  • scripts/e2e-mobile-routines-web.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Issue: #1897
Agent-Task: claude/cloud/session_01QvN8ywuXcKzbbQRkufut27

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QvN8ywuXcKzbbQRkufut27
Issue: #1897
Agent-Task: claude/cloud/session_01QvN8ywuXcKzbbQRkufut27

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QvN8ywuXcKzbbQRkufut27
@DoodleBears
DoodleBears merged commit dee38d4 into main Oct 15, 2026
9 checks passed
DoodleBears added a commit that referenced this pull request Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@DoodleBears

Copy link
Copy Markdown
Contributor Author

Batch QA — head e5ad68c (merged on qa/batch-3 with the #1899 Settings combo)

iOS Simulator "PR1800 glass" (iOS 26.0), dev client rebuilt from the batch. QA Host on DeepSeek; a daily 09:00 Asia/Tokyo routine for Ada was created for the test and all test routines were deleted afterwards (the Host lists 0 routines for every Bot). Screenshots redacted. Android: untested.

Step Result
1. DM → chip → profile: Routines rows with chevrons, list ends with "New routine" ✅ pass
2. Tap a routine: sheet with title, "Daily at 09:00 · Next …", Run now + Pause, Instruction, Recent runs, Edit, Delete ✅ pass
3. Pause → button becomes Resume, subtitle "Off"; Host shows it paused; Resume ✅ pass (Host enabled: false → true, checked through the CLI rather than the desktop Schedules view)
4. Run now → "Started a run." and a "Run now · …" row under Recent runs ✅ pass
5. Edit: Title, Instruction, When chips, Time field, Next runs; Cancel ✅ pass — ⚠️ with Time focused the keyboard sits flush against the field (its lower edge slightly under the keyboard) and Next runs is hidden while typing
6. New routine: Weekly, Mon/Wed/Fri, 18:30 → Next runs updates (Fri Oct 16, Mon Oct 19, Wed Oct 21 at 6:30 PM); Create closes the sheet and the row appears; the Host shows the same next run (09:30Z = 18:30 Tokyo) ✅ pass. Nice touch: an invalid time shows "Enter a time such as 09:00." and holds back Next runs.
7. Delete: in-place confirm ("It will not run again. This cannot be undone."), then Delete removes the row ✅ pass — note the Delete row in the routine sheet is not exposed to accessibility (no button role/label), so VoiceOver/automation can't reach it

Routines light Routines dark Sheet light Sheet dark Paused
Run now light Run now dark Edit Time focused light Time focused dark
New routine light New routine dark Created light Created dark
Delete confirm light Delete confirm dark No routines light No routines dark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile: run, pause, delete and edit a Bot's routines from its profile

2 participants