Repository navigation
Deploy guardrails, rules fixes and a privacy policy that matches 2.1 - #1
Open
EnesYilmazcode wants to merge 23 commits into
Open
EnesYilmazcode wants to merge 23 commits into
EnesYilmazcode wants to merge 23 commits into
Conversation
…flag The flag is inlined by Vite, so a production-shaped bundle can be built against the emulators and dev can opt out. Emulator ports come from VITE_AUTH_EMULATOR_PORT and VITE_FIRESTORE_EMULATOR_PORT.
scripts/emulators.mjs writes a temporary firebase config with the requested ports and runs start or exec against demo-proscan. The QA scripts read the emulator hosts from the environment instead of hardcoding 8080 and 9099. Adds npm run test:rules.
The Firestore emulator's java.exe survives firebase exiting on Windows and holds its port, which breaks the next run.
The drawer shows 'new' by default but never writes it, so the rule's lead.stage check rejected the first note on every untriaged product. Treat a missing stage as 'new' and require lead to be a map. Adds scripts/qa-lead-rules.mjs to npm run test:rules (F-44).
Listener and read failures are now logged in every build, not only in dev. Board, runs, watchlist and drawer failures show the error code and message, with the console link when an index is missing. A failed workspace bootstrap blocks with a retry screen instead of loading an app that cannot read. Watchlist, nickname, lead note and export write failures raise a toast (F-42).
The board listens to the first 100, 300 or 500 rows and used to show that as the product count. When the window is full the header now reads "Showing the first 300 of 1,234 products", with the total from getCountFromServer, or "more not loaded" if the count fails. Movers scoped to a source says it filters the global top 100. Adds a rules test for the count queries (F-45).
Rank, Spread and Max Buy on the board, the Max Buy verdict in the drawer and Catalog on the watchlist are always empty for real users, because the extension's sync never writes those fields. Show them only once a loaded row carries the data, so the seed fixture and Phase 5 bring them back without a code change (F-25).
The /dashboard/** rewrite answered a request for an old chunk hash with index.html, and the assets header cached that for a year. The rewrite now only matches dotless paths, so a missing asset is a real 404. HTML and app routes are served no-cache. The router gets an errorElement and a stale chunk triggers one guarded reload. Adds npm run test:hosting, which runs on Linux because the Windows hosting emulator mangles paths (F-43).
Both builds inject a proscan-build meta tag and the landing build writes /version.json with the full sha, a dirty flag and the build time. The dashboard shows the short sha in the sidebar footer. build now cleans dist/ first, and build:landing no longer empties dist/ on its own, so running it alone can't delete the dashboard (F-40).
npm run deploy used to ship hosting only, so rules and composite index changes never reached production. It now deploys hosting, firestore:rules and firestore:indexes to proscanbot in one step, refuses a dirty tree or a branch other than main, and checks the bundle first: version.json carries a real sha and the prod bundle has no emulator wiring. Adds npm test (F-41).
On every PR and push to main: npm ci, typecheck, build, the production bundle check, the rules tests and the hosting test against the emulators, and a VITE_USE_EMULATOR build check. firebase-tools is pinned to 15.8.0 (F-40, F-83).
A board with exactly 300 products filled the window and read "more not loaded" even after the count came back 300.
Say that scans paginate and fetch offer pages with the user's Amazon session, that AI chat sends the question and scanned products to Gemini under the user's own key, and that sync is off in 2.1. Drop the 30 and 400 day retention promises, which nothing enforces, and name the processors.
Describe what the extension does today: paged scans of search and storefront results, opportunity scores, exports and bring-your-own-key chat. Show an amazon.com address in the mockup, add a meta description, and point the logo at / so clicking it no longer throws.
This was referenced Sep 24, 2026
Before this, a run that lost a port race force-killed whoever already held the port, including another checkout's emulators.
The 2.1 chat request also carries the search keyword or storefront ID, product counts, and the last six turns of the conversation.
The Sidebar's sign out isn't mounted there, so a rejected bootstrap write left Retry as the only way out.
A clean but stale local main passed the guard and would have pushed older hosting and rules over production.
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.
Stack, merge in order: #1 (this one) > #2.
The extension stack: EnesYilmazcode/AmazonSellerScraper#5, EnesYilmazcode/AmazonSellerScraper#6, EnesYilmazcode/AmazonSellerScraper#7, EnesYilmazcode/AmazonSellerScraper#8, EnesYilmazcode/AmazonSellerScraper#9.
First of two stacked PRs from the rebuild audit.
Production was serving a June 11 build, and nothing in the repo deployed rules or indexes (F-40, F-41).
npm run deploynow refuses a dirty tree, any branch other than main, or a main that is not origin/main, and deploys hosting, rules and indexes together. Every build is stamped with its commit in /version.json and in the sidebar.Other fixes:
The privacy policy, terms and landing page are rewritten to match extension 2.1 (F-91, F-93, F-95). The Gemini section lists everything 2.1's chat sends, including the scan source and the last few chat turns. The old page promised 30 and 400 day retention that nothing implemented.
Tested: npm test passes on Windows. That covers typecheck, build, the bundle check, and the rules tests on demo-proscan (28/28 sync, plus the lead and count tests). test:hosting passed 13/13 in WSL. It skips on Windows because the hosting emulator there breaks path matching. The 404 rewrite has never run against production, so curl /dashboard/assets/nope.js after the first deploy.
Does not change permissions. This repo has no manifest.json, so there is nothing for the lock to check.