Commit de0ddda
fix: Remove option limits and fix hierarchy mixing for coffee grades
Root cause fixes for option limiting and hierarchy mixing issues:
1. Remove .slice(0, 6) limit - now shows ALL relevant options instead of
arbitrarily cutting off valid HS codes (e.g., Robusta codes were hidden)
2. Increase maxOptions from 8 to 25 - allows complex hierarchies like
coffee grades (20+ options under 0901.11) to display fully
3. Increase leaf options limit from 8 to 25 - ensures all grade variants
are shown when navigating to specific code levels
4. Fix getAllChapters() to filter 4-digit headings only - prevents mixing
2-digit chapters (09) with 4-digit headings (0901) in first question
Test results: 36/37 passing (97%)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 87a6295 commit de0ddda
1 file changed
Lines changed: 14 additions & 6 deletions
File tree
- backend/src/services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
407 | 409 | | |
408 | | - | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
| |||
650 | 652 | | |
651 | 653 | | |
652 | 654 | | |
653 | | - | |
654 | | - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
655 | 662 | | |
656 | 663 | | |
657 | 664 | | |
658 | | - | |
| 665 | + | |
659 | 666 | | |
660 | 667 | | |
661 | 668 | | |
| |||
866 | 873 | | |
867 | 874 | | |
868 | 875 | | |
869 | | - | |
| 876 | + | |
870 | 877 | | |
871 | 878 | | |
872 | 879 | | |
| |||
1624 | 1631 | | |
1625 | 1632 | | |
1626 | 1633 | | |
| 1634 | + | |
1627 | 1635 | | |
1628 | | - | |
| 1636 | + | |
1629 | 1637 | | |
1630 | 1638 | | |
1631 | 1639 | | |
| |||
0 commit comments