# Responsive QA Matrix

## Objective

Decide which screen sizes, zoom levels, and text settings every flow has to survive.

A written matrix of viewports, orientations, zoom levels, and text-size settings that each major flow is tested against.

## Before You Begin

This feature is being added to an application that already exists and already
works. Do not scaffold a new project, and do not assume a blank slate.

Inspect the codebase first and establish:

- The existing application structure and where code of this kind already lives.
- The framework and version in use.
- The existing design system — colours, spacing, typography, and component conventions.
- Existing UI components you can reuse instead of writing new ones.
- The existing database structure, if this feature needs to persist anything.
- The existing authentication and authorization system, if this feature is user-scoped.
- Dependencies already installed, so you don't add a library that duplicates one.
- The existing test setup and conventions.

Only start writing code once you understand the above. If the application
already implements part of this feature, extend it rather than replacing it.

## Implementation Instructions

1. List the app's major flows, then write down for each the exact widths, orientations, zoom levels, and text-size settings it must pass, so testing stops depending on whichever window size the reviewer happened to have open.
2. Include the widths that break layouts rather than only the comfortable ones: the tablet in portrait, the narrow desktop window beside a chat panel, the phone in landscape, and the width just below each breakpoint.
3. Include a large-text pass at increased browser font size and at 200 per cent zoom, and treat clipped, overlapped, or unreachable content at those settings as a failure rather than a cosmetic issue.
4. Pair each viewport with deliberately hostile content — the longest real name, a translated string that runs half again as long, an empty list, a table with far more rows than expected — because most responsive failures need both a narrow screen and awkward content.
5. Record the combinations the app does not support and what happens there, so an unsupported case is a stated decision rather than an untested gap. Browser versions and engines belong to the Browser Support Matrix; this brief owns geometry and text scaling only.

## UI and UX Requirements

Match the application's existing design system exactly. Reuse its components,
spacing, and typography. This feature should look like it was always there.

## Responsive Requirements

Works on mobile, tablet, and desktop. Touch targets are large enough to hit on a
phone, and nothing overflows horizontally at 320px.

## Accessibility Requirements

- Fully keyboard navigable.
- Correct semantic elements and ARIA roles.
- Visible focus states.
- Meets WCAG AA contrast.
- Dynamic changes are announced to screen readers.
- Respects prefers-reduced-motion.

## Edge Cases

- The awkward middle widths are where layouts actually break — a tablet in portrait, or a desktop window dragged to half the screen — and a matrix that tests only a phone and a full-width desktop will pass while both of those are broken.
- Increased browser text size and page zoom reflow differently from a narrow viewport, so a layout that survives a phone width can still clip or overlap at 200 per cent zoom on a desktop.
- A viewport tested with short placeholder content proves nothing; the same width with a long untruncated name, a translated label, or an unexpectedly full table is where the overflow appears.
- Combinations that are explicitly not supported must be written down along with the intended behaviour there, or every reviewer relitigates the same question and users get an undefined experience.
- Mobile browser chrome and the on-screen keyboard change the usable height mid-session, so a fixed viewport height in the matrix will not represent what the user actually has.
- Orientation changes mid-flow can lose scroll position, selection, or an open dialog, and this only shows up if the matrix requires rotating during a flow rather than starting in each orientation.
- Content that scrolls horizontally inside its own container is acceptable; the page body scrolling horizontally is not, and the matrix must distinguish the two.

## Testing

Exercise the feature end to end in the running application. Cover every edge case
above, then run the existing test suite and confirm nothing regressed.

## Acceptance Criteria

- [ ] Every major flow has a written list of the viewports, orientations, zoom levels, and text sizes it must pass.
- [ ] The matrix includes tablet portrait, a narrow desktop window, and the width immediately below each breakpoint.
- [ ] Each flow is verified at increased browser text size and at 200 per cent zoom with no clipped or unreachable content.
- [ ] Each viewport is tested with long, translated, empty, and oversized content rather than placeholder text.
- [ ] Unsupported combinations are documented along with the behaviour users get there.
- [ ] No page scrolls the body horizontally at any listed viewport.
- [ ] The feature matches the existing design system.
- [ ] No existing functionality is broken.

## Adaptation Rules

- Match the existing design system. Do not introduce a new colour palette,
  spacing scale, or component library.
- Reuse existing components and utilities wherever they fit.
- Follow the naming, file layout, and code style already present.
- Do not upgrade, replace, or remove existing dependencies to make this
  feature fit. Adapt the feature to the app, not the app to the feature.
- Do not break existing functionality. If a change is genuinely required in
  existing code, make the smallest one that works and say so.
- If something in these instructions conflicts with how the application is
  built, follow the application and explain the deviation.

## Final Verification

Before you report the work as done:

1. Re-read the acceptance criteria above and check each one against what you
   actually built.
2. Run the application and exercise the feature end to end.
3. Run the existing test suite and confirm you have broken nothing.
4. Check the feature on mobile, tablet, and desktop widths.
5. Check keyboard navigation and focus handling.
6. Summarize what changed: files added, files modified, and anything you
   deliberately did differently because of how this application is built.

If any acceptance criterion is unmet, fix it before reporting completion.
