Skip to content

feat(queue): add host-confirmed sorting across product surfaces - #3783

Merged
bobleer merged 5 commits into
openBitFun:mainfrom
bobleer:bob/queue-reorder-surfaces
Nov 6, 2026
Merged

bobleer merged 5 commits into
openBitFun:mainfrom
bobleer:bob/queue-reorder-surfaces

Conversation

@bobleer

@bobleer bobleer commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Pending messages had an uneven outer border, misaligned recovery actions, and no way to change execution order. This adds host-confirmed reordering and a consistent queue presentation across desktop/web, mobile web, native mobile controllers, and embedded TUI.

  • Replace the queue outline with inset separators above rows; remove the final bottom separator and the gap to the composer. Align Send now and Retry to the same left edge and keep attachments beside their message text.
  • Add a revision-checked, idempotent reorder operation to the existing dialog-queue port. Reorder the actual dispatch queue without resubmitting messages or moving unrelated priority lanes.
  • Add pointer/keyboard sorting on desktop/mobile web, native drag and move-menu controls on Android/iOS/HarmonyOS, and /queue keyboard controls in embedded TUI.
  • Preserve queued content on errors, fence stale session/revision replies and interrupted gestures, and negotiate sorting with the additive supportsReorder snapshot field. Legacy hosts retain their existing queue controls.

Type and Areas

Feature, UI/UX, regression protection. Runtime contracts/scheduler, Web UI/design system, mobile web, native mobile controllers, CLI/TUI, and owning documentation.

Motivation / Impact

The displayed order now follows the execution host's confirmed dispatch order. Dragging sends one mutation on release; conflicting updates cancel the move instead of overwriting newer work. Pointer cancellation, keyboard focus after acknowledgment, touch targets, narrow layouts, and recovery actions are covered.

Native mobile input keeps its existing running-turn semantics. Shared TUI currently reports queue management as unsupported because its private IPC contract does not negotiate this port; it does not fall back to local execution. Existing queue memory/lifetime guarantees are unchanged.

Verification

Passed locally:

  • cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib host_queue_ — 22 tests, including actual dispatch order, idempotent retry, stale revision, and invalid targets.
  • cargo test --locked -p openbitfun-runtime-ports --no-default-features --features agent-api --lib dialog_queue — 4 tests, including legacy snapshot deserialization and old-payload round trip.
  • cargo test --locked -p openbitfun-agent-runtime --no-default-features --features agent-runtime --lib dialog_turn_queue_reorder — priority/subset behavior.
  • cargo test --locked -p openbitfun-cli --bin openbitfun ui::message_queue::tests — 3 keyboard/state/render tests at compact and normal terminal widths; 45 actions::tests command-registry tests and CLI compile also passed.
  • pnpm run check:web, pnpm run theme:color-audit:all, pnpm run i18n:audit, pnpm run mobile:ui:check, pnpm run check:repo-hygiene, pnpm run check:core-boundaries, and git diff --check.
  • UI package build + 11 composer tests; Web UI queue/drag focused tests (22); durable outbox tests (20); mobile-web type check and new real-browser keyboard/drag/menu/zero-gap test.
  • KMP :core-feature:jvmTest --tests '*MessageQueueStoreTest*' — 6 tests, plus the debug XCFramework build.
  • Android :app:assembleDebug and :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.openbitfun.mobile.app.MessageQueuePanelTest — 3 tests on a dedicated disposable emulator; final Kotlin compile passed.
  • All 44 iOS Swift source files type-checked against the generated device framework.
  • HarmonyOS ArkTS compilation and node --test tools/tests/message-queue.test.cjs — 5 production-store tests.

Known existing/environment limitations (not hidden by changed baselines):

  • mobile:architecture reports the same three existing violations on the clean base: public defaults in AccountUiState/ConversationModels and the ClientBuildContractTest cross-platform reference.
  • The full mobile-web queue browser suite has one pre-existing ThinkingBlock alignment assertion (icon x=28 vs text x=16), reproduced on clean main; its other three tests pass, including the new reorder test.
  • Full iOS app rendering is blocked by the installed simulator runtime/SDK mismatch; HarmonyOS packaging reaches signing and stops because local signing material is unavailable. No iOS/HarmonyOS device rendering is claimed.
  • Verification uses local components, a native Android emulator, and simulated hosts. Remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised end-to-end on separate machines.

Reviewer Notes

Commits separate host contracts/ordering, desktop and mobile-web presentation, native mobile controllers, and TUI integration. Selected queue metadata inherits the selection foreground to keep attachments and status legible. No new Tauri command, persisted shape requirement, workspace dependency feature union, or controller-local execution path is introduced.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit ab730b5 into openBitFun:main Nov 6, 2026
13 checks passed
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