Repository navigation
[pull] master from inventree:master - #148
Merged
Merged
Conversation
* Support minimum column width * Adjust DescriptionColumn and StatusColumn * Column refactoring * Refactor PartColumn * Refactor LineItemsProgerssColumn * Tweaks * Ensure "can_build" value is not negative * Render row expansion icon * Add subassembly table for BOM * Add controls for BOM editing * Fix row click context * Improve rendering for BOM sub-rows * Hide BOM actions unless editing * Disable row expansion for now * Revert gitleaks changes * Remove gitleaks tags * Remove dead code * Remove commented code * Adjust playwright tests Co-authored-by: Copilot <copilot@github.com> * Update docs Co-authored-by: Copilot <copilot@github.com> * Further playwright fixes --------- Co-authored-by: Copilot <copilot@github.com>
* Adjust system settings - Rearrange settings to match major menu groups - Split long settings panels into separate lists Co-authored-by: Copilot <copilot@github.com> * Adjust playwright tests --------- Co-authored-by: Copilot <copilot@github.com>
* Add subassembly expansion Co-authored-by: Copilot <copilot@github.com> * Enable multi-level subassembly display Co-authored-by: Copilot <copilot@github.com> * Adjust padding * Adds user setting to enable / disable subassembly view Co-authored-by: Copilot <copilot@github.com> * Add icon * Additional playwright tests Co-authored-by: Copilot <copilot@github.com> --------- Co-authored-by: Copilot <copilot@github.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )
Greptile Summary
This PR syncs upstream InvenTree changes, introducing multi-level BOM subassembly row expansion, a new BOM edit-mode toggle, a reorganised System Settings tab layout, and a bug fix for the test-result refresh callback in
StockItemTestResultTable. All changes are accompanied by updated Playwright tests and documentation.Confidence Score: 4/5
Safe to merge — all findings are P2; no data loss, security, or runtime-crash risks identified.
Only P2 findings: a React hooks naming convention violation in BomSubassemblyTable, a UX regression (cell-click navigation removed), and a settings UI misclassification (SIGNUP_GROUP under SSO). No P0/P1 issues found.
src/frontend/src/tables/bom/BomSubassemblyTable.tsx (hooks naming) and src/frontend/src/pages/Index/Settings/SystemSettings.tsx (SIGNUP_GROUP placement).
Important Files Changed
subassemblyRowExpansionwhich calls React hooks but is not named with theuseprefix, violating the Rules of Hooks naming convention.editSubstitues→editSubstitutes), and addsMath.max(0, ...)guard forcan_build;onCellClick: () => {}disables previous cell-click-to-navigate behaviour for all BOM rows.SIGNUP_GROUPrelocated to SSO section despite applying to all registration flows.onFormSuccess: () => table.refreshTable(which returned the function without calling it) withtable: tableso the refresh fires correctly after editing a test result.SHOW_BOM_SUBASSEMBLY_LEVELSuser setting (bool, defaultTrue) for the new sub-assembly display mode.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[BomTable] -->|view mode| B{SHOW_BOM_SUBASSEMBLY_LEVELS?} B -->|true| C[subassemblyRowExpansion returns config] B -->|false| D[rowExpansion = undefined] C --> E[Row expanded?] E -->|yes| F[BomSubassemblyTable partId=sub_part] F --> G{SHOW_BOM_SUBASSEMBLY_LEVELS?} G -->|true| H[Nested subassemblyRowExpansion] H --> E G -->|false| I[No further expansion] A -->|edit mode| J[rowExpansion disabled, rowActions enabled, selection enabled]Comments Outside Diff (3)
src/frontend/src/tables/bom/BomSubassemblyTable.tsx, line 435-459 (link)Custom hook missing
useprefixsubassemblyRowExpansioninternally callsuseUserSettingsState()anduseMemo(), making it a custom hook by React's rules. Without theuseprefix, the ESLintreact-hooksplugin will not apply Rules of Hooks enforcement inside it — meaning a future caller could accidentally invoke it conditionally (e.g., inside auseMemoor anifbranch) and the linter won't catch the violation.All call sites (
BomTableandBomSubassemblyTable) would need to be updated touseSubassemblyRowExpansion(...)as well.src/frontend/src/pages/Index/Settings/SystemSettings.tsx, line 128-141 (link)SIGNUP_GROUPmisclassified under SSO settingsSIGNUP_GROUP("Group to which new users are assigned on registration") applies to all registration flows, not just SSO. Its backend description even notes "If SSO group sync is enabled, this group is only set if no group can be assigned from the IdP" — confirming it is primarily a general-registration setting. Moving it under the "Single Sign-On (SSO) Settings" heading will make it invisible to admins who use standard (non-SSO) registration, potentially causing accidental misconfiguration.Consider keeping
SIGNUP_GROUP(andLOGIN_SIGNUP_MAIL_RESTRICTION) in the general login/signup group above the SSO heading. Was moving SIGNUP_GROUP into the SSO section intentional? It applies to all new-user registrations, not only SSO-based ones.src/frontend/src/tables/bom/BomTable.tsx, line 730 (link)Cell-click navigation disabled for all BOM rows
Setting
onCellClick: () => {}short-circuits theInvenTreeTablehandler: whenonCellClickis provided the table never falls through to themodelType-based navigation (seeInvenTreeTable.tsxline 669-682). This removes the existing behaviour where clicking any BOM row navigated to the sub-part's detail page — even for non-assembly leaf parts that have no row expansion.The same pattern is used in
BuildLineTable, so this appears intentional, but it is a user-facing regression worth calling out explicitly.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "[UI] BOM row expand (#11809)" | Re-trigger Greptile