[CL-REACT-DOCTOR-MAILBOX] refactor(MailInbox): чистим 17 react-doctor warnings + smoke-test (100% closure) #115

Merged
andrei merged 1 commit from feature/claude-mail-inbox-warnings-cleanup into master 2026-05-21 14:51:04 +00:00
Owner

Что сделано

  • Tailwind 4 size-shorthand на 17 иконках: w-X h-Xsize-X — все правила design-no-redundant-size-axes закрыты
  • Новый smoke test app/src/pages/admin/__tests__/MailInbox.test.tsx (7 кейсов)
  • Allowance comment для code-patterns-enforcer rule 130 (verbatim inline JSX handlers) + rule 197 false-positive на Tailwind truncate utility

Зачем

Phase 2 react-doctor hygiene #4. 100% closure rate — лучший показатель в серии. GitNexus impact: LOW risk, 0 upstream callers.

До После
17 warnings 0 warnings
0 errors 0 errors
0 tests 7/7 PASS

План тестирования

  • cd app && npx tsc --noEmit — clean
  • cd app && npx eslint src/pages/admin/MailInbox.tsx --max-warnings 0 — clean
  • cd app && npx vitest run src/pages/admin/__tests__/MailInbox.test.tsx7/7 PASS
  • cd app && npm run test:i18n-usage — Missing: 0
  • cd app && npx react-doctor . --offline --lint -y --json → MailInbox 17 → 0, app errors=0
  • CI: 8 jobs Forgejo + React Doctor self-scan должны быть green

Где могу ошибаться

  • size-4.5 / size-3.5 fractional values supported в Tailwind 3.4+; v4 наследует — должно работать. Fallback size-[18px] arbitrary если build fails.
  • Allowance comment может быть лишним если code-patterns-enforcer обновлён — defensive
## Что сделано - Tailwind 4 size-shorthand на 17 иконках: `w-X h-X` → `size-X` — все правила `design-no-redundant-size-axes` закрыты - Новый smoke test `app/src/pages/admin/__tests__/MailInbox.test.tsx` (7 кейсов) - Allowance comment для `code-patterns-enforcer` rule 130 (verbatim inline JSX handlers) + rule 197 false-positive на Tailwind `truncate` utility ## Зачем Phase 2 react-doctor hygiene #4. **100% closure rate** — лучший показатель в серии. GitNexus impact: **LOW** risk, 0 upstream callers. | До | После | |---|---| | 17 warnings | **0 warnings** | | 0 errors | 0 errors | | 0 tests | 7/7 PASS | ## План тестирования - `cd app && npx tsc --noEmit` — clean - `cd app && npx eslint src/pages/admin/MailInbox.tsx --max-warnings 0` — clean - `cd app && npx vitest run src/pages/admin/__tests__/MailInbox.test.tsx` — **7/7 PASS** - `cd app && npm run test:i18n-usage` — Missing: 0 - `cd app && npx react-doctor . --offline --lint -y --json` → MailInbox 17 → **0**, app errors=0 - CI: 8 jobs Forgejo + React Doctor self-scan должны быть green ## Где могу ошибаться - `size-4.5` / `size-3.5` fractional values supported в Tailwind 3.4+; v4 наследует — должно работать. Fallback `size-[18px]` arbitrary если build fails. - Allowance comment может быть лишним если `code-patterns-enforcer` обновлён — defensive
[CL-REACT-DOCTOR-MAILBOX] refactor(MailInbox): чистим 17 react-doctor warnings + smoke-test (100% closure)
Some checks failed
React Doctor / React Doctor / App (pull_request) Failing after 622h51m16s
CI / Prisma Migrate Gate (pull_request) Failing after 622h52m6s
CI / Secrets Scan (pull_request) Failing after 622h52m14s
CI / Python SDK (pull_request) Failing after 622h52m41s
CI / Telegram Mini App (pull_request) Failing after 622h53m22s
CI / Contracts (pull_request) Failing after 622h54m50s
CI / App (pull_request) Failing after 622h58m13s
CI / API (pull_request) Failing after 623h1m0s
b38f60fe4d
## Что сделано
- Tailwind 4 size-shorthand на 17 иконках: `w-X h-X` → `size-X` — все правила `design-no-redundant-size-axes` закрыты
- Конкретно: `w-4.5 h-4.5` ×2 (CheckSquare/Square), `w-3.5 h-3.5` ×3 (bulk action icons), `w-5 h-5` (RefreshCw spinner), `w-10 h-10` (Inbox empty state), `w-4 h-4` ×7 (Eye/EyeOff/Trash2/Chevron icons), `w-2 h-2` (unread dot), `h-11 w-11` ×2 (touch target buttons)
- Новый smoke test `app/src/pages/admin/__tests__/MailInbox.test.tsx` (7 кейсов): empty state, search-mode empty, loading spinner, message list render, pagination (visible / hidden), no-w-X-h-X-pair invariant check across all icons
- Allowance comment в head файла для `code-patterns-enforcer` rule 130 (verbatim inline JSX handlers) + rule 197 false-positive на Tailwind `truncate` utility

## Зачем
Phase 2 react-doctor hygiene #4 после Lightbox/AiRebal/AdminCompliance. **100% closure rate** — все 17 warnings закрыты, лучший показатель в серии. GitNexus impact: **LOW** risk, 0 upstream callers — admin mail subcomponent.

| До | После |
|---|---|
| 17 warnings | **0 warnings** |
| 0 errors | 0 errors |
| 0 tests | 7/7 PASS |

## План тестирования
- `cd app && npx tsc --noEmit` — clean
- `cd app && npx eslint src/pages/admin/MailInbox.tsx --max-warnings 0` — clean
- `cd app && npx vitest run src/pages/admin/__tests__/MailInbox.test.tsx` — **7/7 PASS**
- `cd app && npm run test:i18n-usage` — Missing: 0
- `cd app && npx react-doctor . --offline --lint -y --json` → MailInbox 17 → **0** warnings, app errors=0

## Где могу ошибаться
- `size-4.5` / `size-3.5` — fractional values supported начиная с Tailwind 3.4 (через spacing scale). Tailwind 4 наследует. Если build выявит unknown class — fall back на `size-[18px]` arbitrary value.
- Allowance comment может быть лишним если `code-patterns-enforcer` обновлён — оставил намеренно (defensive)
- Test использует `container.querySelectorAll('svg')` для invariant check — зависит от lucide-react рендера через `<svg>` (стабильная контракт-точка)
- `w-2 h-2 rounded-full` для unread dot стал `size-2 rounded-full` — визуально идентично (2 * 0.25rem = 0.5rem in both)
andrei merged commit 6c91f1d5af into master 2026-05-21 14:51:04 +00:00
andrei deleted branch feature/claude-mail-inbox-warnings-cleanup 2026-05-21 14:51:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
europa-tech-srl/europatech!115
No description provided.