Skip to content

feat(backend): add tipps endpoint - #10715

Closed
matmair wants to merge 84 commits into
inventree:masterfrom
matmair:add-tipps-model
Closed

matmair wants to merge 84 commits into
inventree:masterfrom
matmair:add-tipps-model

Conversation

@matmair

@matmair matmair commented Oct 29, 2025 •

Copy link
Copy Markdown
Member

Adds models, API endpoints and frontend components to show tipps in the frontend dependent on various conditions

TODO

  • add collection mechanism
  • add data model to calculate is_applicable based on types
  • performance test
  • frontend: add state
  • add hook
  • add exported tipp component that only takes an id or slag

Todo next:

Required for #2907 and #2284
Follow up to #7995

@matmair matmair added this to the 1.1.0 milestone Oct 29, 2025
@matmair matmair self-assigned this Oct 29, 2025
@matmair matmair added enhancement This is an suggested enhancement or new feature api Relates to the API User Interface Related to the frontend / User Interface labels Oct 29, 2025
@netlify

netlify Bot commented Oct 29, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 46e6d07
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a876ed1c62e740008ba89eb
😎 Deploy Preview https://deploy-preview-10715--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (no change from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This was referenced Oct 29, 2025
@codecov

codecov Bot commented Oct 29, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.92473% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.50%. Comparing base (cc77d1d) to head (743a474).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10715      +/-   ##
==========================================
+ Coverage   91.46%   91.50%   +0.04%     
==========================================
  Files         965      972       +7     
  Lines       49989    50266     +277     
==========================================
+ Hits        45723    45997     +274     
- Misses       4266     4269       +3     
Flag Coverage Δ
backend 89.32% <98.92%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend Apps 91.79% <98.90%> (+0.05%) ⬆️
Backend General 93.41% <ø> (ø)
Frontend ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat SchrodingersGat modified the milestones: 1.2.0, 1.3.0 Jan 27, 2026
@matmair matmair modified the milestones: 1.3.0, 1.2.0 Feb 2, 2026
@SchrodingersGat SchrodingersGat modified the milestones: 1.2.0, 1.3.0 Feb 10, 2026
@codspeed

codspeed Bot commented Feb 26, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 9.2%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 7 improved benchmarks
✅ 37 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ WallTime test_api_list_performance[/api/part/] 79.1 ms 72.9 ms +8.59%
⚡ WallTime test_api_list_performance[/api/stock/location/] 21 ms 19.7 ms +6.59%
⚡ WallTime test_search_performance[purchaseorder] 25.8 ms 23.6 ms +9.2%
⚡ WallTime test_api_options_performance[/api/stock/location/] 25.4 ms 23.5 ms +7.85%
⚡ WallTime test_search_performance[supplierpart] 41.1 ms 38.7 ms +6.03%
⚡ WallTime test_search_performance[manufacturerpart] 22.5 ms 21.3 ms +6.04%
⚡ WallTime test_api_list_performance[/api/part/category/] 17.3 ms 16.2 ms +6.89%

Comparing matmair:add-tipps-model (934bfe4) with master (ac9a1f2)1

Open in CodSpeed

Footnotes

  1. No successful run was found on master (b18016e) during the generation of this report, so ac9a1f2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@SchrodingersGat SchrodingersGat modified the milestones: 1.3.0, 1.4.0 Mar 18, 2026
@matmair
matmair marked this pull request as draft August 20, 2026 21:17
@matmair

matmair commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

Just curious, what is the usecase of defining them on the backend rather than hardcoding them into the frontend? Can that be used by plugins?

to be used by plugins and to have something to test that against

Are they still translated and actually show the correct language the user has selected?

in the language provided in the header of the api request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API enhancement This is an suggested enhancement or new feature User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants