Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_Report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ body:
id: general-summary
attributes:
label: Provide a general summary of the issue here
description: |
Include a simple, real-life example of how the issue occurs, such as what someone is trying to do in your app when they run into it.
If you found the issue by reading code or running tests, explain how it could happen in a real app.
validations:
required: true
- type: textarea
Expand Down
14 changes: 10 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
<!-- If you are an AI assistant opening this PR, use this template as the PR body, complete the checklist below honestly, and disclose AI use. See CONTRIBUTING.md (AI-assisted contributions) and AGENTS.md. -->
<!-- If you are an AI assistant opening this PR, use this template as the PR body, complete the checklist below honestly, and disclose AI use. Keep it concise and factual, with no filler. Open it only after the person you're working with has reviewed it. See CONTRIBUTING.md (AI-assisted contributions) and AGENTS.md. -->

Closes <!-- Github issue # here -->

## Summary

<!-- Describe the problem, intended behavior, and why you chose this approach.
For bugs, start with a simple, real-life example of how the issue occurs.
For performance fixes, include confirmed benchmark harness results
(see Performance changes in CONTRIBUTING.md).
If there is no linked issue, provide the same information expected in an issue:
for bugs, include expected vs. actual behavior, your use case, and reproduction steps ;
for features, explain the current limitation, use case, and proposed behavior.
If there is a linked issue, address relevant decisions or concerns in its discussion. -->

## 📝 Test Instructions

<!-- Include test commands and actual results, plus relevant manual verification steps.
<!-- Steps a reviewer can follow to verify this change by hand, such as which story
or docs page to open, what to do, and what should happen.
Put test commands and actual results inside a details/summary.
For bug fixes, identify the regression test and report whether it fails before
and passes after the fix. If this was not verified, say so.
Explain any inapplicable coverage and note what remains untested. -->
Explain any inapplicable coverage and note what remains untested.
-->

## Release impact

Expand All @@ -29,7 +35,7 @@ Explain any inapplicable coverage and note what remains untested. -->
## ✅ PR Checklist

- [ ] I followed the [contributing guide](https://github.com/adobe/react-spectrum/blob/main/CONTRIBUTING.md).
- [ ] I tested this change locally and included the results in Test Instructions, or explained why testing does not apply.
- [ ] I tested this change locally and filled out Test Instructions, or explained why they don't apply.
- [ ] I understand and can explain every change in this PR. If I used AI assistance, I followed the [AI contribution guidance](https://github.com/adobe/react-spectrum/blob/main/CONTRIBUTING.md#ai-assisted-contributions).

## 🧢 Your Project
Expand Down
17 changes: 15 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ Run only one of the Parcel 3 Storybooks at a time: both public Storybook servers
- **Match the surrounding code** — follow the naming, structure, and patterns of neighboring files.
- **Before committing** — run `yarn format <changed-file-paths>` to format the files you changed, and include the formatting fixes in your commit. Then run `yarn format:check` to verify formatting. CI runs this check as part of `yarn lint`.
- **Commit format** — use conventional-commit prefixes (`fix:`, `feat:`, `chore:`, `docs:`) as seen in the git history.
- **Performance fixes** — prove the improvement with the [benchmark harness](perf/README.md) and include the confirmed results in the PR. See [Performance changes](CONTRIBUTING.md#performance-changes).

## Keep a human in the loop

The person you're working with must be part of the entire process, not just reviewing the end result. Agree on the problem and approach with them before implementing, and have them review your changes and anything you write before it's pushed or posted. Don't open issues or PRs, push commits, or reply to reviewers on your own. See [AI-assisted contributions](CONTRIBUTING.md#ai-assisted-contributions).

## Writing on GitHub

Keep everything you write on GitHub (issues, PR descriptions, comments, and review replies) concise and realistic:

- **Lead with the point.** Skip filler: greetings, thanks, "happy to help", restating the diff or the reviewer, narrating your process, bumps asking for review, and closing summaries.
- **Only claim what you verified.** Don't inflate impact or certainty, and say what you didn't test.
- **Describe bugs with a simple, real-life example** of what someone does in an app and what goes wrong, not just the faulty code path or a contrived input.

## Filing GitHub issues

Expand All @@ -51,7 +64,7 @@ This repository uses GitHub issue **forms** defined in [`.github/ISSUE_TEMPLATE/
- **Search first.** Check existing open and closed issues to avoid duplicates.
- **Prefer the web flow** so the correct form is applied: <https://github.com/adobe/react-spectrum/issues/new/choose>
- **If filing via the `gh` CLI, replicate the template's fields in the body.** `gh issue create --template` does *not* render these YAML issue forms, so passing `--template` alone will not produce a valid issue. Instead, fill in the chosen template's fields manually. For a bug report (`Bug_Report.yml`), include:
- a general summary
- a general summary, including a simple, real-life example of how the issue occurs
- Expected Behavior
- Current Behavior
- Possible Solution (optional)
Expand All @@ -71,4 +84,4 @@ Read the relevant file before starting that kind of work (other agents: read the
- Styling S2 components → [`docs/contributing/s2-styling.md`](docs/contributing/s2-styling.md)
- Adding user-facing strings → [`docs/contributing/i18n-strings.md`](docs/contributing/i18n-strings.md)
- Touching generated code (icons) → [`docs/contributing/codegen.md`](docs/contributing/codegen.md)
- Comments and opening a PR → [`docs/contributing/pull-requests.md`](docs/contributing/pull-requests.md)
- Code comments and opening a PR → [`docs/contributing/pull-requests.md`](docs/contributing/pull-requests.md)
22 changes: 18 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ We adhere to the Adobe [code of conduct](https://github.com/adobe/react-spectrum
### Bugs
We use [GitHub issues](https://github.com/adobe/react-spectrum/issues) to track work and log bugs. Please check existing issues before filing anything new. We do our best to respond to issues within a few days. If you would like to contribute a fix, please let us know by leaving a comment on the issue.

The best way to reduce back and forth on a bug is provide a small code example exhibiting the issue along with steps to reproduce it. If you would like to work on a bugfix yourself, make sure an issue exists first.
The best way to reduce back and forth on a bug is to provide a simple, real-life example of how it occurs, a small code example exhibiting the issue, and steps to reproduce it. If you would like to work on a bugfix yourself, make sure an issue exists first.

Please follow the issue templates when filing new ones and add as much information as possible.
Please follow the issue templates when filing new ones and fill in the information they ask for.

### Feature requests
Our components can always be improved upon. If you have a feature request, you can use our Feature Request issue template. For larger scopes of work, it is a good idea to open a Request For Comments (RFC) first to gather feedback from the team. Please follow our RFC [template](https://github.com/adobe/react-spectrum/blob/main/rfcs/template.md). Make a PR to add your RFC to the [rfcs folder](https://github.com/adobe/react-spectrum/tree/main/rfcs) to give the team and the community a chance to discuss the proposal.
Expand All @@ -31,6 +31,7 @@ A few things to keep in mind before submitting a pull request:
- Reference the issue in the description
- Make sure linting and tests pass
- Include relevant unit tests
- For performance changes, include benchmark results. See [performance changes](#performance-changes)
- Add/update stories in storybook for your changes
- Update documentation
- Remember that all submissions require review, please be patient.
Expand All @@ -54,6 +55,7 @@ If there is no issue, include the information requested by the relevant[bug repo

For bug fixes, include:

- A simple, real-life example of how the issue occurs, such as what someone is trying to do in your app when they run into it. If you found the issue by reading code or running tests, explain how it could happen in a real app.
- What happens and what you expected to happen.
- What you are trying to accomplish and how the bug affects you.
- Reproduction steps and a minimal example we can use to verify the problem.
Expand All @@ -65,6 +67,10 @@ Documentation and routine maintenance changes should explain their purpose; they

Search existing issues and PRs before opening either, and link related work when you find it. A PR can also be the starting point for a design discussion; opening it does not mean the proposed scope or approach has been approved.

### Performance changes

If a PR is meant to improve performance, show that it does with data from the [benchmark harness](perf/README.md). Compare your change against its base branch in scenarios that exercise the code you changed, confirm the result, and include it in the PR as described in [Share the result](perf/README.md#4-share-the-result). If no scenario covers your change, [add one](perf/README.md#add-a-scenario). Don't claim an improvement the harness hasn't confirmed.

## AI-assisted contributions
Setting expectations: the AI doesn't contribute to React Spectrum, you do. The AI is a tool, but you are still the author, and you own every line, every decision, and every explanation.

Expand Down Expand Up @@ -93,9 +99,17 @@ Even if you haven't tested all of these, it's hugely helpful to us to know where

One of the biggest issues we face with the rise of AI contributions is the wrong root cause but with a lot of details asserting why it is, in fact, the issue. Press the AI, and ask both it and yourself "is this the root cause, or a symptom?" and "what else could cause this?" before committing to a solution.

### Keep a human in the loop of the conversation
### Keep a human in the loop

A human must be part of the entire process, from the first issue or comment through the final review, not just when new commits are pushed. That means you:

- Agree on the problem and approach before implementing.
- Review and understand every change before opening the PR or pushing new commits.
- Write or review every issue, PR description, and comment before it's posted.

Don't let an agent open an issue or PR, or respond to reviewers, on its own.

When you iterate between reviews, be sure you can say what changed and why, one sentence is enough. A PR that transforms completely between every review without explanation is exhausting to follow and makes us feel like we're arguing with a machine instead of collaborating with a person.
When you iterate between reviews, be sure you can say what changed and why; one sentence is enough. A PR that transforms completely between every review without explanation is exhausting to follow and makes us feel like we're arguing with a machine instead of collaborating with a person.


#### Requirements of front end code
Expand Down
10 changes: 10 additions & 0 deletions perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ The confirmation `summary.md` places each repeat beside the original:

Judge the size of the change from the confirmation runs: selecting an initial run because it showed an effect can overstate that effect.

### 4. Share the result

A PR that claims a performance improvement must show it with results from this suite. Include:

- The commands you ran, with any `--scenario`, `--scale`, or `--cpu` options.
- The result table from `report.md`, plus the lines at the top of the report that record the browser, CPU, settings, and builds.
- The table from the confirmation `summary.md`. Describe the size of the change using the confirmation runs.

Report results as measured, including any regressions. If a scenario your change targets is inconclusive, within the practical threshold, or not confirmed, say so rather than claiming an improvement. `smoke` compares a build with itself and `run` measures a single build, so neither can show an improvement.

## Choose a workload

A filter accepts an exact scenario ID or a whole fixture, separated by commas. For example, `--scenario table.scroll,collection` runs one table action and all collection-mutation actions.
Expand Down
Loading