Skip to content

Optimize marketing navbar logo image#1750

Open
sabraman wants to merge 1 commit intopingdotgg:mainfrom
sabraman:codex/optimize-marketing-navbar-logo
Open

Optimize marketing navbar logo image#1750
sabraman wants to merge 1 commit intopingdotgg:mainfrom
sabraman:codex/optimize-marketing-navbar-logo

Conversation

@sabraman
Copy link
Copy Markdown
Contributor

@sabraman sabraman commented Apr 5, 2026

Summary

  • replace the marketing navbar logo's raw img tag with Astro's Image component
  • preserve the existing artwork by using app-icon.png in apps/marketing/src/assets, which lets Astro optimize delivery for the rendered 28x28 size
  • mark the above-the-fold logo as priority

Validation

  • bun fmt
  • bun lint
  • bun typecheck

Note

Low Risk
Low risk: swaps a static navbar logo <img> for Astro’s optimized Image component with explicit dimensions and priority, affecting only marketing layout rendering.

Overview
Updates the marketing layout navbar logo to use Astro’s Image component instead of a raw <img>, sourcing app-icon.png from src/assets so the image can be optimized for the rendered 28x28 size.

Marks the above-the-fold logo as priority to improve initial paint/loading behavior.

Reviewed by Cursor Bugbot for commit 51aae21. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Optimize marketing navbar logo using Astro Image component

Replaces the plain <img src="/icon.png"> tag in Layout.astro with the astro:assets <Image> component, using a local app-icon.png asset at explicit 28x28 dimensions and priority loading. This enables Astro's built-in image optimization for the nav logo.

Macroscope summarized 51aae21.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a35d517d-9613-43a3-97ff-b7ef4a40c89c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 5, 2026
@sabraman sabraman marked this pull request as ready for review April 5, 2026 01:08
@sabraman sabraman force-pushed the codex/optimize-marketing-navbar-logo branch from d4883f4 to ce43cd0 Compare April 5, 2026 01:12
Comment on lines +36 to +43
<Image
src="/icon.png"
alt="T3"
width={28}
height={28}
priority
class="nav-icon"
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High layouts/Layout.astro:36

The priority prop on the Image component is not a valid Astro prop. Astro's Image component from astro:assets uses loading="eager" for priority loading, not priority. The priority attribute is passed through to the HTML as a custom data attribute that browsers ignore, so the intended eager loading behavior does not occur.

            src="/icon.png"
            alt="T3"
            width={28}
            height={28}
-            priority
+            loading="eager"
            class="nav-icon"
🤖 Copy this AI Prompt to have your agent fix this:
In file apps/marketing/src/layouts/Layout.astro around lines 36-43:

The `priority` prop on the `Image` component is not a valid Astro prop. Astro's Image component from `astro:assets` uses `loading="eager"` for priority loading, not `priority`. The `priority` attribute is passed through to the HTML as a custom data attribute that browsers ignore, so the intended eager loading behavior does not occur.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Astro 6 does support priority on astro:assets Image. It maps to eager loading, sync decoding, and high fetch priority for above-the-fold images, so I'm keeping that as-is.

I verified this against the current Astro docs before updating the branch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I'm unable to act on this request because you do not have permissions within this repository.

@sabraman sabraman force-pushed the codex/optimize-marketing-navbar-logo branch from ce43cd0 to 0221dbd Compare April 5, 2026 01:17
@@ -1,4 +1,7 @@
---
import { Image } from "astro:assets";
import navIcon from "../assets/icon.png";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High layouts/Layout.astro:3

Line 3 imports icon.png (~1.1 MB) instead of the intended apple-touch-icon.png (~2.9 KB) from public/. The PR description explicitly states the goal is to use the smaller asset, but the code still references the large file, so the ~99.7% size reduction is not achieved.

-import navIcon from "../assets/icon.png";
+import navIcon from "../../public/apple-touch-icon.png";
🤖 Copy this AI Prompt to have your agent fix this:
In file apps/marketing/src/layouts/Layout.astro around line 3:

Line 3 imports `icon.png` (~1.1 MB) instead of the intended `apple-touch-icon.png` (~2.9 KB) from `public/`. The PR description explicitly states the goal is to use the smaller asset, but the code still references the large file, so the ~99.7% size reduction is not achieved.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 5, 2026

Approvability

Verdict: Needs human review

3 blocking correctness issues found. Multiple unresolved review comments identify substantive issues including a potentially broken import path, invalid Astro props, and wrong image asset being used. These bugs should be addressed before merging.

You can customize Macroscope's approvability policy. Learn more.

@sabraman sabraman force-pushed the codex/optimize-marketing-navbar-logo branch 2 times, most recently from 6189a24 to b314aed Compare April 5, 2026 06:41
@sabraman sabraman force-pushed the codex/optimize-marketing-navbar-logo branch from b314aed to 51aae21 Compare April 5, 2026 06:43
@sabraman sabraman requested a review from juliusmarminge April 5, 2026 06:45
@@ -1,4 +1,7 @@
---
import { Image } from "astro:assets";
import navIcon from "../assets/app-icon.png";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Critical layouts/Layout.astro:3

The import path ../../../assets/prod/black-ios-1024.png resolves to apps/assets/prod/black-ios-1024.png, which does not exist. The actual asset is at assets/prod/black-ios-1024.png. This causes a build failure when Astro attempts to resolve the image import.

Suggested change
import navIcon from "../assets/app-icon.png";
import navIcon from "../../../../assets/prod/black-ios-1024.png";
🤖 Copy this AI Prompt to have your agent fix this:
In file apps/marketing/src/layouts/Layout.astro around line 3:

The import path `../../../assets/prod/black-ios-1024.png` resolves to `apps/assets/prod/black-ios-1024.png`, which does not exist. The actual asset is at `assets/prod/black-ios-1024.png`. This causes a build failure when Astro attempts to resolve the image import.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 51aae21. Configure here.

@@ -1,4 +1,7 @@
---
import { Image } from "astro:assets";
import navIcon from "../assets/app-icon.png";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrong image asset used for navbar logo

Medium Severity

The navIcon import in Layout.astro uses app-icon.png, the padded icon, instead of the unpadded icon.png previously displayed. Despite a confirmed fix, the import was not updated, and src/assets lacks the correct unpadded asset, causing the navbar to show the wrong artwork.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 51aae21. Configure here.

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants