Skip to content

fix: archive confirm counts side chat queues; remove /t3-archive and mobile trims - #306

Merged
pandec merged 10 commits into
devfrom
fix/audit2-mobile-cross-client
Nov 25, 2026
Merged

pandec merged 10 commits into
devfrom
fix/audit2-mobile-cross-client

Conversation

@pandec

@pandec pandec commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Archiving a thread also archives its side chats and discards their queued messages. The archive confirmation counted only the thread's own queue. This PR also carries the mobile and cross-client trims from audit batch 2.

F4: the discard confirmation counts side chats. The client-runtime rule archiveDiscardedQueuedMessages adds the queuedMessageCount of the unarchived side chats the client holds. The server never trims side chats from shell snapshots, so this works online and offline (cached shells). Web attemptArchiveThread and mobile archiveThread confirm whenever messages would be discarded, including archive when done. The wording names the side-chat share. After the dialog, both clients re-read: a changed action does nothing, and a larger discard asks again. Mobile replays archive-now only over the thread's own confirmed queue. The count is an upper bound: the server skips a side chat with a running app-owned delegated task, and the shell cannot tell that task apart. The prompt says so.

F7: /t3-archive removed from the shared parser, web send path and slash menu, mobile composer and slash menu, docs and README. This also removes the mobile slash command that bypassed the outbox and the approval order. Menus, palette, shortcut, swipe and MCP archive remain.

T8: dropped the unreachable UIImagePickerController hunk from patches/expo-image-picker@58.0.10.patch. The patch was regenerated against the pristine 58.0.10 package (checked against the registry tarball) and reproduces the installed tree. The PHPicker dismissal and overlap guard stay. The lockfile hash was updated, and --frozen-lockfile passes. Needs an iOS native rebuild.

T9 (partly skipped): the Snoozed/Settled shelf keys and their decoders are upstream lines, so deleting them would remove upstream code and grow the fork diff. Instead, the fork's relocation of those keys was reverted to upstream's layout: −25 diff lines, no behavior change.

T15 (skipped): a single replication owner grows the fork diff by 17 lines at minimum (733 → 750). The duplicate writes are idempotent.

T16: the steer reveal logic is shared in client-runtime (fork diff 356 → 338). Each client keeps a thin hook that caches the unread set on a string key. The web hook used to key it on the projection, so the reveal timer restarted on every streaming update.

T25: the mobile extras-settings test now keeps only the quantization case.

Checks: vp check, vp run typecheck, vp run i18n:check, vp run lint:mobile, and focused tests in client-runtime, shared, web and mobile. Two review rounds (Astra, Opus): findings fixed.

Implemented by Claude Opus 5.5 in Claude Code (T3 Code).

Archiving takes a thread's side chats and discards their queued messages.
Every archive entry point now sums the side chats' queued counts from the
held shells and confirms, including archive when done. The /t3-archive
composer command is removed on web and mobile.
The web hook cached the unread set on the projection, so the reveal timer
restarted on every streaming update; both hooks now key it on content.
A confirmed archive does nothing if its action changed and asks again if a
queue grew. Mobile replays archive-now only over the thread's own confirmed
queue. The prompt says a side chat with a running delegated task stays open.
@coderabbitai

coderabbitai Bot commented Nov 25, 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 59 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

Commits

Reviewing files that changed from the base of the PR and between ffa2ecb and 24411e7.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 30

  • README.md
  • apps/mobile/src/features/home/threadArchive.ts
  • apps/mobile/src/features/home/useThreadListActions.test.ts
  • apps/mobile/src/features/home/useThreadListActions.ts
  • apps/mobile/src/features/settings/lib/extras-settings.test.ts
  • apps/mobile/src/features/threads/use-composer-command-menu.test.ts
  • apps/mobile/src/features/threads/use-composer-command-menu.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • apps/mobile/src/state/thread-lifecycle-outbox-model.ts
  • apps/mobile/src/state/thread-lifecycle-outbox.test.ts
  • apps/mobile/src/state/thread-steer-pending.ts
  • apps/mobile/src/state/use-thread-composer-state.ts
  • apps/web/src/components/ChatView.logic.test.ts
  • apps/web/src/components/ChatView.logic.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/chat/ChatComposer.tsx
  • apps/web/src/components/chat/useComposerMenuItems.ts
  • apps/web/src/components/chat/useComposerSend.ts
  • apps/web/src/composer-logic.ts
  • apps/web/src/hooks/useThreadActions.ts
  • apps/web/src/hooks/useThreadActions.undo.test.ts
  • apps/web/src/state/threadSteerPending.ts
  • docs/user/composer.md
  • docs/user/thread-sidebar.md
  • packages/client-runtime/src/state/threadSettled.test.ts
  • packages/client-runtime/src/state/threadSettled.ts
  • packages/client-runtime/src/state/threadSteerPending.ts
  • packages/shared/src/composerTrigger.test.ts
  • packages/shared/src/composerTrigger.ts
  • patches/expo-image-picker@58.0.10.patch
  • 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

@pandec
pandec merged commit fc1a7c9 into dev Nov 25, 2026
@pandec
pandec deleted the fix/audit2-mobile-cross-client branch November 25, 2026 09:11
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.

1 participant