Repository navigation
Restore full-text results in the entry editor - #17367
Conversation
PR Summary by QodoRestore linked-file full-text results in the entry editor
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1.
|
| if (updateSequence == searchUpdateSequence.get()) { | ||
| searchResults.set(Optional.empty()); | ||
| } |
There was a problem hiding this comment.
Please a small Java comment on the why.
| searchResults.set(results); | ||
| results.ifPresentOrElse(this::setSearchMatches, this::clearSearchMatches); |
There was a problem hiding this comment.
Strange that both (.set and .setSearchMatchees) is needed - maybe small Java comment why searchResults and searchMatches need to be updated? IDK.
Should we creae/link requirements on the various places?
There was a problem hiding this comment.
added a comment and requirements
|
Follow-up commit dc27413 addresses the review feedback: the regression test now verifies linked-file match text and its page link, the new test class is null-marked, and the search model comments explain the FX-thread clear and why detailed editor results and table row flags are updated separately. It also adds one traced requirement and applies the CI formatting change. The focused entry-editor, main-table, and global-search tests, requirement tracing, Java style checks, rewrite dry run, Markdown lint, and text lint passed locally. |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin port-17367-to-stable
git worktree add --checkout .worktree/port-17367-to-stable port-17367-to-stable
cd .worktree/port-17367-to-stable
git reset --hard HEAD^
git cherry-pick -x 091e8897bcd9f7dcecbb499ae6e48332ffefec21 |
Summary
Restore linked-file full-text matches in the entry editor after the main table began searching a query snapshot. The results tab now consumes the accepted per-library search results, including after library switches.
jabref-contrib-policy:4.2:reviewed:okAnalogies
Like honey retaining its source, the result view follows its library; like chocolate, it presents the useful part of the search; unlike the moon, it should not disappear when the view changes.
Steps to test
Automated focused search tests,
:jablib:check, style checks, modernizer, rewrite dry run, and Javadoc passed.:jabgui:checkremains red because the unrelatedNativeDesktopTest.openBrowserPassesFullUrlToCustomBrowser()fails even in isolation.Related issues and pull requests
No matching issue identified. This follows the search-result snapshot change in commit
b3fa1c98b0.Closes N/A
AI usage
OpenAI Codex assisted with investigation, implementation, and tests (AIL3). The maintainer reports having reviewed the changes and manually tested the result. Exact model ID: TODO — confirm from the client before marking ready.
AI CHECKLIST.md walkthrough
Code checklist
1. Code self-review
Nullability and control flow
== null/!= nullchecks — JSpecify annotations used instead.Objects.requireNonNull(...)added.SearchDisplayrecord annotated with@NullMarked.Optionalconsumed withifPresent/ifPresentOrElse/map/flatMap/orElseThrow.Exceptions
catch (Exception e)added.Style and idioms
BibEntryin tests is created withoutsetField.BackgroundTask.User-facing text
Security
Tests
2. Verification commands
./gradlew :jablib:checkpassed../gradlew checkstyleMain checkstyleTest checkstyleJmhpassed../gradlew modernizerpassed../gradlew --no-configuration-cache :rewriteDryRunpassed without changes../gradlew javadocpassed.npx markdownlint-cli2 "docs/**/*.md" "*.md"passed.npm ci && npm run textlint:npm run textlintpassed;npm ciwas not run.3. Documentation
CHANGELOG.mdentry added near search fixes; PR link pending draft PR number.4. Pull request
.github/PULL_REQUEST_TEMPLATE.md, with pending items explicit.gh pr create --body-file.TODOwith the PR link, committed and pushed; PR remains draft until pending items are complete.Checklist
CHANGELOG.mddescribing the change from the user's point of view.