Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

in-browser-testing

БесплатноБез исполняемых скриптовНе проверен

Use when verifying NimbusImage changes in a live browser tab (localhost:5173) — clicking UI, driving drawing tools, reading store state from the console…

arjunrajlaboratoryот arjunrajlaboratory★ 22 звезды на GitHub

Об этом скилле

In-Browser Testing of NimbusImage

Overview

Multiple real bugs in this repo passed tsc, lint, all unit tests, and code reasoning — and only broke in the live app (pointer-events layering, deep-watch over-firing, HMR-corrupted store, background-tab false-passes). For any user-facing change, in-browser verification is a required gate, and it must be done in a way that can actually fail. The traps below each produced a false "it works" at least once.

The six false-pass traps

  1. Synthetic clicks lie. element.dispatchEvent(new MouseEvent('click')) bypasses hit-testing, pointer-events, z-index, and overlays. A synthetic-click walkthrough once reported a tour "working" while real user clicks did nothing. Verify clickability with document.elementFromPoint(cx, cy) (is the intended element the topmost hit target?), then click with the real computer tool. Reserve synthetic dispatch for driving flows fast only after clickability is independently confirmed.

  2. Background tabs lie. A hidden tab pauses requestAnimationFrame, throttles setTimeout to ~1 Hz, and never composites — perf probes report 0 long tasks and event loops stall/time out. The tab must be foreground/visible for any timing or rendering claim. If a paced loop must survive a background tab, use busy-wait gaps (while (performance.now() < end) {}), not setTimeout.

  3. A stale store lies. Editing any src/store/*.ts while pnpm run dev runs breaks HMR ([vuex] duplicate getter key, annotations stuck at 0). Hard-reload the page after every store-module edit before trusting anything. (Component .vue edits HMR fine.)

  4. A stale backend lies. After backend plugin edits, docker compose restart girder does NOT load the new code (plugin is baked into the image) — new routes 404 while tox passes. Rebuild: docker compose build girder && docker compose up -d girder.

  5. Screenshots lie about the image itself. The tile layers are WebGL canvases without preserveDrawingBuffer, so a captured screenshot can show the image area solid black while the page renders it normally for the user — DOM overlays in the same shot look fine, which makes it read as "the image failed to load". Don't debug that; confirm pixels through GeoJS's own compositing instead:

    const dataUrl = await map.screenshot(undefined, 'image/png');  // re-renders into a 2D canvas
    // draw to an offscreen canvas, then getImageData → report max/mean channel value
    

    A non-zero max means the tiles are there. Note that a fluorescence dataset is legitimately near-black at fit-to-view zoom (sparse bright cells, hist.max pinned to 65535 by a few saturated pixels), so a low mean is not evidence of a bug either. Verify tile health from statusCodes in read_network_requests (/tiles/zxy/ → 200) plus the layers' idle/_imageUrls, and verify overlays from live DOM state — not from the picture.

  6. An empty console reads as "clean" when it means "not capturing." read_console_messages only records from the moment it is first called, so a warning emitted during app boot is invisible unless you call it then reload then read. Worse, a console.warn wrapper installed via javascript_tool can never see boot-time output at all — the app has already mounted by the time you can install it. Chasing a missing [Vuetify UPGRADE] warning this way produced two false passes in a row (issue #1281) before the order was fixed.

    Compounding it: eager dialogs mount at app boot, and a mount-time warning fires exactly once. PipelineDialog.vue sets eager so its content stays mounted while closed — so closing and reopening the dialog does not re-run any child's setup(), and any one-shot warning there (Vuetify deprecations, prop validators) never fires again for the life of the page. Toggling the dialog to "re-trigger" it silently measures nothing.

    Working order for any boot-time console assertion:

    1. read_console_messages{clear:true}    // start tracking / empty the buffer
    2. location.reload()                    // via javascript_tool; a #hash nav is NOT a reload
    3. wait for boot (poll store state)
    4. read_console_messages{pattern:…}     // the real read
    5. read again with a broad pattern (e.g. "vite") to prove capture is live —
       seeing "[vite] connected" is what makes an empty filtered result meaningful
    

    Then invert it: put the pre-fix code back (git stash) and confirm the same sequence does report the warning. Verify which code is actually being served rather than assuming the stash took effect — fetch('/src/path/To.vue?t=' + Date.now()) returns Vite's current transform, and counting tokens in it (dense vs comfortable) settles it. Rendered DOM often can't: dense and density="comfortable" produce the same v-row--density-comfortable class, so the DOM looked identical in both states.

Console handles (javascript_tool)

// Wrap EVERYTHING in an IIFE — top-level
Полный SKILL.md на GitHub

Установить in-browser-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл in-browser-testing?

Use when verifying NimbusImage changes in a live browser tab (localhost:5173) — clicking UI, driving drawing tools, reading store state from the console, measuring render performance, or reproducing a reported UI bug. Use BEFORE claiming any user-facing change works: tsc/lint/vitest green does not mean the UI works.

Как установить скилл in-browser-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл in-browser-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить in-browser-testing с