Skip to content

Dev/tracebility - #331

Merged
jakub-przepiora merged 2 commits into
developfrom
dev/tracebility
Oct 1, 2026
Merged

jakub-przepiora merged 2 commits into
developfrom
dev/tracebility

Conversation

@Svannte

@Svannte Svannte commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

bom view.
if only one line present open it instantly

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Other:

Related issue

Closes #

Testing

  • Tested manually in browser
  • php artisan test passes
  • Tested as Operator / Supervisor / Admin role (if UI change)

Checklist

  • I have signed the CLA (or this change is trivial: ≤20 lines, no new logic) — see CLA.md
  • No .env secrets committed
  • Migration added if schema changed
  • $fillable updated if new model columns added
  • No raw SQL with user input (use Eloquent / Query Builder)
  • CSRF protection in place for any new forms
  • composer audit clean

Summary by CodeRabbit

  • New Features
    • Added a routing graph to process templates, with step selection to filter components and badges showing component counts.
    • Added translated labels for consumed-at values and guidance for filtering components by step.
  • Improvements
    • Operators assigned to one line now go directly to that line, retaining a valid selected bench when possible. Line-switching controls are hidden when switching isn’t available.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • cla-signed

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Mes-Open/OpenMes/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7e8095ed-c87a-4e9c-a9da-8e16637e2589

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Mes-Open/OpenMes/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4b2b7d3f-98e1-4238-8800-8d6430d7c70a

📥 Commits

Reviewing files that changed from the base of the PR and between 6048fac and a363da4.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • backend/app/Http/Controllers/Web/Admin/BomManagementController.php
  • backend/app/Http/Controllers/Web/Operator/LineController.php
  • backend/app/Http/Middleware/HandleInertiaRequests.php
  • backend/lang/en.json
  • backend/lang/pl.json
  • backend/resources/js/Pages/admin/process-templates/Bom.jsx
  • backend/resources/js/Pages/admin/process-templates/Show.jsx
  • backend/resources/js/Pages/operator/Queue.jsx
  • backend/resources/js/Pages/operator/Workstation.jsx
  • backend/resources/js/components/flow/RoutingGraph.jsx
  • backend/resources/js/layouts/OperatorLayout.jsx
  • backend/tests/Feature/BomTest.php
  • backend/tests/Feature/Web/Operator/OperatorContextInUrlTest.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

Operators assigned to one active line now open that line directly, and line-switch controls depend on the operator’s active-line count. The BOM page now shows a routing graph with step-based component counts and filtering, and displays translated consumed-at labels.

Changes

Operator Line Entry

Layer / File(s) Summary
Single-line landing
backend/app/Http/Controllers/Web/Operator/LineController.php, backend/tests/Feature/Web/Operator/OperatorContextInUrlTest.php
Operators assigned to one active line are redirected to it. The controller retains a selected workstation only when it belongs to that line and is active. Tests cover the redirect and workstation selection.
Line-switch visibility
backend/app/Http/Middleware/HandleInertiaRequests.php, backend/resources/js/layouts/OperatorLayout.jsx, backend/resources/js/Pages/operator/Queue.jsx, backend/resources/js/Pages/operator/Workstation.jsx, backend/tests/Feature/Web/Operator/OperatorContextInUrlTest.php, CHANGELOG.md
The middleware shares whether an operator can switch lines. The layout, queue, and workstation pages use the value to show or hide line-switch controls. Tests cover the single-line and multi-line cases.

BOM Routing Graph

Layer / File(s) Summary
BOM step data
backend/app/Http/Controllers/Web/Admin/BomManagementController.php, backend/tests/Feature/BomTest.php
The BOM page receives step optional status, variant group, and workstation details. The feature test checks the returned step data.
Routing graph badges and focus
backend/resources/js/components/flow/RoutingGraph.jsx, backend/resources/js/Pages/admin/process-templates/Show.jsx
The graph supports node badges and framing around the selected step and its neighbors. The process-template page enables focused framing.
BOM step filtering and labels
backend/resources/js/Pages/admin/process-templates/Bom.jsx, backend/lang/en.json, backend/lang/pl.json
The BOM page connects graph selection and the step dropdown to URL-based filtering. Graph nodes show component counts. Consumed-at values and graph instructions use translated labels.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant LineController
  participant Session
  Operator->>LineController: Request line selection
  LineController->>Session: Store line and valid workstation
  LineController-->>Operator: Redirect to the selected line
Loading

Suggested reviewers: jakub-przepiora

Merge Risk: ⚪ Minimal · up to a363d

The single-line landing and BOM graph changes have no identified merge-blocking issue. Step filtering preserves graph counts. Merge after normal checks pass.

Security Architecture Review

Security architecture risk: 🔵 Low · up to a363d

The changes remain within existing authenticated workflows. Assigned-line and template ownership checks are preserved, and the new BOM graph does not enable routing edits. No introduced security weakness was verified, but concurrent-session behavior and revocation after selection remain uncertain.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly affected security surface is authenticated operator session context and permission-controlled BOM metadata. Automatic landing resolves its line from the user’s active assignments, and newly exposed workstation fields are limited to id/name. The inspected changes do not establish broader tenant, service, or infrastructure exposure.

Trust Boundaries and Controls

  • observed — Operator routes require authentication and an Operator, Supervisor, or Admin role. BOM routes require authentication and pass through tab-access enforcement, which checks module availability and tab permission, or requires Admin for unmapped paths. The BOM controller separately enforces product-type/template ownership.
  • observed — The new BOM graph supplies neither a links array nor an editing base URL. RoutingGraph enables connection and deletion callbacks only when a links array is supplied, so this caller adds selection and framing without enabling routing mutations. Captions and badges render as React text.

Resilience and Maintainability Implications

  • observed — The unchanged downstream resolver authorizes an explicit URL line but otherwise reuses stored line context. Workstation resolution normally checks line ownership but does not recheck active status. Automatic landing validates activity before selection; revocation after that point and concurrent session updates remain unresolved rather than verified PR-introduced concerns.
🚥 Pre-merge checks | ✅ 3 | ❌ 1 | ❓ 1

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 11 files. (3 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and misspelled. It does not identify the main change: automatically opening the assigned line when an operator has only one line. Replace the title with a concise, specific summary such as "Open the assigned line automatically for single-line operators".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 11 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

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

@Svannte

Svannte commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Svannte
Svannte changed the base branch from main to develop October 1, 2026 07:24
@jakub-przepiora
jakub-przepiora merged commit bef4e83 into develop Oct 1, 2026
2 of 3 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.

2 participants