Fix One Pixel Master Layout data requirements and TemplateGallery crashes#4399
Fix One Pixel Master Layout data requirements and TemplateGallery crashes#4399aditi25srivastava wants to merge 8 commits into
Conversation
|
@semantic-release-bot is attempting to deploy a commit to the Anurag Mishra's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Skipping CodeAnt AI review — this PR is a back-merge between long-lived branches ( If you want to analyze this anyway (e.g. you resolved conflicts with new logic), comment |
📝 WalkthroughWalkthroughAdds the One Pixel Master portfolio template with normalized context data and sections for personal details, skills, projects, experience, and contact information. It also adds preview fallbacks, a React error boundary, template registration, and 1.1.0 changelog updates. ChangesOne Pixel Master portfolio template
Runtime error handling
Release changelog
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant TemplateGallery
participant OnePixelMasterLayout
participant PortfolioContext
participant PortfolioSections
TemplateGallery->>OnePixelMasterLayout: pass portfolioData or dummyData
OnePixelMasterLayout->>PortfolioContext: provide normalized data
PortfolioContext->>PortfolioSections: expose portfolio fields
PortfolioSections-->>OnePixelMasterLayout: render template sections
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/src/pages/TemplateGallery.jsx (1)
103-107: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winUpdate the dynamic import to load
index.jsxto mount the context provider.While
TemplatePreviewModalwas correctly updated to loadindex.jsxto fix context crashes,TemplateHeroPreviewstill attempts to loadHero.jsxfirst. For templates likeOne_Pixel_Master_Layout, loadingHero.jsxin isolation means thePortfolioContext.Providerisn't mounted. This causesHeroto receive anullcontext, drop the user'sportfolioData(e.g., their parsedaiDraft), and display the genericdummyDatain the thumbnail preview.Change this to directly import
index.jsxso the entire layout and its context provider are properly instantiated.💻 Proposed fix
- return React.lazy(() => - import(`../components/portfolio/templates/${templateId}/Hero.jsx`).catch(() => - import(`../components/portfolio/templates/${templateId}/index.jsx`) - ) - ); + return React.lazy(() => import(`../components/portfolio/templates/${templateId}/index.jsx`));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/pages/TemplateGallery.jsx` around lines 103 - 107, Update the React.lazy loader in TemplateHeroPreview to directly import each template’s index.jsx instead of attempting Hero.jsx first with a fallback, ensuring the template layout and PortfolioContext.Provider are mounted for thumbnail previews.frontend/src/components/portfolio/templates/Midnight_Gradient/index.jsx (1)
59-652: 🩺 Stability & Availability | 🔴 Critical | 🏗️ Heavy liftMove sub-component definitions outside the main component's render function.
All sub-components (
GlowingCard,Hero,About, etc.) are defined inside theMidnightGradientfunction body. In React, defining components inside another component assigns them a brand-new component type on every single re-render. This causes React to completely tear down and remount the DOM subtree instead of updating it, which destroys local state, breaksframer-motionanimations, and causes severe performance degradation.Move these component definitions and static constants (like
fadeUpandstaggerContainer) outside of theMidnightGradientfunction. You can pass the computeddataobject to them via props.🏗️ Proposed architectural fix
+// Move constants outside +const fadeUp = { ... }; +const staggerContainer = { ... }; + +// Move GlowingCard outside +const GlowingCard = ({ children, className = "", delay = 0 }) => ( + ... +); + +// Move Hero outside and accept data as a prop +function Hero({ data }) { + const nameParts = data.personal.name.split(" "); + // ... +} + +// Do the same for About, Skills, Projects, Experience, Testimonials, Contact +function About({ data }) { ... } + export default function MidnightGradient({ portfolioData }) { // Merge AI data with dummyData const personal = { // ... }; // ... const data = { personal, socials, skills, projects, experience, testimonials, stats }; - // Sleek, reusable glass card with glowing aura and border - const GlowingCard = ({ children, className = "", delay = 0 }) => ( - // ... - ); - // ─── Hero Section ──────────────────────────────────────────────────────────── - function Hero() { - // ... - } return ( <div className="min-h-screen bg-[`#020410`] text-gray-100 font-sans relative overflow-hidden selection:bg-cyan-500/30 selection:text-cyan-200"> {/* ... */} <Hero data={data} /> <About data={data} /> <Skills data={data} /> <Projects data={data} /> <Experience data={data} /> <Testimonials data={data} /> <Contact data={data} /> </div> ); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/components/portfolio/templates/Midnight_Gradient/index.jsx` around lines 59 - 652, Move GlowingCard, Hero, About, Skills, Projects, Experience, Testimonials, Contact, fadeUp, and staggerContainer out of the MidnightGradient component scope so their identities remain stable across renders. Update each section component to receive the required data through props, replace direct render-scope data references with the prop value, and pass the computed data from MidnightGradient when rendering the sections.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 4: Update the changelog section headings currently using `###` under
release titles to `##`, including the headings referenced in the comment.
Preserve the existing heading text and ensure each release’s sections use
sequential Markdown heading levels.
- Around line 451-454: Update the CHANGELOG.md release-generation change so the
new “Reverts” entry is prepended without truncating or replacing any existing
entries. Preserve all historical release sections and ensure semantic-release
continues appending the new release information at the top of the changelog.
In
`@frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Contact.jsx`:
- Around line 27-32: Update the mailto href in the Contact component to read the
email address from socials.email instead of personal.email, while preserving the
existing hello@example.com fallback.
In
`@frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Hero.jsx`:
- Around line 18-24: Update the profile image source in the Hero component’s
image element to use personal.avatar instead of personal.image, while preserving
the existing identicon fallback and rendering behavior.
In
`@frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/index.jsx`:
- Line 12: Update the PortfolioContext declaration to use dummyData as its
default value instead of null, ensuring consumers such as About and Skills can
safely destructure context properties outside a PortfolioContext.Provider.
In `@frontend/src/ErrorBoundary.jsx`:
- Around line 14-23: Update the ErrorBoundary render path for
this.state.hasError to show a generic, user-friendly message in production and
omit the raw error, stack, and componentStack details there. Restrict the
diagnostic <pre> content and error text to the development environment using the
project’s existing environment check, while preserving the fallback error
layout.
---
Outside diff comments:
In `@frontend/src/components/portfolio/templates/Midnight_Gradient/index.jsx`:
- Around line 59-652: Move GlowingCard, Hero, About, Skills, Projects,
Experience, Testimonials, Contact, fadeUp, and staggerContainer out of the
MidnightGradient component scope so their identities remain stable across
renders. Update each section component to receive the required data through
props, replace direct render-scope data references with the prop value, and pass
the computed data from MidnightGradient when rendering the sections.
In `@frontend/src/pages/TemplateGallery.jsx`:
- Around line 103-107: Update the React.lazy loader in TemplateHeroPreview to
directly import each template’s index.jsx instead of attempting Hero.jsx first
with a fallback, ensuring the template layout and PortfolioContext.Provider are
mounted for thumbnail previews.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 063af57d-90af-4f68-aa98-4e9c06b65bb5
⛔ Files ignored due to path filters (1)
frontend/public/template-previews/One_Pixel_Master_Layout.pngis excluded by!**/*.png
📒 Files selected for processing (15)
CHANGELOG.mdfrontend/src/App.jsxfrontend/src/ErrorBoundary.jsxfrontend/src/components/community/PostsFeed.jsxfrontend/src/components/portfolio/templates/Midnight_Gradient/index.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/About.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Contact.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Experience.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Hero.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Projects.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Skills.jsxfrontend/src/components/portfolio/templates/One_Pixel_Master_Layout/index.jsxfrontend/src/data/templates.jsfrontend/src/main.jsxfrontend/src/pages/TemplateGallery.jsx
| # 1.0.0 (2026-07-18) | ||
|
|
||
|
|
||
| ### Bug Fixes |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use sequential Markdown heading levels.
These sections jump from the H1 release title directly to H3. Change each section heading to ## so the document remains structurally valid and accessible.
Also applies to: 211-211, 440-440, 451-451
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 4-4: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 4, Update the changelog section headings currently
using `###` under release titles to `##`, including the headings referenced in
the comment. Preserve the existing heading text and ensure each release’s
sections use sequential Markdown heading levels.
Source: Linters/SAST tools
| ### Reverts | ||
|
|
||
| * remove non-mosaic branch changes ([fe3cba8](https://github.com/aditi25srivastava/career-pilot/commit/fe3cba8c098c5f6fd28022a07f98e81d843e1601)) | ||
|
|
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Preserve the existing changelog history.
This change truncates all entries after the new revert section, permanently removing prior release history. Since semantic-release is configured to update and commit CHANGELOG.md, prepend the new release entry while retaining historical entries rather than replacing them.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` around lines 451 - 454, Update the CHANGELOG.md
release-generation change so the new “Reverts” entry is prepended without
truncating or replacing any existing entries. Preserve all historical release
sections and ensure semantic-release continues appending the new release
information at the top of the changelog.
| <a | ||
| href={`mailto:${personal.email || 'hello@example.com'}`} | ||
| className="inline-block border-2 border-green-500 text-green-500 px-8 py-4 font-bold uppercase tracking-widest hover:bg-green-500 hover:text-black transition-all duration-300" | ||
| > | ||
| [ SEND_TRANSMISSION ] | ||
| </a> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Update the contact email property reference.
The email address is typically stored under socials.email (as observed in other templates), rather than personal.email. Accessing personal.email here will likely be undefined, causing all user inquiries to be misdirected to the fallback address (hello@example.com).
✉️ Proposed fix
<a
- href={`mailto:${personal.email || 'hello@example.com'}`}
+ href={`mailto:${socials.email || 'hello@example.com'}`}
className="inline-block border-2 border-green-500 text-green-500 px-8 py-4 font-bold uppercase tracking-widest hover:bg-green-500 hover:text-black transition-all duration-300"
>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <a | |
| href={`mailto:${personal.email || 'hello@example.com'}`} | |
| className="inline-block border-2 border-green-500 text-green-500 px-8 py-4 font-bold uppercase tracking-widest hover:bg-green-500 hover:text-black transition-all duration-300" | |
| > | |
| [ SEND_TRANSMISSION ] | |
| </a> | |
| <a | |
| href={`mailto:${socials.email || 'hello@example.com'}`} | |
| className="inline-block border-2 border-green-500 text-green-500 px-8 py-4 font-bold uppercase tracking-widest hover:bg-green-500 hover:text-black transition-all duration-300" | |
| > | |
| [ SEND_TRANSMISSION ] | |
| </a> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Contact.jsx`
around lines 27 - 32, Update the mailto href in the Contact component to read
the email address from socials.email instead of personal.email, while preserving
the existing hello@example.com fallback.
| <div className="w-16 h-16 border border-[#333] p-1 shrink-0 group-hover:border-green-500/50 transition-colors duration-500"> | ||
| <img | ||
| src={personal.image || "https://github.com/identicons/onepixel.png"} | ||
| alt={personal.name} | ||
| className="w-full h-full object-cover grayscale opacity-80" | ||
| /> | ||
| </div> |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the properties available in the personal object of dummyData.json
cat frontend/src/data/dummy_data.json | jq '.personal | keys'Repository: anurag3407/career-pilot
Length of output: 233
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== Hero.jsx ==\n'
cat -n frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Hero.jsx | sed -n '1,120p'
printf '\n== avatar/image usage in templates ==\n'
rg -n '\bpersonal\.(avatar|image)\b' frontend/src/components/portfolio/templates -g '*.jsx' -g '*.js' -g '*.tsx' -g '*.ts'
printf '\n== dummy data personal keys ==\n'
cat frontend/src/data/dummy_data.json | jq '.personal'Repository: anurag3407/career-pilot
Length of output: 14668
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== Search for personal.image in repo ==\n'
rg -n '\bpersonal\.image\b' .
printf '\n== Search for schema/data definitions mentioning avatar ==\n'
rg -n '\bavatar\b' frontend/src/data frontend/src/components -g '*.json' -g '*.js' -g '*.jsx' -g '*.ts' -g '*.tsx'Repository: anurag3407/career-pilot
Length of output: 29986
Use personal.avatar for the profile image frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Hero.jsx:20
personal.image isn’t part of the portfolio data shape, so this always falls back to the identicon.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/Hero.jsx`
around lines 18 - 24, Update the profile image source in the Hero component’s
image element to use personal.avatar instead of personal.image, while preserving
the existing identicon fallback and rendering behavior.
| import Experience from './Experience'; | ||
| import Contact from './Contact'; | ||
|
|
||
| export const PortfolioContext = createContext(null); |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Provide a safe default value for the context.
If any child component (such as <About /> or <Skills />) is ever rendered outside the PortfolioContext.Provider (e.g., in tests or isolated component previews), useContext will return null. Since the child components directly destructure the context (const { personal } = useContext(...)), this will result in a TypeError and crash the render.
Setting dummyData as the default context value safely guarantees that the properties will always exist.
🛡️ Proposed fix
-export const PortfolioContext = createContext(null);
+export const PortfolioContext = createContext(dummyData);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const PortfolioContext = createContext(null); | |
| export const PortfolioContext = createContext(dummyData); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@frontend/src/components/portfolio/templates/One_Pixel_Master_Layout/index.jsx`
at line 12, Update the PortfolioContext declaration to use dummyData as its
default value instead of null, ensuring consumers such as About and Skills can
safely destructure context properties outside a PortfolioContext.Provider.
|
Deployment failed with the following error: |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CHANGELOG.md (1)
3073-3077: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winRemove unresolved merge-conflict markers.
The literal conflict marker
> > > > > > > 1c7ce5eb2f82a6229bbf050357b7ebb299a7e5a3is present in the published changelog and will render as unexplained content. Resolve the conflict and remove both marker lines.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@CHANGELOG.md` around lines 3073 - 3077, Remove both unresolved merge-conflict marker lines surrounding the LinkedIn changelog entry, preserving the valid frontend changelog entry and its link.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 2930: Update the changelog bullet for “remove non-mosaic branch changes”
by removing the stray heading marker so it remains a properly formatted list
item.
- Line 1: Reconcile the CHANGELOG release history by confirming the intended
package version, then update the duplicated 1.1.0 entries, the out-of-order
1.271.0 entry, their dates, and comparison links so versions appear uniquely and
in chronological descending order. Ensure the result matches the confirmed
package version.
- Around line 2340-2341: Deduplicate and reorder the generated release history
in CHANGELOG.md: at lines 2340-2341, remove the duplicate 1.251.0 header and
place the canonical 1.251.0 section in descending order relative to 1.260.0; at
lines 2491-2510, remove the repeated 1.248.3, 1.248.2, and 1.248.1 sections,
leaving one canonical section per version.
---
Outside diff comments:
In `@CHANGELOG.md`:
- Around line 3073-3077: Remove both unresolved merge-conflict marker lines
surrounding the LinkedIn changelog entry, preserving the valid frontend
changelog entry and its link.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 15e3a963-db8d-425f-8ba3-c785ed84d970
📒 Files selected for processing (2)
CHANGELOG.mdfrontend/src/pages/TemplateGallery.jsx
| @@ -1,28 +1,415 @@ | |||
| # [1.1.0](https://github.com/aditi25srivastava/career-pilot/compare/v1.0.0...v1.1.0) (2026-07-18) | |||
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Reconcile the release version and chronology.
1.1.0 (2026-07-18) is followed by 1.271.0 (2026-07-17), and the same 1.1.0 version appears repeatedly later in the file. This makes the changelog’s release history and comparison links unreliable; confirm the intended package version before merging.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 1, Reconcile the CHANGELOG release history by
confirming the intended package version, then update the duplicated 1.1.0
entries, the out-of-order 1.271.0 entry, their dates, and comparison links so
versions appear uniquely and in chronological descending order. Ensure the
result matches the confirmed package version.
| # [1.251.0](https://github.com/anurag3407/career-pilot/compare/v1.250.1...v1.251.0) (2026-06-20) | ||
| # [1.260.0](https://github.com/anurag3407/career-pilot/compare/v1.259.0...v1.260.0) (2026-06-21) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Deduplicate and reorder the generated release history. Multiple release blocks are repeated or inserted out of order, so each version must have one canonical section in descending chronological order.
CHANGELOG.md#L2340-L2341: remove the duplicate1.251.0header and restore the correct ordering relative to1.260.0.CHANGELOG.md#L2491-L2510: remove the repeated1.248.3,1.248.2, and1.248.1sections.
📍 Affects 1 file
CHANGELOG.md#L2340-L2341(this comment)CHANGELOG.md#L2491-L2510
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` around lines 2340 - 2341, Deduplicate and reorder the generated
release history in CHANGELOG.md: at lines 2340-2341, remove the duplicate
1.251.0 header and place the canonical 1.251.0 section in descending order
relative to 1.260.0; at lines 2491-2510, remove the repeated 1.248.3, 1.248.2,
and 1.248.1 sections, leaving one canonical section per version.
| @@ -2537,63 +2924,63 @@ | |||
| - replace N+1 findOne loop with bulk $in query in processAlert ([e953cae](https://github.com/Kaushal00Vaid/career-pilot/commit/e953cae6c7cd8a58c3331c3595d4c86d1033f60b)), closes [#1744](https://github.com/Kaushal00Vaid/career-pilot/issues/1744) | |||
| - reuse shared Puppeteer browser instance for screenshots ([ab7a465](https://github.com/Kaushal00Vaid/career-pilot/commit/ab7a4653a738b008d77540e64d404041d44d78e4)) | |||
|
|
|||
| ### Reverts | |||
| ## Reverts | |||
|
|
|||
| - force dark mode in Resume Builder and default to dark theme ([5e7a319](https://github.com/Kaushal00Vaid/career-pilot/commit/5e7a319b63d8d9e5251ce60994a66ecd70bded2f)) | |||
| - # remove non-mosaic branch changes ([fe3cba8](https://github.com/Kaushal00Vaid/career-pilot/commit/fe3cba8c098c5f6fd28022a07f98e81d843e1601)) | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the stray heading marker from this bullet.
- # remove non-mosaic branch changes renders with malformed formatting inside the Reverts list. Remove the extra #.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 2930, Update the changelog bullet for “remove
non-mosaic branch changes” by removing the stray heading marker so it remains a
properly formatted list item.
Resolves #3273
Overview
This PR introduces the highly requested One-Pixel Master Layout template to the portfolio builder and addresses a critical architectural bug in the
TemplateGallerylive preview modal that was causing components to crash.Features & Template Implementation
One_Pixel_Master_Layouttemplate insidefrontend/src/components/portfolio/templates/.PortfolioContext, ensuring seamless injection of real user data.index.jsxwrapper correctly mergesportfolioDatawithdummyDatato ensure the template always has robust data to render when previewed in the gallery.frontend/src/data/templates.jswith the correctisCompleteflag and metadata.Bug Fixes & Architecture
TemplateGallery.jsxLive Demo Crashes: Discovered that the full-pageTemplatePreviewModalwas erroneously hardcoded to loadHero.jsxinstead of the rootindex.jsx.index.jsx, thePortfolioContext.Providerwas never mounting, causing the gallery to render a blank page for all sections below the Hero. Pointing the lazy loader toindex.jsxfully resolves this issue for all templates moving forward.dataandportfolioDataprops to ensure backwards compatibility with older templates that expect different prop names.Verification
undefinedvariable crashes when clicking between templates.Summary by CodeRabbit