@aarwitz/tapp 0.28.0 → 0.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tapp",
3
3
  "description": "Give Claude hands and eyes on iOS, Android, and web apps, with exploration, replayable flows, evidence, and deterministic CI gates.",
4
- "version": "0.28.0",
4
+ "version": "0.28.1",
5
5
  "author": {
6
6
  "name": "Aaron Horowitz",
7
7
  "url": "https://github.com/aarwitz"
@@ -24,7 +24,7 @@
24
24
  "command": "npx",
25
25
  "args": [
26
26
  "-y",
27
- "@aarwitz/tapp@0.28.0",
27
+ "@aarwitz/tapp@0.28.1",
28
28
  "mcp"
29
29
  ],
30
30
  "cwd": "${CLAUDE_PROJECT_DIR}"
package/browser/app.css CHANGED
@@ -594,3 +594,4 @@ dialog::backdrop { background:rgba(0,0,0,.6); }
594
594
  .token-reveal button { font:inherit; font-size:12px; padding:7px 12px; border-radius:8px; cursor:pointer; }
595
595
  .owned-link { text-align:center; margin-top:10px; }
596
596
  .owned-link button { font:inherit; font-size:13px; padding:7px 14px; border-radius:999px; border:1px solid var(--line); background:var(--control); color:inherit; cursor:pointer; }
597
+ .read-only-note { margin:6px 0 14px; font-size:12.5px; line-height:1.5; }
package/browser/app.js CHANGED
@@ -551,7 +551,8 @@ function renderRunDetail(run) {
551
551
  const audit = run.audit;
552
552
  const counts = audit.findingCounts || {};
553
553
  const issues = audit.issues || [];
554
- $("#run-detail").innerHTML = `<div class="run-detail-head"><div><p class="eyebrow">READ-ONLY AUDIT</p><h2>${esc(audit.url)}</h2><small><code>${esc(audit.id)}</code> · ${compactDate(audit.createdAt)} · nothing was clicked</small></div>${evidenceLink(audit.id, "Visual report")}</div><div class="run-stats"><div><strong>${audit.pagesAudited || 0}</strong><small>pages</small></div><div><strong>${issues.length}</strong><small>distinct issues</small></div><div><strong>${counts.high || 0}</strong><small>high</small></div><div><strong>${counts.medium || 0}</strong><small>medium</small></div></div><h3>Issues</h3>${issues.length ? `<ul class="detail-list">${issues.slice(0, 40).map((issue) => `<li><b>${esc(issue.severity)}</b> · ${esc(issue.title)}${issue.pages?.length > 1 ? ` <small>(${issue.pages.length} pages)</small>` : ""}</li>`).join("")}</ul>` : '<p class="muted">Nothing broken was observed. This says the pages are served without structural defects, not that the site works.</p>'}${renderObservations(audit)}${detailLists(audit)}`;
554
+ $("#run-detail").innerHTML = `<div class="run-detail-head"><div><p class="eyebrow">READ-ONLY AUDIT</p><h2>${esc(audit.url)}</h2><small><code>${esc(audit.id)}</code> · ${compactDate(audit.createdAt)} · nothing was clicked</small></div>${evidenceLink(audit.id, "Visual report")}</div>
555
+ <p class="muted read-only-note">This pass only <b>looks</b>: it never presses, types or submits, so a pop-up stays where it is and anything behind a click was not seen.${state.session?.access === "anonymous" ? " Sign in and tapp goes inside instead — it gets past pop-ups, clicks the controls, and asks you for a test account when it meets a sign-in." : " Put a URL in the prompt and tapp goes inside instead."}</p><div class="run-stats"><div><strong>${audit.pagesAudited || 0}</strong><small>pages</small></div><div><strong>${issues.length}</strong><small>distinct issues</small></div><div><strong>${counts.high || 0}</strong><small>high</small></div><div><strong>${counts.medium || 0}</strong><small>medium</small></div></div><h3>Issues</h3>${issues.length ? `<ul class="detail-list">${issues.slice(0, 40).map((issue) => `<li><b>${esc(issue.severity)}</b> · ${esc(issue.title)}${issue.pages?.length > 1 ? ` <small>(${issue.pages.length} pages)</small>` : ""}</li>`).join("")}</ul>` : '<p class="muted">Nothing broken was observed. This says the pages are served without structural defects, not that the site works.</p>'}${renderObservations(audit)}${detailLists(audit)}`;
555
556
  return;
556
557
  }
557
558
  if (run.kind === "explore") {
@@ -15,7 +15,7 @@ import { createRequire } from "module";
15
15
  import {
16
16
  NAV_TIMEOUT_MS, loadPlaywright, webBrowserLaunchOptions, webContextOptions, installWebListenerTracking,
17
17
  waitForWebStability, captureElementEvidence, shouldReportWebRequestFailure, auditStructuralControls,
18
- auditFindingsFromControls, slug,
18
+ auditFindingsFromControls, slug, detectBlockingOverlay, chooseOverlayDismissal,
19
19
  } from "./web-explorer.js";
20
20
  import { buildQaReport } from "./report.js";
21
21
  import { collectPageObservations, observationFindings, OBSERVATION_SCOPE } from "./page-observations.js";
@@ -258,6 +258,18 @@ async function auditOnePage(context, target, { timeoutMs, linkCheckLimit, captur
258
258
  // Things a person would notice and not like — counted and listed apart from defects, so the
259
259
  // issue count never quietly includes opinions. See page-observations.js.
260
260
  const observations = observationFindings(await collectPageObservations(page));
261
+ // A pop-up in front of the page is the first thing a visitor meets, and the read-only pass
262
+ // cannot press it — that is the promise. So say it is there, name it, and name the way out
263
+ // it offers, rather than quietly judging a page that was never visible.
264
+ const overlay = await detectBlockingOverlay(page).catch(() => null);
265
+ if (overlay) {
266
+ const wayOut = chooseOverlayDismissal(overlay.buttons);
267
+ observations.push({
268
+ category: "polish", severity: "medium", type: "blocking_overlay",
269
+ title: `A pop-up covers the page${overlay.heading ? `: “${overlay.heading}”` : ""} — nothing was clicked, so what it covers was not seen${wayOut ? ` (its way out is “${wayOut}”)` : ""}`,
270
+ target: overlay.heading || overlay.buttons[0] || "overlay",
271
+ });
272
+ }
261
273
  const screen = target.pathname + target.search;
262
274
  for (const f of [...findings, ...observations]) { f.screen = screen; if (!f.url) f.url = page.url(); }
263
275
 
@@ -300,6 +312,7 @@ async function auditOnePage(context, target, { timeoutMs, linkCheckLimit, captur
300
312
  // Why the wiring-dependent checks were skipped on this page, if they were.
301
313
  ...(controls.wiringUnverifiable ? { wiringUnverifiable: controls.wiringUnverifiable } : {}),
302
314
  findings,
315
+ ...(overlay ? { blockedByOverlay: true } : {}),
303
316
  ...(statePath ? { screenshot: statePath } : {}),
304
317
  ...(framePath ? { frame: framePath } : {}),
305
318
  links: allowedLinks,
@@ -498,6 +511,7 @@ export async function auditWebSite({
498
511
  await context.close();
499
512
  const findings = results.flatMap((r) => r.findings);
500
513
  const observations = dedupeSiteIssues(results.flatMap((r) => r.observations || []));
514
+ const coveredPages = results.filter((r) => r.blockedByOverlay).length;
501
515
  const issues = dedupeSiteIssues(findings);
502
516
  const bySeverity = { critical: 0, high: 0, medium: 0, low: 0 };
503
517
  for (const f of findings) if (f.severity in bySeverity) bySeverity[f.severity] += 1;
@@ -526,7 +540,12 @@ export async function auditWebSite({
526
540
  observationCount: observations.length,
527
541
  lookedForAlso: OBSERVATION_SCOPE,
528
542
  checkedFor: scope.checkedFor,
529
- notChecked: [...scope.notChecked, ...observationLimits, ...(skippedLinks.size ? ["Potential action/signed links and robots exclusions were not fetched; see skippedLinks."] : [])],
543
+ notChecked: [
544
+ ...scope.notChecked,
545
+ ...(coveredPages ? [`whatever a pop-up covered on ${coveredPages} page(s) — a read-only pass never presses anything, so it was not seen (sign in and tapp gets past it and clicks)`] : []),
546
+ ...observationLimits,
547
+ ...(skippedLinks.size ? ["Potential action/signed links and robots exclusions were not fetched; see skippedLinks."] : []),
548
+ ],
530
549
  pages: results,
531
550
  capture: null,
532
551
  };
@@ -430,7 +430,13 @@ export function chooseOverlayDismissal(labels = []) {
430
430
  * undiscovered. Escape closes a well-built dialog and nothing else, so find the dismissal the
431
431
  * overlay itself offers.
432
432
  */
433
- export async function dismissBlockingOverlay(page) {
433
+ /**
434
+ * Find what is standing in front of the page, without touching it.
435
+ *
436
+ * The read-only audit must not press anything — that is the whole promise — but it can still say
437
+ * a pop-up is there, name it, and name the way out it offers. A visitor meets that pop-up too.
438
+ */
439
+ export async function detectBlockingOverlay(page) {
434
440
  // Overlays come in shapes, not one shape. A measured probe of the common ones found that a
435
441
  // size-and-position rule written for a big centred modal misses a native <dialog> (absolute by
436
442
  // default), a small bottom sheet, a short cookie bar and a corner toast — four of the five
@@ -477,7 +483,13 @@ export async function dismissBlockingOverlay(page) {
477
483
  const heading = (chosen.element.querySelector("h1,h2,h3,h4,p,span")?.innerText || "").replace(/\s+/g, " ").trim().slice(0, 90);
478
484
  return { buttons: chosen.buttons, heading };
479
485
  }, undefined, { timeout: 2_000 }).catch(() => null);
480
- if (!found?.buttons?.length) return null;
486
+ return found?.buttons?.length ? found : null;
487
+ }
488
+
489
+ /** Find it, then press its own way out — never a way out that grants something. */
490
+ export async function dismissBlockingOverlay(page) {
491
+ const found = await detectBlockingOverlay(page);
492
+ if (!found) return null;
481
493
  const label = chooseOverlayDismissal(found.buttons);
482
494
  if (!label) return null;
483
495
  const overlay = page.locator('[data-tapp-overlay="1"]');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aarwitz/tapp",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "mcpName": "io.github.aarwitz/tapp",
5
5
  "description": "Let coding agents verify UI changes on real iOS, Android, and web surfaces, then enforce reviewed proof in deterministic CI.",
6
6
  "license": "MIT",