Skip to content

fix(mobile): preview queued message order during drag - #12232

Merged
juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
t3code/mobile-queue-live-reorder
Sep 17, 2026
Merged

juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
t3code/mobile-queue-live-reorder

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Queued messages on mobile stayed in place while a message was dragged. The destination was hard to judge until the drag ended.

What changed

The queued-message sheet now previews the insertion point during a drag. Nearby messages animate into the open space as the dragged message crosses them. The final reorder still uses the existing server command, and an unchanged drop sends no reorder.

Why

The preview uses each row's original layout for hit testing and changes the insertion anchor only when the dragged message crosses another row. This keeps the drag responsive while preserving the server-authoritative queue order.

Verification

  • Focused queue presentation tests: 7 passed.
  • Mobile typecheck and targeted lint: passed.
  • iOS development client: built and launched on iPhone 16 Pro simulator.
  • Before/after screenshots and interaction video: pending. The simulator's UI control service cannot load SimulatorKit from the path it expects in this Xcode installation, so it cannot enter the queued-message sheet or perform the drag.

The three failing CI jobs reproduce the same failures on the parent PR: unused exports in Check, a web checkpoint test in Test, and four server rollback tests in Test Server 3. This child changes only mobile queue presentation code.

Checklist

  • This PR is small and focused.
  • I explained what changed and why.
  • I included before/after screenshots for the UI change.
  • I included a video for the drag interaction.

Model: undisclosed. Harness: Codex.

Summary by CodeRabbit

  • Bug Fixes
    • Improved thread queue drag-and-drop behavior with more accurate insertion previews.
    • Prevented stale drag operations when the queue changes during a drag.
    • Added smoother animations for displaced and repositioned queue items.
    • Improved reduced-motion support during queue interactions.
    • Ensured drag state is cleared safely before reordering.

@juliusmarminge
juliusmarminge added this pull request to stack #12233 September 17, 2026 09:41
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 89ce3fc.

This comment will update automatically after the next completed run.

@juliusmarminge juliusmarminge changed the title t3code/mobile queue live reorder fix(mobile): preview queued message order during drag Sep 17, 2026
@juliusmarminge
juliusmarminge marked this pull request as ready for review September 17, 2026 10:12
@macroscopeapp

macroscopeapp Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 89ce3fc

Macroscope's review found this PR approvable — This is a focused mobile queue-drag fix that previews the destination by animating nearby rows while preserving the existing reorder command and unchanged-drop behavior. The implementation is localized, tested, and introduces no schema, infrastructure, security, billing, or configuration changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 9327817c-3cb6-4d04-8ca1-ecfb071389c3

📥 Commits

Reviewing files that changed from the base of the PR and between b4cc55c and 89ce3fc.

📒 Files selected for processing (3)
  • apps/mobile/src/features/threads/ThreadQueueControl.tsx
  • apps/mobile/src/features/threads/threadQueueControlPresentation.test.ts
  • apps/mobile/src/features/threads/threadQueueControlPresentation.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Thread queue drag handling

Layer / File(s) Summary
Drag destination resolution and validation
apps/mobile/src/features/threads/threadQueueControlPresentation.ts, apps/mobile/src/features/threads/threadQueueControlPresentation.test.ts
The presentation helpers resolve insertion anchors from captured row geometry. Tests cover intermediate positions, list ends, and unchanged placement.
Drag lifecycle and stale-state handling
apps/mobile/src/features/threads/ThreadQueueControl.tsx
The control captures row layouts, updates preview targets, clears stale drag state, and resolves the final target before reordering.
Animated row displacement
apps/mobile/src/features/threads/ThreadQueueControl.tsx
Queue rows use QueueShiftedRow for animated displacement, reduced-motion timing, and active-row stacking.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant QueueRow
  participant ThreadQueueControl
  participant resolveQueueDragBeforeRunId
  QueueRow->>ThreadQueueControl: Start and move drag
  ThreadQueueControl->>resolveQueueDragBeforeRunId: Resolve preview target
  resolveQueueDragBeforeRunId-->>ThreadQueueControl: Return insertion anchor
  QueueRow->>ThreadQueueControl: End drag
  ThreadQueueControl->>resolveQueueDragBeforeRunId: Resolve final target
  ThreadQueueControl->>QueueRow: Animate row into position
Loading

Merge Risk: ⚪ Minimal · up to 89ce3

No merge-blocking issue was identified in the queue drag preview changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the mobile queue drag behavior change and matches the main pull request objective.
Description check ✅ Passed The description explains what changed, why it changed, verification results, known CI issues, and checklist status. It also documents why the required screenshots and interaction video remain unavaila…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/mobile-queue-live-reorder

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

@juliusmarminge
juliusmarminge removed this pull request from stack #12233 September 17, 2026 18:00
@juliusmarminge
juliusmarminge merged commit b7f9f13 into t3code/codex-turn-mapping Sep 17, 2026
26 of 29 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/mobile-queue-live-reorder branch September 17, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). 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.

1 participant