Repository navigation
feat(pos): enforce kitchen delivery before bill settlement - #941
Conversation
|
WIP: PR #941 fixes the stale checkout PIN latch and successful-PIN rate counting. It also gates split-check settlement by allocated bill items and keeps undelivered zero-total checks unpaid unless served or covered by the audited manager override. Exact head c3f6dfc has 15 passed, 0 failed, and 1 skipped CI check. Final stacked verification and automated-review follow-up remain in progress. Please do not merge yet; readiness will be confirmed here. |
|
Final verification complete for PR #941 at head fbcba67. Current-main sync is included, migration v97 follows v96, and the branch covers the kitchen-delivery settlement gate, PIN rate counting, split bills, zero-total/zero-tender recovery, and #939/#940 integrations. Local validation passed: npm test; lint and lint budget; backend/frontend builds; i18n/docs; kitchen-delivery, zero-balance (106/106), cash sessions (134/134), payment integration (33/33 plus issue-689 11/11), authorization, migration registry (296/296), upgrade path, focused settings browser (31/31), and full browser E2E (112/112). Exact-head hosted checks: 16 passed, 0 failed, 1 documentation check skipped by path filtering. Greptile reports no findings; CodeRabbit found no actionable comments; all six review threads are resolved. Issue #834 remains open and is referenced as Related to #834, not by a closing keyword. |
|
@greptile review |
|
|
@greptile review |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughThe change adds an optional kitchen-delivery requirement for postpaid bill settlement. It blocks settlement while eligible kitchen items remain undelivered, supports manager-PIN overrides, adds POS settings and payment prompts, and includes database migration and regression coverage. ChangesKitchen delivery settlement
Local network address checks
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant POS
participant BillsRoute
participant KitchenDeliveryCheck
participant Database
POS->>BillsRoute: Submit payment with optional manager PIN
BillsRoute->>KitchenDeliveryCheck: Check settlement eligibility
KitchenDeliveryCheck->>Database: Read settings, item statuses, and manager PIN
Database-->>KitchenDeliveryCheck: Return setting and item and manager data
KitchenDeliveryCheck-->>BillsRoute: Return block or valid override
BillsRoute->>Database: Record override audit and settle bill
BillsRoute-->>POS: Return payment result or kitchen error details
Merge Risk: ⚪ Minimal · up to The shared local-address checks match all three settings views. No actionable merge-blocking risk is established; merge readiness remains subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The delivery check is enforced on the server and defaults off. The main concern is that a manager’s override authority depends on role and PIN rather than configured payment permissions. Payment execution remains permission-protected, but delegated approval policy and recovery behavior need clarification. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description includes a useful summary and verification commands, but it omits most required template sections, including scope, compatibility and data safety, screenshots, cross-cutting surfaces, developer documentation, and the contributor checklist. Related work is also not presented under the required heading. Resolution Complete the repository template. Add the Related work, Scope, Compatibility & data safety, Screenshots, Cross-cutting surfaces, Developer documentation, and Contributor checklist sections. Document verification results, migration impact, user-visible behavior, affected surfaces, and checklist selections.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
frontend/e2e/settings-request-budget.spec.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. 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. Comment |
|
@greptile review |
|
@greptile review |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
|
@greptile review |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
Summary
Verification
npm testnpm run lintnpm run buildnpm run build:frontendnpm run i18n:checknpm run test:kitchen-delivery-enforcementRelated to #834 (completion remains pending checkout recovery and override fixes).
Summary by CodeRabbit