Skip to content

Read Chrome Web Store reviews - #31

Merged
MCCProgrammer merged 1 commit into
mainfrom
feat/chrome-reviews
Oct 28, 2026
Merged

MCCProgrammer merged 1 commit into
mainfrom
feat/chrome-reviews

Conversation

@MCCProgrammer

Copy link
Copy Markdown
Owner

What

Until now, ChromeWebStoreSource.fetchReviews always returned an empty list. The visible text of the reviews page has neither the stars nor a review ID, so the reviews couldn't be read from it.

  • Source: the page /detail/{id}/reviews also carries its reviews as JSON for its own scripts, in an AF_initDataCallback block. Each review there has a stable ID, stars, text, the version reviewed, the last-edit time and the developer's reply. The block is located through AF_dataServiceRequests: it is the request that asks for this item with a page size.
  • One request per language: the page lists only the 10 latest reviews in its own language (hl). The new extpulse.stores.chrome-web-store-review-languages setting is [en, pt]. Results are merged by review ID, newest first, up to 100.
  • Ratings without a comment: the store doesn't list them, so they aren't read. Director's Cut has 2 ratings and no written review, so it returns an empty list.
  • Failures: an unknown item is a ListingNotFoundException (the page has no <h1>). A page without the data block, or a review that isn't the expected shape, is a StoreException instead of a guess.
  • Replies: Chrome reviews now count for the inbox's "unanswered" filter and for replied, like the Marketplace's. Open VSX still has no replies. The rule is the new Store.hasReplies().
  • Not used: the store's batchexecute endpoint returns 100 reviews per call, but it is an undocumented API for the site's own scripts. The page is what any visitor gets. ADR 0009 explains this.

Tests

  • Recorded pages: AdBlock in English and Portuguese, with 17 replies; Director's Cut with no reviews; an unknown item. They are trimmed from about 800 KB to under 9 KB and anonymized, as described in the WireMock README.
  • ChromeWebStoreSourceTests: 9 new tests cover both languages merged and sorted, exact field values, a review listed in two languages counted once, ratings only, not found, a changed page, a review that isn't the expected shape, unreadable JSON, and an invalid ID.
  • ReviewsApiTests: a new test checks Chrome replies in replied and in unanswered.
  • LiveStoreTests: run against the real store, it now also reads AdBlock's reviews, and it passes.
  • ./mvnw verify passes: 175 tests and the coverage gate.

The reviews page carries its reviews as JSON for its scripts (AF_initDataCallback),
each with a review ID, stars, text, version, last-edit time and the developer's reply.
The page lists the 10 latest in its language, so every configured language
(English and Portuguese) is one request. Chrome replies now count for the unanswered
filter, like the Marketplace's.
@sonarqubecloud

Copy link
Copy Markdown

@MCCProgrammer
MCCProgrammer merged commit 795d53b into main Oct 28, 2026
10 checks passed
@MCCProgrammer
MCCProgrammer deleted the feat/chrome-reviews branch October 28, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant