nick-boss-tech opened a new pull request, #5257:
URL: https://github.com/apache/solr/pull/5257

   🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
   
   ## Ready for review, but held as a draft due to the project's open-PR cap; 
I'll mark it open on request.
   
   https://issues.apache.org/jira/browse/SOLR-17849
   
   ## What happens today
   
   The new UI has no Index & Query header. A user cannot pick a collection 
there, and cannot see the request handlers of the chosen collection. The ticket 
asks for both dropdowns, with their loading and selection state.
   
   ## What this change does
   
   Adds the header and the state it needs. The request form, the response view 
and the request itself are not in this change.
   
   - 
[`IndexQueryHeader`](https://github.com/nick-boss-tech/solr/blob/cf35ab0329c41cdef11429906d1e669d38b9f3a9/ui/shared/src/commonMain/kotlin/org/apache/solr/ui/views/indexquery/IndexQueryHeader.kt):
 a collection dropdown and a request handler dropdown. The closed handler field 
shows the selected endpoint with its class on the same line, the class in 
monospace. Each menu entry shows the endpoint and its class. A long class name 
is cut with an ellipsis. The handler field is 384 px wide and the collection 
field 256 px, as in the design. Both dropdowns are disabled while loading and 
when there is nothing to pick. Messages cover no collections and a collection 
with no handlers.
   - 
[`IndexQueryStateHolder`](https://github.com/nick-boss-tech/solr/blob/cf35ab0329c41cdef11429906d1e669d38b9f3a9/ui/shared/src/commonMain/kotlin/org/apache/solr/ui/components/indexquery/viewmodel/IndexQueryStateHolder.kt):
 loads the collections and the handlers of the selected collection. It holds 
the selected collection and handler, and clears the handler when the collection 
changes.
   - 
[`HttpIndexQueryRepository`](https://github.com/nick-boss-tech/solr/blob/cf35ab0329c41cdef11429906d1e669d38b9f3a9/ui/shared/src/commonMain/kotlin/org/apache/solr/ui/components/indexquery/data/HttpIndexQueryRepository.kt):
 `GET api/collections` and `GET 
api/collections/{collection}/config/requestHandler`.
   - `RequestHandlerOption` moves to the domain package, and four strings are 
added.
   
   ## Scope of this change
   
   **Summary: the header comes with the state it needs to meet the ticket's 
criteria.**
   
   The ticket's criteria say that the collections are listed, that the handlers 
load for the selected collection, and that the selection is part of the state. 
Its "Additional Information" excludes only the form of a request handler. Three 
options fit the ticket:
   
   1. The header component only. The criteria for loading and state would stay 
open, because the header takes its lists and selection as parameters and 
nothing supplies them.
   2. The header with its loading and selection state (this change). It meets 
the criteria for collections, handlers and state, and it leaves out request 
execution.
   3. The whole screen, including running a request and showing its response. 
That is the content, which the ticket excludes and which Christos Malliaridis 
asked to keep in a separate pull request.
   
   This change takes option 2.
   
   ## Proof
   
   - `IndexQueryHeaderTest` passes 6 of 6, and `IndexQueryStateHolderTest` 
passes 3 of 3, at head `cf35ab0329`, verified 2026-10-27 with 
`:shared:spotlessCheck` and `:shared:jvmTest` on the software renderer.
   - These tests were carried over from the screen branch, where they passed at 
`b91f75ed93`. The request tests were removed with the request code. They are 
not new assertions, and no mutation run was made.
   - The one new test, `testSelectedHandlerShowsItsClassInTheClosedField`, 
fails on the previous head `14ff707865` (1 of 6 failed, the class text missing 
from the closed field) and passes at `cf35ab0329`.
   - Failing on the base is not possible: the components and the tests are new.
   
   ## Limits
   
   - No screen shows the header yet. The Index / Query tab wiring comes with 
the content pull request.
   - Not in this change: running a request, the response view, the request form 
(SOLR-17850's `SearchHandlerForm`), `execute` on the repository, and the 
Configsets wiring.
   - The field text and widths follow the Figma capture of node `137-12066`. 
The screen itself was not rendered or screenshotted.
   - The tests run on the JVM with a software renderer. Nothing was run in a 
browser.
   
   *AI-generated description. Nick Shanin directed the work and takes 
responsibility for this contribution.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to