Repository navigation
feat(tracking): capture Microsoft Copilot shoppingCards into prompt_results - #85
Merged
gkhngyk merged 1 commit intoMay 23, 2026
Conversation
…esults Companion to #46. Copilot returns its product cards under camelCase `shoppingCards`; unwrap it into the same parsed `shopping_cards` key so it lands in prompt_results.shopping_cards raw (Copilot shape), alongside Perplexity's snake_case cards in the same column. Contents are stored verbatim — downstream branches on `platform` for shape. Stacked on #46 (PR #83), which adds the column, types, and result-handler. Closes #47
gkhngyk
added a commit
that referenced
this pull request
May 23, 2026
…esults (#87) Copilot returns its product cards under camelCase `shoppingCards`; unwrap into the shared snake_case `shopping_cards` parsed key (generic branch that Copilot + Perplexity share). Verified live against Cloro (real populated card). Stored verbatim; downstream branches on `platform` for shape. Closes #47 (Redo: the original PR #85 was stacked on the Perplexity branch and got merged into that branch instead of main, so the change never reached main. This targets main directly off the merged #46.)
This branch was successfully deployed
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.
Summary
Companion to #46 — captures Microsoft Copilot's product cards into
prompt_results.shopping_cards, the same column Perplexity writes to. Copilot returns its cards under camelCaseshoppingCards; we unwrap that into the parsed object'sshopping_cardskey so the existing storage path (column, types, result-handler from #46) needs no Copilot-specific code.Both providers store their cards raw, in their own shape — downstream branches on
prompt_results.platformto interpret. No flattening, no normalization.Closes #47
Change
Single line in
server/src/lib/cloro-scraper.js(the generic/non-Google branch that Copilot + Perplexity both use):result.shopping_cards(snake_case)result.shoppingCards(camelCase)[]There's no dedicated Copilot branch in the parser (Copilot goes through the shared generic branch), so handling both keys there is the minimal, non-duplicating change — rather than forking a Copilot-only branch that would copy the text/citations/model logic.
Stacked on #46
Depends on #46 (PR #83), which adds the
shopping_cardscolumn, Supabase types, and the result-handler insert. This PR is based on that branch — merge #83 first; GitHub will then retarget this tomainand the diff is the single line above.Verification
node --checkpasses on the parser.shopping_cardsis a real top-level key on the Cloro response). The Copilot key (shoppingCards) follows the same Cloro docs.Out of scope
Shape normalization, UI, scoring, brand-in-card detection, MCP/REST exposure — all future, same as #46.