kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Show "More to explore", related questions and similar topics in Learn search results

Open akolson opened this issue 1 month ago • 1 comments

Overview

With a language model, the results page shows similar topics, related questions and "More to explore". Each "More to explore" group is a query that the pipeline used, with its count and up to 3 result cards. Selecting any topic, question or count runs it as a new search.

This task shows these sections on the results page, each only when its field is present.

Complexity: Medium Target branch: develop

Context

#15567 defines the fields in "The front-end contract" and their placement in "Results page". #15744 builds the results page, which shows AI sections only at level lm, each only when its field is present. #15737 fills the fields, and at level lm the test backend of the AI search plugin (#15732) returns two of each, with up to 3 results in each explore group.

searchAndFilterStrings already has resultsCount ("{count} results", with plural forms) (lines 67 to 70).

Design, with the Figma page "V2 - Learn" for detail:

Library page Inside a channel
Results page at level lm with the AI sections Search results inside a channel

The Change

Section Field Placement and form
Similar topics similar_topics A card in the results grid, with a heading and one button for each topic
Related questions related_questions A list of buttons below the results, under its own heading
More to explore explore_groups Below related questions. For each group, its query as a heading, a count button such as "24 results ›" using resultsCount, and its results as cards

A section shows only when its field holds at least one entry. A group with no results shows its heading and count only.

Selecting a topic, a question or a count does what typing its text and pressing Enter does: the search bar shows the text, the applied filters stay, and a full search runs with question.

"More to explore", the two headings, and the count button's accessible name are new translatable strings. UI string review settles the count's wording, because a count can be larger than the results that its search shows.

How to Get There

  1. Start the dev server, and import the Kolibri QA Channel (token nakav-mafak).
  2. Run kolibri plugin enable kolibri.plugins.ai_search, restart, and run kolibri manage ai_search --backend test --level lm.
  3. In Learn, search for "fractions". The results grid holds a "Similar topics" card, and below the results are "Related questions" and "More to explore", with two groups of cards.
  4. Select a group's count. The search bar shows its query, and a new search runs with the same filters.
  5. Select a related question, then a similar topic. Each runs a new search in the same way.
  6. Repeat step 3 inside the channel.
  7. Run kolibri manage ai_search --backend test --level vector, and search again. None of the three sections shows.

Out of Scope

  • A source for these sections without a language model. #15567 hides them.
  • The count's final wording. UI string review settles it.

Acceptance Criteria

General

  • [ ] At level lm, each section shows as its row in The Change describes, on the Library page and inside a channel.
  • [ ] A section whose field is missing or empty does not show.
  • [ ] At level vector or keyword, none of these sections shows.
  • [ ] Selecting the "perfect squares" count puts "perfect squares" in the search bar, keeps the applied filters, and sends ?question=perfect squares.
  • [ ] Selecting a related question or a similar topic does the same with its text.
  • [ ] A group's result cards open their resources as any result card does.
  • [ ] A count of 1 reads "1 result".

Accessibility and i18n

  • [ ] Each count button has an accessible name that holds the query and its count.
  • [ ] Each topic and question is a button, with its text as its accessible name.
  • [ ] Each section and each group has a heading, and the new strings are translatable.
  • [ ] The sections work with the keyboard, and their layout works in right-to-left languages.

Testing

  • [ ] Frontend tests cover each General criterion.

Testing

QA checks this in the browser with the test backend, following "How to Get There", and also checks the controls with the keyboard and a screen reader, and the layout in a right-to-left language.

pnpm test-jest kolibri/plugins/learn/frontend/views

AI usage

I used Claude Code to draft this issue from my breakdown of #15567. I chose to run every selected item as a new full search, as if the learner typed it, and to show each group's results as cards, following the design. I reviewed and edited the draft.

akolson avatar Nov 03 '26 08:11 akolson

Hi! 👋

Thanks so much for your interest! This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.

We really appreciate your willingness to help. 😊

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Nov 10 '26 15:11 learning-equality-bot