Skip to content

Fix/homepage config resolver#9

Merged
willymwai merged 4 commits into
devfrom
fix/homepage-config-resolver
Jul 2, 2026
Merged

Fix/homepage config resolver#9
willymwai merged 4 commits into
devfrom
fix/homepage-config-resolver

Conversation

@Elias-3817

Copy link
Copy Markdown

Makes the customer storefront show each shop's published homepage and
carry OLITT branding.

Homepage

The resolver treated the whole tenant record as a homepage config and
never read design.layout.homepage (its guard passes when version/sections
are absent, always true for the store record), so every shop rendered
the generic default. Now it resolves the nested homepage first, with the
old behaviour preserved as a fallback.

Branding

Header logo defaults to the OLITT logo and the footer reads "Powered by
OLITT".

Also, next/image now allowlists the local media host for dev; the
production storefront-image host must be added to images.remotePatterns
or hero images will 400 in prod.

extractHomepageSource returned the whole tenant record before descending
into design.layout.homepage, because the "looks like a homepage config"
guard passes when version and sections are absent (always true for the
store record). Published homepages were never read, so every shop fell
back to the default. Resolve the nested homepage first, keep the
whole-record check as a last resort. Also allowlist the local media host
for next/image so the hero image renders in dev.
Replace the Spree fallback logo with the OLITT logo and change the footer
to "Powered by OLITT" (links olitt.com).
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copilot AI left a comment

Copy link
Copy Markdown

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 fixes homepage configuration resolution so the storefront can render each tenant’s published homepage (preferring nested design.layout.homepage over treating the whole tenant record as a config), and updates default storefront branding to OLITT (logo + footer attribution). It also updates Next.js image allowlisting for local media during development.

Changes:

  • Adjust homepage source extraction to resolve nested homepage config before falling back to the root source.
  • Update default branding (header logo + footer “Powered by” link/text) and add the OLITT logo asset.
  • Allowlist http://127.0.0.1:9000/media/** in next/image remotePatterns for dev media.

Reviewed changes

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

Show a summary per file
File Description
src/lib/homepage/index.ts Changes homepage config source selection order to prefer nested config.
src/components/layout/Header.tsx Switches default header logo to OLITT asset.
src/components/layout/Footer.tsx Updates footer attribution link/text to OLITT.
public/olitt-logo.svg Adds OLITT logo SVG asset.
next.config.ts Adds local media host remotePattern for next/image in dev.
Comments suppressed due to low confidence (1)

src/components/layout/Header.tsx:77

  • The header logo default was changed to an SVG, but next/image will try to route it through the image optimizer which can 400 on SVGs unless you opt out. Consider marking SVG logos as unoptimized (or render with a plain ) to avoid a broken header logo.
          <Image
            src={branding.logoUrl ?? "/olitt-logo.svg"}
            alt={branding.name ?? getStoreName()}
            width={90}
            height={32}
            className="max-w-full object-contain"
            style={{ width: "auto", height: "auto" }}
            fetchPriority="high"
            loading="eager"
          />

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

Comment thread src/components/layout/Footer.tsx
Comment thread src/lib/homepage/index.ts Outdated
Comment thread src/components/layout/Footer.tsx Outdated
Cover getHomepageConfig reading the tenant homepage nested at
design.layout.homepage, cleared social proof not leaking through the
default merge, section order preservation, and the default fallback
when no homepage is present. Fails on the pre-fix resolver ordering.
Add rel="noopener noreferrer" to the OLITT footer link to match the
file's other external links, insert an explicit space so "Powered by"
renders separately from "OLITT" across all locales, and drop the
redundant homepage-source self-check that returned source on both
branches.
@willymwai willymwai merged commit 1e254da into dev Jul 2, 2026
@willymwai willymwai deleted the fix/homepage-config-resolver branch July 2, 2026 08:03
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.

3 participants