Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
claude: Move the UI testing checklist into a path-scoped rule.
Evy Kassirer8ce775b35966
diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.mdindex 56b9b770ef9..4b68cd6e3ed 100644--- a/.claude/CLAUDE.md+++ b/.claude/CLAUDE.md@@ -288,53 +288,9 @@ tests.### Manual Testing for UI Changes-If a PR makes frontend changes, manually verify the affected UI. This-catches issues that automated tests miss. **Treat this checklist as-blocking, not advisory** — every applicable item must be verified-before the change is ready.--**Visual appearance:**--- Is the new UI consistent with similar elements (fonts, colors, sizes)?- Find the closest existing analogues and compare carefully.-- Is alignment correct, both vertically and horizontally? Measure- programmatically with `getBoundingClientRect()` when in doubt —- don't eyeball it.-- Do clickable elements have hover behavior consistent with similar UI?-- If elements can be disabled, does the disabled state look right?-- Did the change accidentally affect other parts of the UI? Use- `git grep` to check if modified CSS is used elsewhere. CSS changes- are notorious for unintended consequences — check every page and- component that shares the selectors you modified.-- Check all of the above in both light and dark themes when the- change could plausibly affect colors, contrast, or theme-dependent- imagery. Pure geometry/typography changes (`font-size`,- `line-height`, `margin`, `padding`, `display`, `font-weight`,- etc.) don't need a separate dark-theme pass —- `web/styles/dark_theme.css` only overrides colors, so a single- theme suffices for theme-invariant changes.--**Responsiveness and internationalization:**--- Does the UI look good at different window sizes? Check wide desktop- (1920px), typical laptop (1280px), tablet, and narrow phone (480px).-- Would the UI break if translated strings were 1.5x longer than- English? What if they were half as long? Both directions matter.--**Functionality:**--- Are live updates working as expected?-- Is keyboard navigation, including tabbing to interactive elements, working?-- If the feature affects the message view, try different narrows: topic,- channel, Combined feed, direct messages.-- If the feature affects the compose box, test both channel messages and- direct messages, and both ways of resizing.-- If the feature requires elevated permissions, test as both a user who- has permissions and one who does not.-- Think about feature interactions: could banners overlap? What about- resolved/unresolved topics? Collapsed or muted messages?-- Think about edge cases in data: empty lists, very long names, single- items vs. hundreds, special characters in strings.+If a PR makes frontend changes, manually verify the affected UI+using the checklist in `.claude/rules/ui-testing.md` (loaded+automatically when you work on frontend files).## Self-Review Checklistdiff --git a/.claude/rules/ui-testing.md b/.claude/rules/ui-testing.mdnew file mode 100644index 00000000000..490bbd1a2a2--- /dev/null+++ b/.claude/rules/ui-testing.md@@ -0,0 +1,55 @@+---+paths:+ - "web/**"+ - "templates/**"+---++# Manual Testing for UI Changes++If a PR makes frontend changes, manually verify the affected UI. This+catches issues that automated tests miss. **Treat this checklist as+blocking, not advisory** — every applicable item must be verified+before the change is ready.++## Visual appearance++- Is the new UI consistent with similar elements (fonts, colors, sizes)?+ Find the closest existing analogues and compare carefully.+- Is alignment correct, both vertically and horizontally? Measure+ programmatically with `getBoundingClientRect()` when in doubt —+ don't eyeball it.+- Do clickable elements have hover behavior consistent with similar UI?+- If elements can be disabled, does the disabled state look right?+- Did the change accidentally affect other parts of the UI? Use+ `git grep` to check if modified CSS is used elsewhere. CSS changes+ are notorious for unintended consequences — check every page and+ component that shares the selectors you modified.+- Check all of the above in both light and dark themes when the+ change could plausibly affect colors, contrast, or theme-dependent+ imagery. Pure geometry/typography changes (`font-size`,+ `line-height`, `margin`, `padding`, `display`, `font-weight`,+ etc.) don't need a separate dark-theme pass —+ `web/styles/dark_theme.css` only overrides colors, so a single+ theme suffices for theme-invariant changes.++## Responsiveness and internationalization++- Does the UI look good at different window sizes? Check wide desktop+ (1920px), typical laptop (1280px), tablet, and narrow phone (480px).+- Would the UI break if translated strings were 1.5x longer than+ English? What if they were half as long? Both directions matter.++## Functionality++- Are live updates working as expected?+- Is keyboard navigation, including tabbing to interactive elements, working?+- If the feature affects the message view, try different narrows: topic,+ channel, Combined feed, direct messages.+- If the feature affects the compose box, test both channel messages and+ direct messages, and both ways of resizing.+- If the feature requires elevated permissions, test as both a user who+ has permissions and one who does not.+- Think about feature interactions: could banners overlap? What about+ resolved/unresolved topics? Collapsed or muted messages?+- Think about edge cases in data: empty lists, very long names, single+ items vs. hundreds, special characters in strings.