Skip to content

fix: restore GX theme parity and stabilize admin/notification test suites#37

Merged
adm01-debug merged 1 commit into
mainfrom
fix/restore-gx-parity-and-test-suites
May 22, 2026
Merged

fix: restore GX theme parity and stabilize admin/notification test suites#37
adm01-debug merged 1 commit into
mainfrom
fix/restore-gx-parity-and-test-suites

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

@adm01-debug adm01-debug commented May 21, 2026

Resumo

Restaura a paridade de tema GX e estabiliza as suítes de teste de admin/notification que estavam vermelhas no main.

Mudanças

  • Restore GX preset lightness parity em src/lib/theme-presets.ts — os skins gx-pink-addiction (60), gx-rose-quartz (68), gx-hackerman (46), gx-frutti-di-mare (42) e gx-razer (51) tiveram a lightness baixada "para WCAG", quebrando a paridade com o zapp-web. Revertido para os valores zapp. Isso também conserta os tokens derivados glass-border (§4) e os testes de reload/sequência do ThemeInitializer (§11).
  • Fix NotificationDrawer timing tests — o vi.mock apontava para @/hooks/useNotifications, mas o componente importa de @/hooks/ui/useNotifications (via barrel @/hooks/ui). O mock nunca interceptava, então o hook real rodava e useAuth lançava useAuth must be used within an AuthProvider. Mock repontado para o specifier correto.
  • Fix brittle AdminTelemetriaPage assertion — o teste esperava data-testid="main-layout", mas a página NÃO envelopa MainLayout (o layout vem do roteamento), então o mock nunca era exercido. Asserção trocada para o marcador que a própria página renderiza (page-title-telemetria).
  • Update 500-row test timeout — o teste de 500 linhas ganhou timeout de 30s, mesma convenção já usada pelo teste pesado no mesmo arquivo.

Validação

4/4 suítes-alvo verdes localmente:

tests/lib/theme-presets.test.ts ............... 166 passed
tests/components/NotificationDrawer-...timing.. 5 passed
tests/pages/AdminTelemetriaPage.test.tsx ...... passed
tests/admin/skeleton-snapshots.test.tsx ....... passed
Tests  243 passed | 1 skipped (244) | 0 failed

Estado anterior no main: 16 falhas.


Summary by cubic

Restores GX theme preset lightness to match zapp-web and stabilizes admin/notification test suites. All targeted tests now pass locally.

  • Bug Fixes
    • Revert lightness for gx-pink-addiction, gx-rose-quartz, gx-hackerman, gx-frutti-di-mare, gx-razer in src/lib/theme-presets.ts to zapp parity; fixes derived glass-border tokens and ThemeInitializer reload/sequence tests.
    • Point vi.mock to @/hooks/ui/useNotifications (was @/hooks/useNotifications) so NotificationDrawer timing tests stub correctly and avoid useAuth provider errors.
    • Update Admin Telemetria test to assert page-title-telemetria instead of main-layout.
    • Increase the 500-row render test timeout to 30s.

Written for commit f909b94. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

Notas de Lançamento

  • Style

    • Ajustados valores de luminosidade em vários presets de tema para garantir consistência visual e paridade de contraste.
  • Tests

    • Atualizados testes para melhorar verificação de comportamento de renderização e timing de operações assíncronas.

Review Change Stack

…ites

- Restore GX preset lightness parity in src/lib/theme-presets.ts (pink-addiction,
  rose-quartz, hackerman, frutti-di-mare, razer) to zapp-web values; this also
  fixes derived glass-border tokens and the ThemeInitializer reload/sequence tests.
- Fix NotificationDrawer timing tests: repoint vi.mock to @/hooks/ui/useNotifications
  (the specifier the component actually imports), so useAuth/AuthProvider no longer throws.
- Fix brittle AdminTelemetriaPage assertion: the page does not wrap MainLayout (layout
  comes from routing); assert the page's own marker (page-title-telemetria) instead.
- Give the 500-row AdminTelemetria render test a 30s timeout (same convention already
  used by the heavy test in the same file).

Validation: 4/4 target suites green (243 passed, 1 skipped, 0 failed).
Copilot AI review requested due to automatic review settings May 21, 2026 17:33
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
we-dream-big Ready Ready Preview, Comment May 21, 2026 5:34pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 783c3b20-640c-46ba-a70e-6450a690823a

📥 Commits

Reviewing files that changed from the base of the PR and between d22761e and f909b94.

📒 Files selected for processing (3)
  • src/lib/theme-presets.ts
  • tests/components/NotificationDrawer-trigger-to-fetch-timing.test.tsx
  • tests/pages/AdminTelemetriaPage.test.tsx

Walkthrough

O PR ajusta valores de luminosidade em cinco presets Opera GX para alcançar paridade com zapp, atualiza um caminho de import em mock de teste de notificações, e revisa testes de página admin com novo validador de testid e timeout explícito de 30s.

Changes

Manutenção de Tema e Testes

Layer / File(s) Summary
Atualização de luminosidade Opera GX para zapp parity
src/lib/theme-presets.ts
Cinco presets (gx-pink-addiction, gx-rose-quartz, gx-hackerman, gx-frutti-di-mare, gx-razer) recebem novos valores de luminosidade (l) para atingir paridade com zapp.
Atualização de caminho de mock do hook useNotifications
tests/components/NotificationDrawer-trigger-to-fetch-timing.test.tsx
Mock do hook é redirecionado de @/hooks/useNotifications para @/hooks/ui/useNotifications, mantendo suporte a prefetchMock.
Ajustes de teste de página AdminTelemetria
tests/pages/AdminTelemetriaPage.test.tsx
Validação de renderização agora verifica page-title-telemetria testid em vez de MainLayout, e teste de 500 linhas recebe timeout explícito de 30000ms.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed O título descreve com precisão as mudanças principais: restauração de paridade de temas GX e estabilização de testes. Reflete fielmente o escopo do PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/restore-gx-parity-and-test-suites

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores Opera GX theme preset lightness values to match the upstream zapp-web presets (fixing derived token/test regressions), and stabilizes a few flaky/red test suites in admin and notifications by correcting mocks and adjusting assertions/timeouts.

Changes:

  • Reverted several GX preset l (lightness) values back to zapp-web parity in src/lib/theme-presets.ts.
  • Fixed NotificationDrawer timing tests by mocking the correct useNotifications module specifier.
  • Made AdminTelemetriaPage tests less brittle by asserting a page-owned marker and extending the heavy 500-row test timeout.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/lib/theme-presets.ts Restores GX preset lightness values to match upstream parity.
tests/components/NotificationDrawer-trigger-to-fetch-timing.test.tsx Fixes mock path so the intended hook is actually intercepted during tests.
tests/pages/AdminTelemetriaPage.test.tsx Updates a brittle layout assertion and increases timeout for the heavy 500-row test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants