Repository navigation
AI Mode search: natural-language placeholder; overview reads the top 20 and lists up to 10 picks - #532
Merged
Conversation
Deploying nemar-website with
|
| Latest commit: |
d94b720
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1c890288.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-531-overview-top-20.nemar-website.pages.dev |
…nd title (#531) role=list and aria-label on the ordered list (Safari drops list semantics under list-style none), an accessible name of id and title on each chip, and a visually hidden separator between a title and its reason. The panel and the follow-up message share the Top picks label. Source-order test added.
…keeps the suggestion (#531) A scheme glued to a word (see2https://...) is now broken, since the widget links any https?:// run with no word boundary, and | becomes a space so no line turns into a table row. When the lead-in and the suggestion do not fit, the lead-in is cut at a sentence (at least SEED_MIN_LEAD_IN_CHARS) to keep the suggestion whole; only a suggestion too long for that is dropped. Tests for each path; the 2000-character bound holds throughout.
…panel (#531) The request walks the hits in ranking order and reads a hit that has a card as the card, so a card with an unusable id no longer falls behind lower hits. A hit or card that is not an object is skipped, and a title, description or modality that is not text reads as empty. The parser lists a repeated pick once, caps distinct picks at ten, and reads a null suggestion as none.
…age marker before a dataset link (#531) Round-2 review: a web address split across two text segments, or a '!' right before [id](...), still reached the widget as a link or an image. Tests added for both.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #531
Feedback from a NEMAR maintainer on AI Mode search, website side. The OSA side is OpenScience-Collective/osa#748.
What changed
planSearchtakes anoverviewRowsoption: on page 1 of a search with the overview endpoint set, the endpoint is asked formax(pageSize, 20)hits.pageSearchreturns the visibleslice(stillpageSizecards) andoverviewHits(the first 20 of the ranked list; from the filtered window in window mode).overviewRequestForPagereads the hydrated cards, then the hits past them, withhitDescription(snippet without<mark>, elseTasks: ..., else empty). No extragetDatasetcalls.OVERVIEW_LIMITS.rowsMaxis 20.PICKS_MAXis 10.parseOverviewResponsereads the new optionalsuggestion(same id rule as the summary; absent on an older server, and a suggestion with no words is shown as none). It takes the request rows, so each pick carries its dataset title, cut to 90 characters.textContent; styles use the existing tokens.**Top picks**, suggestion. Within the 2000-character limit, picks are dropped from the end with their reasons kept, then listed without reasons, then dropped; the suggestion stays unless the lead-in and it cannot fit together; the last resort is cutting the lead-in at a sentence, as before. Picks carry no title in the seed, to leave room for up to ten.[Unreleased].Testing
bun run test: 178 files, 4935 tests pass (new: search planning for 20 rows, hits past the cards, picks up to ten with titles, suggestion parsing, render order guard, seed order and limits across 10 picks and suggestions)bun run lint(Biome) cleanbun run typecheck(astro check): 0 errorsbun run buildcompletesRollout
OSA#748 must reach the dev server (
develop-widget.osc.earth) before this merges tostaging, and the OSA release must reach production before this reachesmain: an older OSA refuses 20 rows with a 422, and the panel would stay hidden behind the "three or more words" note. The reverse is safe: an older website against the new OSA still sends 10 rows, shows 3 picks and ignoressuggestion.Review (round 1, two Sonnet reviewers)
Fixed:
see2https://...) was not broken in the follow-up message, and the widget links anyhttps?://run:WEB_SCHEMEhas no word boundary now; tested in the lead-in, a reason, the suggestion and the typed query.|in prose could turn a line of the follow-up message into a table row:|is blanked in prose; tested.role="list"andaria-label="Top picks"; each chip is named by id and title; a visually hidden ": " separates a title from its reason."suggestion": nullfailed the overview: it now reads as none; tested.[Unreleased]entry now covers these fixes.Rejected:
Checks after the fixes:
bun run test178 files and 4947 tests pass;bun run lintandbun run typecheckclean;astro buildcompletes. (bun run buildstopped in its first step,generate:og, because the live catalog API answered 500; that step only regenerates OG images and is unrelated to this change.)Review (round 2, one Sonnet reviewer, fix commits only)
The fixes came to about 150 non-test lines and touched the seed's link neutralising, so a delta review ran.
Fixed (
d94b720):"see https:"then"//x") was neutralised per segment and joined into a live link. Adjacent text segments are now neutralised as one run.!right before a dataset link made, an image. A space now separates them.Fixes 2 to 8 of round 1 were confirmed correct with no new defect.
bun run test: 4949 pass; lint and typecheck clean.