Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ plt.savefig('plot.png', dpi=300, bbox_inches='tight')

The project runs on **Google Cloud Platform** (europe-west4 region):

| Service | Component | Purpose |
|---------|-----------|---------|
| **Cloud Run** | `pyplots-backend` | FastAPI API (auto-scaling, serverless) |
| Service | Component | Purpose |
|---------|--------------------|---------|
| **Cloud Run** | `pyplots-backend` | FastAPI API (auto-scaling, serverless) |
| **Cloud Run** | `pyplots-frontend` | React SPA served via nginx |
| **Cloud SQL** | PostgreSQL 15 | Database (Unix socket in production) |
| **Cloud Storage** | `pyplots-images` | Preview images (GCS bucket) |
| **Secret Manager** | `DATABASE_URL` | Secure credential storage |
| **Cloud Build** | Triggers | Auto-deploy on push to main |
| **Cloud SQL** | PostgreSQL 18 | Database (Unix socket in production) |
| **Cloud Storage** | `pyplots-images` | Preview images (GCS bucket) |
| **Secret Manager** | `DATABASE_URL` | Secure credential storage |
| **Cloud Build** | Triggers | Auto-deploy on push to main |

Automatic deployment on push to `main`:
- `api/**`, `core/**`, `pyproject.toml` changes → Backend redeploy
Expand Down
14 changes: 14 additions & 0 deletions api/routers/seo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ async def get_sitemap(db: AsyncSession | None = Depends(optional_db)):
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
" <url><loc>https://pyplots.ai/</loc></url>",
" <url><loc>https://pyplots.ai/catalog</loc></url>",
" <url><loc>https://pyplots.ai/legal</loc></url>",
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The addition of the legal page URL to the sitemap lacks test coverage. The existing tests in tests/unit/api/test_routers.py (test_sitemap_structure and test_sitemap_with_db methods) should be updated to verify that the sitemap includes the legal page URL.

Copilot uses AI. Check for mistakes.
]

# Add spec URLs (overview + all implementations)
Expand Down Expand Up @@ -131,6 +132,19 @@ async def seo_catalog():
)


@router.get("/seo-proxy/legal")
async def seo_legal():
"""Bot-optimized legal page with correct og:tags."""
return HTMLResponse(
BOT_HTML_TEMPLATE.format(
title="Legal | pyplots.ai",
description="Legal notice, privacy policy, and transparency information for pyplots.ai",
image=DEFAULT_HOME_IMAGE,
url="https://pyplots.ai/legal",
)
)
Comment on lines +135 to +145
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The new seo_legal endpoint lacks test coverage. Based on the existing test patterns in tests/unit/api/test_routers.py (TestSeoProxyRouter class), this endpoint should have a unit test to verify it returns the correct HTML response with proper og:tags for the legal page.

Copilot uses AI. Check for mistakes.


@router.get("/seo-proxy/{spec_id}")
async def seo_spec_overview(spec_id: str, db: AsyncSession | None = Depends(optional_db)):
"""Bot-optimized spec overview page with collage og:image."""
Expand Down
14 changes: 14 additions & 0 deletions app/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Box from '@mui/material/Box';
import Link from '@mui/material/Link';
import { Link as RouterLink } from 'react-router-dom';
import { GITHUB_URL } from '../constants';

interface FooterProps {
Expand Down Expand Up @@ -63,6 +64,19 @@ export function Footer({ onTrackEvent, selectedSpec, selectedLibrary }: FooterPr
>
stats
</Link>
<span>·</span>
<Link
component={RouterLink}
to="/legal"
onClick={() => onTrackEvent?.('internal_link', { destination: 'legal', spec: selectedSpec, library: selectedLibrary })}
sx={{
color: '#9ca3af',
textDecoration: 'none',
'&:hover': { color: '#6b7280' },
}}
>
legal
</Link>
Comment on lines +68 to +79
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The new legal link in the footer is missing an onClick handler for analytics tracking. The other footer links (linkedin, github, stats) all have onClick handlers that call onTrackEvent. For consistency and to track user navigation to the legal page from the footer, consider adding an onClick handler similar to the pattern used for external links.

Copilot uses AI. Check for mistakes.
</Box>
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion app/src/hooks/useUrlSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { useEffect } from 'react';

import type { FilterCategory, ActiveFilters } from '../types';
import type { ActiveFilters } from '../types';
import { FILTER_CATEGORIES } from '../types';

/**
Expand Down
Loading
Loading