Skip to content

Conversation

@kasya
Copy link
Collaborator

@kasya kasya commented Dec 7, 2025

Updated OWASP Nest logo, favicon and links in metadata for social media shares.

@github-actions github-actions bot added docs Improvements or additions to documentation frontend frontend-tests labels Dec 7, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 7, 2025

Summary by CodeRabbit

  • Documentation

    • Updated logo and branding asset references in README and metadata.
  • Style

    • Simplified logo display to use a single unified logo across themes.
    • Updated loading spinner imagery and color variants.
  • Tests

    • Updated tests to reflect changes in logo rendering and spinner image expectations.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Replaces external OWASP image references with local/project images, consolidates Header logo rendering to a single dark logo, updates spinner image paths and color variant mapping (white→blue), and adjusts metadata and unit tests to match the new assets and rendering behavior.

Changes

Cohort / File(s) Summary
Header & README logo changes
README.md, frontend/src/components/Header.tsx, frontend/__tests__/unit/pages/Header.test.tsx
Replaced external/dark–light logo refs with project images; consolidated dual light/dark logo rendering into a single /img/logo_dark.png in Header; updated tests to expect fewer logo images and the new dark logo src.
Loading spinner & layout defaults
frontend/src/components/LoadingSpinner.tsx, frontend/__tests__/unit/components/LoadingSpinner.test.tsx, frontend/src/components/SearchPageLayout.tsx
Switched default spinner images to project variants (spinner_white.png, spinner_light.png); changed dark-theme variant transform from white → blue; updated/extended spinner tests to assert theme-specific image selection and classes.
Metadata & favicons
frontend/src/app/layout.tsx, frontend/src/utils/metaconfig.ts
Replaced external OWASP favicon and preview image URLs with local /img/favicon.ico and nest_1200x630_light.png for layout metadata and default ogImage.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify Header consolidation doesn't regress responsive/mobile branding and accessibility (alt text).
  • Confirm spinner white→blue mapping and new image paths render correctly in both themes and when a custom imageUrl is provided.
  • Check metadata image URLs for correctness and broken-link risks.
  • Review updated tests for accuracy and sufficient coverage.

Possibly related PRs

Suggested reviewers

  • arkid15r
  • aramattamara

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: updating the OWASP Nest logo across the codebase, which is the primary objective of the PR.
Description check ✅ Passed The description is directly related to the changeset, covering the main updates to logo, favicon, and social media metadata as reflected in the file changes.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-new-logo

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d62074 and bc7485a.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Run frontend unit tests
  • GitHub Check: Run frontend e2e tests
  • GitHub Check: Run backend tests
  • GitHub Check: CodeQL (python)
  • GitHub Check: CodeQL (javascript-typescript)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
README.md (1)

4-5: Logo URLs and dark/light handling look consistent

The new dark/light logo URLs under nest.owasp.org and the <picture> setup look good. If you ever revisit accessibility copy, consider updating the alt text to something like “OWASP Nest logo” for extra specificity, but it’s not blocking.

frontend/src/components/LoadingSpinner.tsx (1)

9-12: Consider renaming the dark variable for clarity

The new spinner paths and white→blue swap behave as the tests expect, but const dark = image.replace('white', 'blue') is slightly confusing since that value is actually used for the light-theme image. Renaming to something like lightThemeImage (and/or adding a brief comment about the white/blue mapping) would make intent clearer for future readers.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78cf54a and 2b6891e.

⛔ Files ignored due to path filters (8)
  • frontend/public/img/favicon.ico is excluded by !**/*.ico
  • frontend/public/img/logo_dark.png is excluded by !**/*.png
  • frontend/public/img/logo_light.png is excluded by !**/*.png
  • frontend/public/img/nest_1200x630_light.png is excluded by !**/*.png
  • frontend/public/img/owasp_icon_black_sm.png is excluded by !**/*.png
  • frontend/public/img/owasp_icon_white_background.png is excluded by !**/*.png
  • frontend/public/img/spinner_blue.png is excluded by !**/*.png
  • frontend/public/img/spinner_white.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • README.md (1 hunks)
  • frontend/__tests__/unit/components/LoadingSpinner.test.tsx (3 hunks)
  • frontend/__tests__/unit/pages/Header.test.tsx (4 hunks)
  • frontend/src/app/layout.tsx (2 hunks)
  • frontend/src/components/Header.tsx (2 hunks)
  • frontend/src/components/LoadingSpinner.tsx (1 hunks)
  • frontend/src/components/SearchPageLayout.tsx (1 hunks)
  • frontend/src/utils/metaconfig.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-08-01T04:15:32.151Z
Learnt from: ahmedxgouda
Repo: OWASP/Nest PR: 1823
File: frontend/__tests__/e2e/pages/Login.spec.ts:28-34
Timestamp: 2025-08-01T04:15:32.151Z
Learning: In the OWASP Nest project, the login page (/auth/login) handles only authentication (GitHub OAuth) and does not differentiate between OWASP staff and non-staff users. The role-based access control using the is_owasp_staff field happens after authentication in downstream components like DashboardWrapper and ProjectsWrapper, not during the login process itself.

Applied to files:

  • README.md
📚 Learning: 2025-07-28T14:51:14.736Z
Learnt from: adithya-naik
Repo: OWASP/Nest PR: 1894
File: frontend/src/components/TopContributorsList.tsx:74-74
Timestamp: 2025-07-28T14:51:14.736Z
Learning: In the OWASP/Nest project, the maintainer adithya-naik prefers not to create separate components for code that's only used in two specific cases, following the YAGNI principle to avoid over-engineering when the duplication is limited and manageable.

Applied to files:

  • README.md
📚 Learning: 2025-11-17T16:47:05.578Z
Learnt from: anurag2787
Repo: OWASP/Nest PR: 2671
File: frontend/__tests__/unit/components/MultiSearch.test.tsx:427-427
Timestamp: 2025-11-17T16:47:05.578Z
Learning: In the frontend test files for the OWASP/Nest repository, `expect(true).toBe(true)` no-op assertions may be intentionally added as workarounds when ESLint rule jest/expect-expect doesn't detect expectations inside helper functions or waitFor callbacks. These can be resolved by configuring the ESLint rule's assertFunctionNames option to recognize custom assertion helpers instead of flagging them as redundant.

Applied to files:

  • frontend/__tests__/unit/components/LoadingSpinner.test.tsx
  • frontend/__tests__/unit/pages/Header.test.tsx
📚 Learning: 2025-09-17T02:42:41.928Z
Learnt from: Rajgupta36
Repo: OWASP/Nest PR: 2288
File: frontend/src/components/ActionButton.tsx:0-0
Timestamp: 2025-09-17T02:42:41.928Z
Learning: In frontend/src/components/ActionButton.tsx, the user Rajgupta36 intentionally changed text-blue-600 to text-[#1D7BD7] to align the text color with the border color (#1D7BD7) for visual consistency, prioritizing design alignment over theme tokens.

Applied to files:

  • frontend/src/components/LoadingSpinner.tsx
📚 Learning: 2025-11-17T17:30:42.139Z
Learnt from: anurag2787
Repo: OWASP/Nest PR: 2671
File: frontend/__tests__/unit/components/MultiSearch.test.tsx:169-171
Timestamp: 2025-11-17T17:30:42.139Z
Learning: In the OWASP/Nest frontend tests (PR #2671 context), wrapper functions like `expectChaptersCountEqualsThree` that simply call another helper with a fixed parameter (e.g., `expectChaptersCountEquals(3)`) are intentionally used to avoid arrow function callbacks in `waitFor` calls. This pattern prevents adding nesting depth that would trigger rule typescript:S2004. Example: `await waitFor(expectChaptersCountEqualsThree)` avoids the extra nesting from `await waitFor(() => expectChaptersCountEquals(3))`.

Applied to files:

  • frontend/__tests__/unit/pages/Header.test.tsx
🧬 Code graph analysis (1)
frontend/__tests__/unit/pages/Header.test.tsx (1)
frontend/src/components/Header.tsx (1)
  • Header (21-239)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Run frontend e2e tests
  • GitHub Check: Run backend tests
  • GitHub Check: Run frontend unit tests
  • GitHub Check: CodeQL (javascript-typescript)
🔇 Additional comments (6)
frontend/src/components/Header.tsx (1)

63-72: Unified header logo implementation matches new branding

Both desktop and mobile header now consistently render the same /img/logo_dark.png asset with sensible sizing and alt text. The duplication between the two blocks is acceptable here and aligns with the updated tests.

Also applies to: 155-164

frontend/src/app/layout.tsx (1)

31-33: Favicon and social image metadata updates are coherent

Using the local /img/favicon.ico for all icon slots and standardizing Open Graph/Twitter images on nest_1200x630_light.png keeps metadata consistent with the new branding and with generateSeoMetadata. Looks good.

Also applies to: 39-42, 56-56

frontend/src/components/SearchPageLayout.tsx (1)

32-32: Search skeleton now uses spinner asset by default

Switching the default loadingImageUrl to /img/spinner_light.png aligns this layout’s loading state with the new spinner assets and requires no other changes to the component.

frontend/src/utils/metaconfig.ts (1)

20-20: SEO helper default image now aligned with app-level metadata

Updating the default ogImage to nest_1200x630_light.png keeps generated SEO metadata in sync with RootLayout’s Open Graph/Twitter config and the new branding. Change looks correct.

frontend/__tests__/unit/pages/Header.test.tsx (1)

223-224: Header logo tests correctly reflect the new single-asset behavior

Adjusting expectations to 2 logo images and explicitly asserting /img/logo_dark.png for both desktop and mobile headers keeps the tests in lockstep with the updated Header component. The branding coverage here looks solid.

Also applies to: 237-239, 252-254, 262-272

frontend/__tests__/unit/components/LoadingSpinner.test.tsx (1)

24-25: Spinner tests comprehensively cover the new white/blue theming

The updated assertions for ...contains('blue') and explicit checks for /img/spinner_white.png and /img/spinner_blue.png, plus the new “Theme-specific image loading” suite, align well with the component logic and reduce regression risk around future asset changes.

Also applies to: 46-47, 53-55, 73-105

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b6891e and 6d62074.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-07-28T14:51:14.736Z
Learnt from: adithya-naik
Repo: OWASP/Nest PR: 1894
File: frontend/src/components/TopContributorsList.tsx:74-74
Timestamp: 2025-07-28T14:51:14.736Z
Learning: In the OWASP/Nest project, the maintainer adithya-naik prefers not to create separate components for code that's only used in two specific cases, following the YAGNI principle to avoid over-engineering when the duplication is limited and manageable.

Applied to files:

  • README.md
📚 Learning: 2025-08-01T04:15:32.151Z
Learnt from: ahmedxgouda
Repo: OWASP/Nest PR: 1823
File: frontend/__tests__/e2e/pages/Login.spec.ts:28-34
Timestamp: 2025-08-01T04:15:32.151Z
Learning: In the OWASP Nest project, the login page (/auth/login) handles only authentication (GitHub OAuth) and does not differentiate between OWASP staff and non-staff users. The role-based access control using the is_owasp_staff field happens after authentication in downstream components like DashboardWrapper and ProjectsWrapper, not during the login process itself.

Applied to files:

  • README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Run CI Denendencies Scan
  • GitHub Check: Run Code Scan
  • GitHub Check: CodeQL (javascript-typescript)
  • GitHub Check: Analyze (python)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@kasya kasya marked this pull request as ready for review December 7, 2025 23:38
@kasya kasya requested a review from arkid15r as a code owner December 7, 2025 23:38
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 7, 2025

@arkid15r arkid15r enabled auto-merge December 8, 2025 00:01
Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM

@arkid15r arkid15r added this pull request to the merge queue Dec 8, 2025
Merged via the queue into main with commit c057e04 Dec 8, 2025
28 checks passed
@arkid15r arkid15r deleted the add-new-logo branch December 8, 2025 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation frontend frontend-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants