From 88453f202dc8c39937db6d3281637a59fc433487 Mon Sep 17 00:00:00 2001 From: Vishnu Vardhan Date: Wed, 17 Jun 2026 16:21:12 +0530 Subject: [PATCH] chore: add issue templates and rework PR template --- .github/ISSUE_TEMPLATE/bug_report.yml | 135 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/documentation.yml | 41 +++++++ .github/ISSUE_TEMPLATE/feature-request.yml | 75 ++++++++++++ .github/pull_request_template.md | 83 ++++--------- 4 files changed, 275 insertions(+), 59 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..cb6e0bca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,135 @@ +name: ๐Ÿ› Bug Report +description: Something in DevTools isn't behaving the way it should. +title: "[๐Ÿ› Bug]: " +labels: [Bug ๐Ÿ›, Needs Triaging โณ] +body: + + - type: markdown + attributes: + value: | + DevTools sits between your test framework, a browser, and our dashboard, so a good report tells us where in that chain things broke. The more of the setup you share, the faster we can reproduce it. + + - type: dropdown + id: framework + attributes: + label: Test framework + description: Which adapter are you running DevTools through? + options: + - WebdriverIO (@wdio/devtools-service) + - Nightwatch (@wdio/nightwatch-devtools) + - Selenium WebDriver (@wdio/selenium-devtools) + validations: + required: true + + - type: dropdown + id: runner + attributes: + label: Test runner + description: For Selenium especially, the runner often matters. Pick the one you launch tests with. + options: + - Mocha + - Jasmine + - Cucumber + - Jest + - Vitest + - Not applicable / Other + validations: + required: false + + - type: input + id: devtools-version + attributes: + label: DevTools package version + description: The version of the adapter package above (check your package.json or lockfile). + placeholder: e.g. 0.4.2 + validations: + required: true + + - type: input + id: node-version + attributes: + label: Node.js version + description: Output of `node --version`. + placeholder: e.g. 20.11.0 + validations: + required: true + + - type: input + id: browser + attributes: + label: Browser under test + description: The browser (and version) your tests drive โ€” DevTools capture depends on it. + placeholder: e.g. Chrome 126 + validations: + required: false + + - type: dropdown + id: surface + attributes: + label: Where does the bug show up? + description: Pick the part of DevTools where you notice the problem. + multiple: true + options: + - Dashboard UI (rendering, controls, rerun/stop) + - Captured data (network, console, screencast, trace) + - Backend / server (connection, websocket, crashes) + - Test launch / lifecycle (hooks, session, capabilities) + - Not sure + validations: + required: false + + - type: textarea + id: what-happened + attributes: + label: What went wrong? + description: Walk us through what you did and what DevTools actually did in response. + placeholder: | + e.g. "I clicked the rerun button on a single Mocha test. The sidebar cleared all + other tests instead of keeping them, and the browser opened a second window." + validations: + required: true + + - type: textarea + id: what-is-expected + attributes: + label: What did you expect instead? + validations: + required: false + + - type: textarea + id: reproducible-example + attributes: + label: Steps to reproduce + description: | + We can only fix what we can reproduce. Share the smallest setup that triggers the bug โ€” + a link to a repo or [gist](https://gist.github.com/) is ideal, otherwise paste your + DevTools config, the relevant spec, and the command you run. + placeholder: | + 1. Config (wdio.conf / nightwatch.conf / selenium setup): + ```js + ... + ``` + 2. Spec: + ```js + ... + ``` + 3. Command: `npx wdio run wdio.conf.js` + 4. In the dashboard, do: ... + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Logs + description: Terminal output, browser console errors, or the DevTools server log โ€” whatever's relevant. + render: shell + validations: + required: false + + - type: checkboxes + attributes: + label: Before you submit + options: + - label: I searched existing issues and didn't find a duplicate + required: true diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 00000000..0aba2591 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,41 @@ +name: ๐Ÿ“– Documentation +description: Report docs that are missing, wrong, or hard to follow. +title: "[๐Ÿ“– Docs]: <title>" +labels: [Docs ๐Ÿ“–, Needs Triaging โณ] +body: + + - type: markdown + attributes: + value: | + Our docs live alongside the code โ€” the root README and a README per package under `packages/`. Small fixes are very welcome as a direct pull request; use this form when you'd rather flag it for us. + + - type: dropdown + id: type + attributes: + label: What's the issue with the docs? + multiple: true + options: + - Missing โ€” something isn't documented at all + - Wrong / outdated โ€” doesn't match how DevTools behaves + - Unclear โ€” technically correct but hard to follow + - Typo or formatting + - Other + validations: + required: true + + - type: input + id: location + attributes: + label: Which doc? + description: Link or path to the page, README, or section this is about. + placeholder: e.g. packages/selenium-devtools/README.md โ€” "Setup" section + validations: + required: false + + - type: textarea + id: report + attributes: + label: What should change? + description: Describe what's confusing or missing, and what you expected the docs to tell you. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000..90131b21 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,75 @@ +name: ๐Ÿ’ก Feature request +description: Propose a new capability or improvement for DevTools. +title: "[๐Ÿ’ก Feature]: <title>" +labels: [Idea ๐Ÿ’ก, Needs Triaging โณ] +body: + + - type: markdown + attributes: + value: | + DevTools aims to give the same debugging experience across WebdriverIO, Nightwatch, and Selenium. Ideas that work for all three (or clearly belong to one) are the easiest for us to plan โ€” tell us what you're trying to do and we'll figure out where it fits. + + - type: textarea + id: problem + attributes: + label: What problem are you trying to solve? + description: Describe the workflow or pain point behind the request, not just the feature. + placeholder: | + e.g. "When a test fails I can see the network calls, but I can't tell which one + the failing assertion was waiting on, so I jump back to the terminal to correlate timestamps." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: What would you like DevTools to do? + description: How should this work from your point of view? + validations: + required: true + + - type: dropdown + id: scope + attributes: + label: Which part of DevTools would this touch? + description: Best guess is fine โ€” it helps us route the idea. + multiple: true + options: + - Dashboard UI + - Capture / reporting core + - WebdriverIO adapter + - Nightwatch adapter + - Selenium adapter + - Backend / server + - Not sure + validations: + required: false + + - type: dropdown + id: frameworks + attributes: + label: Which frameworks should this apply to? + multiple: true + options: + - WebdriverIO + - Nightwatch + - Selenium + - All of them + validations: + required: false + + - type: textarea + id: alternatives + attributes: + label: Anything you've tried or considered? + description: Workarounds you currently use, or alternative designs you weighed. + validations: + required: false + + - type: textarea + id: context + attributes: + label: Anything else? + description: Mockups, screenshots, links, or related issues. + validations: + required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9d12996c..d7c1078d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,70 +1,35 @@ -<!-- -This template encodes the rules in CLAUDE.md and ARCHITECTURE.md. -Delete sections that genuinely don't apply, but don't delete sections to avoid answering them. ---> +## What & why -## What +[//]: # (What does this PR change, and what problem does it solve? Link the issue it closes, if any.) -<!-- One or two sentences. What does this PR change? --> +## Type of change -## Why +[//]: # (Put an `x` in the boxes that apply.) -<!-- The motivation. Not "what" again โ€” the reason this change exists. Link issue if any. --> +- [ ] Bugfix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Polish (an improvement to an existing feature) +- [ ] Breaking change (existing behavior changes for users) +- [ ] Documentation +- [ ] Internal (build, CI, dependencies, tooling) -## How +## Packages touched -<!-- The approach. Anything non-obvious about the implementation. --> +[//]: # (DevTools is a monorepo โ€” checking these helps reviewers know where to look.) ---- +- [ ] `shared` (types and contracts) +- [ ] `core` (framework-agnostic capture/reporting) +- [ ] `service` (WebdriverIO adapter) +- [ ] `nightwatch-devtools` (Nightwatch adapter) +- [ ] `selenium-devtools` (Selenium adapter) +- [ ] `backend` (server) +- [ ] `app` (UI) +- [ ] `script` (page-injected runtime) -## Architecture self-check +## Notes for reviewers -> Required for every non-trivial PR. If a box is unchecked, explain why. +[//]: # (Anything non-obvious: design trade-offs, alternatives you ruled out, follow-ups. If this PR touches more than one adapter, say why the shared logic doesn't live in `core`.) -- [ ] **No new duplication.** This PR does not add a type, constant, enum, or contract that already exists in another package. (If it consolidates one, note which item from `CLAUDE.md` ยง7 is being resolved.) -- [ ] **No cross-adapter imports.** No code in `service`, `nightwatch-devtools`, or `selenium-devtools` imports from another adapter. -- [ ] **No adapter imports in `backend` / `app`.** Neither package reaches into adapter internals. -- [ ] **Typed contracts at boundaries.** Any new `fetch(...)`, `ws.send(...)`, or HTTP route has a typed request/response shape in `shared` (or in `service` types if `shared` doesn't exist yet, with a TODO to move). -- [ ] **No `if (framework === '...')` outside an adapter.** Framework branching uses a typed `FrameworkId`. -- [ ] **No new `any` at package boundaries.** Internal `any` is acceptable only at a documented framework-edge with a one-line comment. +## Screenshots / recordings -### Multi-adapter changes - -- [ ] This PR touches **more than one** adapter package. - -> If checked: **why isn't this in `core`?** Answer here: -> -> _<your answer>_ - ---- - -## Debt scoreboard - -> List the `CLAUDE.md` ยง7 debt items this PR resolves, partially resolves, or extends. Delete this section only if the PR genuinely affects no debt items. - -- Resolved: _<item, or "none">_ -- Partially resolved: _<item, or "none">_ -- New debt introduced: _<item, or "none โ€” and explain why if any>_ - -If new debt is introduced, it must be added to `CLAUDE.md` ยง7 in this PR. - ---- - -## Testing - -- [ ] Unit tests for new logic in `shared` / `core` (required per `CLAUDE.md` ยง4). -- [ ] Regression test for any bug fix (required per `CLAUDE.md` ยง4). -- [ ] `pnpm build` passes. -- [ ] `pnpm test` passes. -- [ ] `pnpm lint` passes. -- [ ] For UI/runtime changes: verified in `example/` (or `example` for the framework I changed). - -If any required item is skipped, say so here with the reason: - -_<your note, or "n/a">_ - ---- - -## Screenshots / recordings (UI changes only) - -<!-- Drop them in here. --> +[//]: # (Required for UI changes โ€” before/after images or a short clip.)