Repository navigation
Pin the office's copy, split and delete flow: deleting one of four routes merges its orders into route 1 and keeps every order - #524
Merged
Conversation
…utes merges its orders into route 1 and keeps every order The owner asked whether a copied group split into four routes of ten keeps its orders when one route is deleted and whether those ten orders join route 1. Two integration scenarios now pin it for both office paths (Routes list: DELETE then draft save of the remaining routes; Route Detail: one draft save with deletedRoutePlanIds): the copy ends with 20 + 10 + 10, route 1 holds the deleted route's orders, the copy and the source keep their 40 memberships, and every order stays assigned. No runtime change. Constraint: the split keeps the copied route as route 1 and adds the other routes, as the office app does; a draft that omits a current route is rejected by the envelope check. Confidence: high Scope-risk: narrow Tested: route-grouping integration suite on a disposable local PostgreSQL 17 (57 incl. the two new), eslint on the file. Not-tested: the same flow through the office UI (rehearsal with test orders follows). Refs #518 Change control: EVNSolution/clever-change-control#349 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
OziinG
added a commit
that referenced
this pull request
Oct 11, 2026
… be reviewed against the current route-grouping and completion code PR #483 was 29 commits behind main and GitHub reported it CONFLICTING. This merge takes main's live route change, cash receipt, delivery options and route-group deletion changes, and keeps the DSV execution hooks beside them. Constraint: main #522-#524 stopped cancelling sibling routes when a child route is deleted, so the DSV close hook for cancelled siblings no longer has a target and was dropped. Rejected: rebase of the 16 DSV commits | each commit would repeat the same 7 conflicts; one merge resolves them once Rejected: narrow Pick transaction type from the DSV branch | main's live-route validators require the full Prisma.TransactionClient; the export is kept for the DSV command service Confidence: medium Scope-risk: moderate Directive: the child publish transaction now runs main's membership lock and authority checks before the DSV CURRENT-guarded publish and execution sync; keep that order. Tested: prisma generate/validate, tsc, vitest 3437 pass (7 web-asset tests pass after route-ops-web build), DSV PostgreSQL integration 63 pass, typed eslint, env-authority Not-tested: CI on this merge, production migration order, real FCM or vehicle GPS Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only. Two integration scenarios pin the office's copy → split → delete flow for both office paths: 40 orders, REFERENCE copy, four unnamed routes of ten (the copied route stays route 1), delete the second route. Result on main today: 20 + 10 + 10, route 1 holds the deleted route's ten orders, the copy and the source keep their 40 memberships, every order stays assigned, no order is deleted.
Why. Owner question of 2026-10-11: "40 → 10 + 10 + 10 + 10에서 10을 지우면 1번 경로에 복속 되는 느낌?" — the scenario review before a UI rehearsal with test orders. Both paths behave that way with #522 and shopify-clever#385 in place; no runtime change was needed.
Validation. Route-grouping integration suite (57) on a disposable local PostgreSQL 17, ESLint on the file.
Refs #518
Change control: EVNSolution/clever-change-control#349
🤖 Generated with Claude Code