You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: install-source trust badges and source-change warning
- Added classifyInstallSource(url) helper in shared/utils.js mapping install/update URLs to known userscript registries with tone-coded trust signals (Greasy Fork good, Sleazy Fork warn, OpenUserJS good, GitHub release good/raw/repo neutral, etc.).
- installFromCode and applyUpdate persist script.installSource and flip settings.sourceIdentityChanged when the registry id rotates between install and update.
- Dashboard script rows render the source badge plus a Source changed warning; install confirmation page surfaces a Source registry changed review row when re-installing from a different registry.
Copy file name to clipboardExpand all lines: ROADMAP.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,12 +392,13 @@ Scale: Fit `Y/M/N`, impact and effort `1-5`, novelty `P` parity or `L` leapfrog.
392
392
- Verify: search regression tests and manual editor search session.
393
393
- Status: Shipped 2026-05-24. Two surfaces. (1) Dashboard search corpus broadened: a new `buildScriptSearchCorpus(script)` helper flattens name/description/author/namespace/version, all URL pattern fields (`match`, `include`, `exclude`, `userMatches`, `userIncludes`, `userExcludes`), tags (`meta.tag` + `settings.tags`), grants, homepage/support/update/download URLs, and ISO yyyy-mm-dd renderings of `stats.lastRun` + `updatedAt` into a single lowercased string. The substring/regex/code branches of `getFilteredScripts` all hit this corpus, so plain queries now match URL keywords, GreasyFork/OpenUserJS source slugs, last-run dates, and tag values. Corpus is memoized per-script keyed on `updatedAt` so repeated keystrokes don't rebuild it. (2) Editor find-widget search history persists to `chrome.storage.local.editorFindHistory` (FIFO 20, dedup with most-recent-first). The Monaco sandbox forwards every `searchString` change via `postMessage({type:'find-search'})`; `monaco-adapter.js` records via `recordFindTerm`, then primes the next editor open by posting `prime-find` with the saved history so the find widget opens pre-filled with the most recent term across sessions. Verification: `npx vitest run tests/search-corpus-history.test.js tests/site-frame-invert.test.js tests/dashboard-modules.test.js --pool=vmThreads --maxWorkers=1` passed (51 tests across 3 files); `npm run typecheck` clean.
394
394
395
-
-[] P2 - Add install-source trust badges without full marketplace scope
395
+
-[x] P2 - Add install-source trust badges without full marketplace scope
396
396
- Why: Registry source is a useful trust signal, but a full marketplace adds moderation risk.
- Acceptance: Scripts installed from known registries show durable source metadata and warnings when source identity changes.
400
400
- Verify: local fixture URLs for GreasyFork/OpenUserJS/GitHub/raw.
401
+
- Status: Shipped 2026-05-24. New shared `classifyInstallSource(url)` helper (in `shared/utils.js`, accessible from background.js, dashboard, install page) returns a stable `{ id, name, hostname, tone, url }` shape for Greasy Fork, Sleazy Fork (warn), OpenUserJS, GitHub Gist / raw / repo / release (release is the strongest tier), GitLab, Codeberg, Bitbucket, Tampermonkey site, and `other` (warn) for unknown hosts. Empty input maps to `local`. `installFromCode` records `script.installSource` at install time; `applyUpdate` reclassifies on update and — when the registry id changes — flips `settings.sourceIdentityChanged = true` and preserves the prior record in `script.previousInstallSource`. Dashboard script rows render a tone-coded badge (`good`/`neutral`/`alert` — new `.script-health-badge.good`/`.neutral` CSS reusing the existing 8px corner radius to honor the no-pill-backdrops global rule). Install confirmation page's trust card embeds a `Source registry changed` review row when re-installing from a different registry than the original source. Verification: `npx vitest run tests/install-source.test.js tests/utils.test.js tests/core-flows.test.js tests/runtime-import-export.test.js --pool=vmThreads --maxWorkers=1` passed (79 tests across 4 files); `npm run typecheck` clean; `npm run build:bg` clean (background.js 21,474 lines).
401
402
402
403
-[ ] P2 - Add locale coverage and forced language checks
403
404
- Why: `_locales` exists, but coverage should be reported and not silently regress.
? `<span class="script-health-badge alert" title="The update channel now points to a different registry than the original install (${escapeHtml(script.previousInstallSource?.name || 'unknown')} → ${escapeHtml(script.installSource?.name || 'unknown')}). Review before trusting future updates.">Source changed</span>`
4893
+
: '';
4879
4894
if (hasErrors) tr.classList.add('row-has-errors');
4880
4895
if (isStale) tr.classList.add('row-stale');
4881
4896
if (overBudget) tr.classList.add('row-over-budget');
<span>Previous install came from ${escapeHtml(provenance.sourceChange.previous.name)} (${escapeHtml(provenance.sourceChange.previous.hostname||'—')}). This update is from ${escapeHtml(provenance.sourceChange.next.name)} (${escapeHtml(provenance.sourceChange.next.hostname||'—')}). Confirm you trust the new origin before installing.</span>
0 commit comments