[Cursor] microsoft/pxt#11262 — Homescreen search - #48
Conversation
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 5 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c197749. Configure here.
| selectedIndex: undefined | ||
| }); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Search results stay stale
Medium Severity
Homescreen search stores matches in component state via runSearch and does not run again when subscribed gallery or header data finishes loading. After async data arrives, the UI can keep showing an incomplete or empty result set until the user edits the query, even though getData has fresher content.
Reviewed by Cursor Bugbot for commit c197749. Configure here.
| lastHomeFuseKey = searchKey; | ||
| } | ||
|
|
||
| return lastHomeFuse.search(search.term); |
There was a problem hiding this comment.
Fuse cache ignores content updates
Medium Severity
The homescreen search worker reuses lastHomeFuse when lastHomeFuseKey matches, but that key is built only from entry id values. Updated names, descriptions, or searchTerms for the same ids are not re-indexed, so later searches can rank and match against outdated text.
Reviewed by Cursor Bugbot for commit c197749. Configure here.
| this.chgGallery(scr); | ||
| return; | ||
| } | ||
| this.setSelected(SEARCH_CATEGORY, index); |
There was a problem hiding this comment.
Search ignores directOpen cards
Medium Severity
Search result clicks always open the detail pane when an index is provided, without checking directOpen. Gallery cards configured to skip details and open immediately on the homescreen carousel instead get the detail flow in search mode.
Reviewed by Cursor Bugbot for commit c197749. Configure here.
| searchTerms: Array.isArray(card.searchTerms) ? card.searchTerms.join(" ") : "" | ||
| }); | ||
| })); | ||
| }); |
There was a problem hiding this comment.
Hidden galleries still searchable
Medium Severity
Search indexing walks all configured galleries via collectGallerySearchEntries without the experiment, locale, or connectivity filters used when rendering homescreen carousels. Content hidden from the main homescreen can still appear in search results.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c197749. Configure here.
| tabIndex={0} | ||
| > | ||
| <span className="ui text">{text}</span> | ||
| </Link> |
There was a problem hiding this comment.
Detail link loses autofocus
Low Severity
Replacing sui.Link with Link in cardActionButton dropped the ref and autoFocus wiring, while ProjectsDetail.componentDidMount still tries to focus linkRef. Primary link-style actions no longer receive initial keyboard focus when the detail view opens.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c197749. Configure here.


https://arcade.makecode.com/app/887b34eb813d38415c4c9fe2f80531d6b7142152-b79eca3302
not 100% sure where searchbox feels good so i put it in two places for demo sake; headerbar when on desktop, and on phone size it pops down to below hero banner. Happy to take any opinions / adjust as needed. Could also be hidden in a search / filter section overall i suppose
Mirrored from upstream PR:
https://github.com/microsoft/pxt/pull/11262Created automatically by pr-sxs-human-evals for code-review agent comparison.
(URL wrapped in a code span so GitHub does not create a cross-reference on the upstream timeline.)
5 upstream conversation comments were not mirrored — see the upstream PR for full review context.
Note
Medium Risk
Touches the main home/projects UX and async search indexing over user projects and gallery data; changes are mostly additive but affect a high-traffic surface.
Overview
Adds a homescreen search mode on the projects view so users can find tutorials, gallery examples, and local projects from one query.
Search pipeline: The compiler worker gains
homeSearch/homeSearchClear(Fuse.js over name, description,searchTerms, and tags).CodeCardand target config gain optionalsearchTermsandsearchGalleries(extra gallery content indexed for search but not shown as home carousels). The webapp builds a unified index from those galleries plus My Projects headers, warms the index on open, and routes clicks to open a project or gallery card (including Open Project for file cards).UI: Search toggles from My Projects (back, centered title, autofocus input); results render in a responsive grid with the existing detail pane. Shared
Button/InputgainautoFocus; detail/share actions move toward react-common controls. Layout/CSS: Home tab uses flex column, stable scrollbar, footer pinned withmargin-top: auto, and new styles for search mode and card action links.Reviewed by Cursor Bugbot for commit c197749. Bugbot is set up for automated code reviews on this repo. Configure here.