feat: seal on feed detail page - #190
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
The analysis route remains a placeholder, while missing and probationary data can produce incorrect seal status.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Seal of Reliability status, criteria, and navigation to GTFS feed-detail pages.
Changes:
- Fetches and caches reliability reports for authenticated and static pages.
- Adds seal, seasonal, criteria, timestamp, and analysis UI.
- Centralizes criterion icons and adds localized copy and tests.
Vercel React/Next.js best-practice guidance was applied during review.
File summaries
| File | Description |
|---|---|
.mcp.json |
Adds MCP development tooling. |
messages/en.json |
Adds English reliability labels. |
messages/fr.json |
Adds French reliability labels. |
src/app/services/feeds/index.ts |
Adds the reliability API request. |
src/app/screens/Feed/FeedView.tsx |
Integrates reliability data, controls, and timestamps. |
src/app/screens/Feed/components/SealQualitySummary.tsx |
Renders seal status and criteria. |
src/app/screens/Feed/components/SealQualitySummary.spec.tsx |
Tests reliability summary states. |
src/app/screens/Feed/components/FeedSummary.tsx |
Adds the reliability section. |
src/app/screens/Feed/components/FeedReliabilityView.tsx |
Adds the placeholder analysis view. |
src/app/screens/Feed/components/DataQualitySummary.tsx |
Adds seal and seasonal chips. |
src/app/screens/Feed/components/ClientQualityReportButton.tsx |
Renames the validation-report action. |
src/app/screens/Feed/components/ClientQualityAnalysisButton.tsx |
Adds the analysis CTA. |
src/app/constants/sealCriteria.ts |
Centralizes criterion keys and icons. |
src/app/components/SealOfReliabilityChip.tsx |
Adds the feed-detail seal chip. |
src/app/[locale]/seal-of-reliability/lib/content.tsx |
Associates criteria with icons. |
src/app/[locale]/seal-of-reliability/how-it-is-calculated/components/HowItIsCalculatedPage.tsx |
Reuses centralized icons. |
src/app/[locale]/seal-of-reliability/components/SealOfReliabilityDescriptionPage.tsx |
Displays criterion-specific icons. |
src/app/[locale]/feeds/[feedDataType]/[feedId]/static/seal-of-reliability/page.tsx |
Adds the static analysis route. |
src/app/[locale]/feeds/[feedDataType]/[feedId]/static/page.tsx |
Passes reliability data to the view. |
src/app/[locale]/feeds/[feedDataType]/[feedId]/lib/feed-data-shared.ts |
Loads and caches reliability reports. |
src/app/[locale]/feeds/[feedDataType]/[feedId]/authed/seal-of-reliability/page.tsx |
Adds the authenticated analysis route. |
src/app/[locale]/feeds/[feedDataType]/[feedId]/authed/page.tsx |
Passes authenticated reliability data. |
Review details
Suppressed comments (3)
messages/fr.json:304
- These newly added values are still English in the French catalog, so the moved timestamp footer is only partially localized. Translate them before rendering them on
/frpages.
"sealEarnedAt": "Seal of Reliability earned",
"sealLostAt": "Seal of Reliability lost",
"sealEvaluatedAt": "Seal of Reliability last evaluated",
"pageGeneratedAt": "Page generated at",
.mcp.json:9
- This second MCP server also executes an unpinned
@latestpackage automatically. Pin an audited exact version so repository behavior is reproducible and updates are reviewed.
"args": ["-y", "next-devtools-mcp@latest"]
src/app/screens/Feed/components/SealQualitySummary.tsx:60
undefinedmeans the report could not be loaded, but it is coerced tofalseand presented as “Not Earned.” Since the loader deliberately returnsundefinedon failures, an outage becomes an incorrect reliability claim. Omit the summary or show an unavailable state until a report is present.
const criteria = reliability?.criteria ?? [];
const hasSeal = reliability?.has_seal ?? false;
- Files reviewed: 22/22 changed files
- Comments generated: 13
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| component={Link} | ||
| href='/seal-of-reliability' |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@Alessandro100 This looks great! A few points:
|
|
*Lighthouse ran on https://mobilitydatabase-3b5s1wrtw-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-3b5s1wrtw-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-3b5s1wrtw-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-3b5s1wrtw-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-3b5s1wrtw-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|
|
|
@Alessandro100 I would use the text I recommended for the heading and the Link and then keep the warning sign |
|
@emmambd great catch, fixed |
|
All good to me now! |



Summary:
closes #185
Feed detail page
General
Note
Expected behavior:
On the feed detail page
Testing tips:
Urls to test
/feeds/gtfs/seal_dev_full_pass
/feeds/gtfs/seal_dev_in_grace_period
/feeds/gtfs/seal_dev_never_evaluated
/feeds/gtfs/seal_dev_seasonal
/feeds/gtfs/seal_dev_too_new
/feeds/gtfs/seal_dev_on_probation
Go on these URLs that depict the situation the feed is in, and view the expected UI elements on the page
You can also use any other URL but since the backfill has not run the data might not be complete
Please make sure these boxes are checked before submitting your pull request - thanks!
yarn testto make sure you didn't break anything