Skip to content

[Cursor] microsoft/pxt#​11262 — Homescreen search - #48

Open
IanMatthewHuff wants to merge 1 commit into
base/pr-11262-ed81728-run-20260603T212949Zfrom
review/pr-11262-51d43d7-run-20260603T212949Z-cursor
Open

[Cursor] microsoft/pxt#​11262 — Homescreen search#48
IanMatthewHuff wants to merge 1 commit into
base/pr-11262-ed81728-run-20260603T212949Zfrom
review/pr-11262-51d43d7-run-20260603T212949Z-cursor

Conversation

@IanMatthewHuff

@IanMatthewHuff IanMatthewHuff commented Jun 3, 2026

Copy link
Copy Markdown
Owner

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/11262
Created 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). CodeCard and target config gain optional searchTerms and searchGalleries (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 / Input gain autoFocus; detail/share actions move toward react-common controls. Layout/CSS: Home tab uses flex column, stable scrollbar, footer pinned with margin-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.

@IanMatthewHuff IanMatthewHuff added the pr-sxs-human-evals/review-overlap-pr Mirrored review PR created by pr-sxs-human-evals label Jun 3, 2026
@IanMatthewHuff

Copy link
Copy Markdown
Owner Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 5 potential issues.

Fix All in Cursor

❌ 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.

Comment thread webapp/src/projects.tsx
selectedIndex: undefined
});
});
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c197749. Configure here.

lastHomeFuseKey = searchKey;
}

return lastHomeFuse.search(search.term);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c197749. Configure here.

Comment thread webapp/src/projects.tsx
this.chgGallery(scr);
return;
}
this.setSelected(SEARCH_CATEGORY, index);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c197749. Configure here.

Comment thread webapp/src/projects.tsx
searchTerms: Array.isArray(card.searchTerms) ? card.searchTerms.join(" ") : ""
});
}));
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c197749. Configure here.

Comment thread webapp/src/projects.tsx
tabIndex={0}
>
<span className="ui text">{text}</span>
</Link>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c197749. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-sxs-human-evals/review-overlap-pr Mirrored review PR created by pr-sxs-human-evals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant