-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix empty entries array when exporting group chat to JSON #14814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix empty entries array when exporting group chat to JSON #14814
Conversation
Fixes JabRef#14647 The issue was caused by AiChatComponent using stateManager.getSelectedEntries() instead of the passed entries parameter. This meant the export used currently selected entries (which could be empty) instead of the group's entries. Changes: - Use passed entries parameter instead of stateManager.getSelectedEntries() - Remove unused stateManager parameter from AiChatComponent, AiChatGuardedComponent, and AiChatWindow - Update all constructor calls and tests accordingly - Add CHANGELOG entry
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
CI Status UpdateAll core tests pass successfully:
Failing checks:
The core functionality changes are tested and working correctly. |
Can be "fixed" by finishing unicode-org/icu#2127 :) Maybe, its easier with AI to code C then :) |
koppor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise looks good.
Someone needs to try out.
|
Note that the previous attempt was very complex - not sure if that complexity was neded: https://github.com/JabRef/jabref/pull/14651/files Really needs to be tried out. |
|
With "try out", I mean: chat with a group of entries NOT being the All Entries group. |
|
Thank you for the feedback @koppor! I tested the fix with a custom group (not All Entries) and it works correctly:
The fix ensures that GroupChatViewModel.getEntries() returns the actual entries from the group, not an empty list. Let me know if you need any additional testing or changes! |
* upstream/main: (64 commits) New Crowdin updates (JabRef#14862) Make JDK25 available (JabRef#14861) Fix empty entries array when exporting group chat to JSON (JabRef#14814) feat: add right-click copy context menu to AI chat messages (JabRef#14722) FIX : generic error dialog and icon in Source Tab parsing (JabRef#14828) Factor out setup-* actions (JabRef#14859) Link .http files. Update dependency org.postgresql:postgresql to v42.7.9 (JabRef#14857) Add more commands to JabSrv (JabRef#14855) Fix JabRef#14821: Hide identifier action buttons when field is empty (JabRef#14831) Add GH_TOKEN to closed issues/PRs processing step New Crowdin updates (JabRef#14854) New Crowdin updates (JabRef#14849) Chore(deps): Bump jablib/src/main/resources/csl-styles from `0201999` to `f345aa8` (JabRef#14833) Add support for book front covers, again (JabRef#14777) Readd min width to button in new enty dialog (JabRef#14791) Replace plugin impl from jbang plugin (JabRef#14846) Revise AI policy wording Chore(deps): Bump jablib/src/main/resources/csl-locales (JabRef#14677) Update dependency com.konghq:unirest-modules-gson to v4.7.1 (JabRef#14845) ...
Closes #14647
This PR fixes an issue where exporting a group chat to JSON resulted in an empty
entriesarray. The bug was inAiChatComponent.javawhich usedstateManager.getSelectedEntries()instead of the passedentriesparameter.Changes Made
entriesparameter instead ofstateManager.getSelectedEntries()inAiChatComponentstateManagerparameter fromAiChatComponent,AiChatGuardedComponent, andAiChatWindowSteps to test
entriesarray in the exported JSON contains the group entries (not empty)Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)