Skip to content

fix(frontend): align memories page wrapper with route#1237

Closed
Ashvin-KS wants to merge 1 commit intoAOSSIE-Org:mainfrom
Ashvin-KS:fix/memories-page-wrapper
Closed

fix(frontend): align memories page wrapper with route#1237
Ashvin-KS wants to merge 1 commit intoAOSSIE-Org:mainfrom
Ashvin-KS:fix/memories-page-wrapper

Conversation

@Ashvin-KS
Copy link

@Ashvin-KS Ashvin-KS commented Mar 19, 2026

Addressed Issues:

Fixes #1236

Screenshots/Recordings:

N/A (no visual behavior change intended)

Additional Notes:

This is a small frontend consistency fix:

  • pages/Memories/Memories.tsx now renders MemoriesPage
  • AppRoutes.tsx imports the Memories route from the page module

Why:
The page wrapper was a placeholder, which could let page-level tests pass without exercising the real Memories UI.

AI Usage Disclosure:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools:

  • OpenAI Codex (GPT-5.4)

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • New Features
    • Memories page is now fully functional and displays content to users.

Copilot AI review requested due to automatic review settings March 19, 2026 13:32
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

Walkthrough

The Memories page wrapper component is updated to render the real MemoriesPage component instead of an empty fragment. The routing layer is simultaneously updated to import the page wrapper from pages/Memories rather than directly importing MemoriesPage from components, establishing consistent page-layer architecture.

Changes

Cohort / File(s) Summary
Memories Page Structure
frontend/src/pages/Memories/Memories.tsx, frontend/src/routes/AppRoutes.tsx
Updated page wrapper to render MemoriesPage component. Routing now uses the page-level wrapper as the single entrypoint, eliminating direct component imports and establishing consistent page-layer structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested labels

TypeScript/JavaScript

Poem

🐰 A bunny hops with glee today,
The empty wrapper fades away,
Real Memories now shine so bright,
The page layer's finally right!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: aligning the memories page wrapper component with the routing structure.
Linked Issues check ✅ Passed The code changes directly address all requirements from issue #1236: replacing the empty fragment with MemoriesPage and ensuring consistent page-layer routing.
Out of Scope Changes check ✅ Passed All changes are focused on the stated objective of aligning the memories page wrapper with routing; no unrelated modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

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

Aligns the Memories route and page entrypoint so routing and page-level tests exercise the real Memories UI (fixing the placeholder wrapper issue described in #1236).

Changes:

  • Update pages/Memories/Memories.tsx to render the real MemoriesPage component.
  • Update AppRoutes.tsx to route to the page module (pages/Memories/Memories) instead of importing MemoriesPage directly from components.

Reviewed changes

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

File Description
frontend/src/routes/AppRoutes.tsx Routes ROUTES.MEMORIES to the page entrypoint (<Memories />) and updates the import accordingly.
frontend/src/pages/Memories/Memories.tsx Replaces the empty placeholder render with MemoriesPage, ensuring the page wrapper exercises the actual UI.

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

You can also share your feedback on Copilot code review. Take the survey.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@frontend/src/routes/AppRoutes.tsx`:
- Line 26: Add an integration test in allPages.test.tsx (or a new test file)
that renders AppRoutes and navigates to ROUTES.MEMORIES instead of mounting
Memories directly: use a router helper (e.g., MemoryRouter or
createMemoryHistory + Router) and initialize it with the path ROUTES.MEMORIES,
render <AppRoutes /> and then assert real Memories UI behavior (for example
check for the Memories page heading, a specific button, or that the memory list
items appear) rather than just a smoke test; ensure the test imports AppRoutes,
ROUTES, and the same selectors/text used by the Memories component to validate
real routing and UI.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 04089976-86e1-4f13-a3ee-bb145d9826d4

📥 Commits

Reviewing files that changed from the base of the PR and between 8274ebd and e12e1f0.

📒 Files selected for processing (2)
  • frontend/src/pages/Memories/Memories.tsx
  • frontend/src/routes/AppRoutes.tsx

<Route path={ROUTES.AI} element={<AITagging />} />
<Route path={ROUTES.ALBUMS} element={<ComingSoon />} />
<Route path={ROUTES.MEMORIES} element={<MemoriesPage />} />
<Route path={ROUTES.MEMORIES} element={<Memories />} />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Scanning frontend tests for Memories route coverage via AppRoutes..."
fd -t f '(test|spec)\.(ts|tsx|js|jsx)$' frontend \
  | xargs -r rg -n -C3 'AppRoutes|ROUTES\.MEMORIES|/memories|MemoriesPage|@/pages/Memories/Memories|@/components/Memories'

Repository: AOSSIE-Org/PictoPy

Length of output: 386


🏁 Script executed:

fd -t f '(test|spec)\.(ts|tsx|js|jsx)$' frontend \
  | xargs -r rg -l 'Page rendering tests' \
  | head -5

Repository: AOSSIE-Org/PictoPy

Length of output: 108


🏁 Script executed:

# Once we find the file, let's read it to see the full test implementation
fd -t f '(test|spec)\.(ts|tsx|js|jsx)$' frontend \
  | xargs -r rg -l 'Page rendering tests' \
  | xargs head -100

Repository: AOSSIE-Org/PictoPy

Length of output: 1653


Add integration test for the Memories route through AppRoutes.

The existing allPages.test.tsx test only renders the Memories component directly with a smoke-test assertion ("renders without crashing"). This does not exercise the route through AppRoutes or verify real Memories UI behavior. Add an integration test that navigates to ROUTES.MEMORIES via AppRoutes and asserts expected Memories functionality.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/routes/AppRoutes.tsx` at line 26, Add an integration test in
allPages.test.tsx (or a new test file) that renders AppRoutes and navigates to
ROUTES.MEMORIES instead of mounting Memories directly: use a router helper
(e.g., MemoryRouter or createMemoryHistory + Router) and initialize it with the
path ROUTES.MEMORIES, render <AppRoutes /> and then assert real Memories UI
behavior (for example check for the Memories page heading, a specific button, or
that the memory list items appear) rather than just a smoke test; ensure the
test imports AppRoutes, ROUTES, and the same selectors/text used by the Memories
component to validate real routing and UI.

@SIDDHANTCOOKIE
Copy link

Hey thanks for contributing but currently we are closing all prs that are linked to unreviewed issues please wait for mentors to discuss the issue mention your issue with some idea in the discord channel and wait for them to assign it to you then go ahead with the pr!

@Ashvin-KS
Copy link
Author

Thanks for the update and for clarifying the process.

Understood, I’ll pause the PR for now. I’ll post the issue with my implementation idea in the Discord channel and wait for mentor review/assignment before proceeding further.

Appreciate the guidance.

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.

BUG: Memories page wrapper renders placeholder instead of real Memories screen

3 participants