Fix sync status page: community-aware, all sync types, N/A display#213
Merged
neuromechanist merged 3 commits intodevelopfrom Feb 18, 2026
Merged
Conversation
Fixes #212 - Fix Papers Sync showing N/A: sync_metadata stores source names like "openalex:query", not "openalex", so use prefix matching to find the most recent timestamp for each source type - Make /sync/status community-aware: accept community_id query param and query the correct community database (previously always used hed default) - Add all sync types to response: new 'syncs' field includes github, papers, docstrings, mailman, beps, faq with last_sync and next_run - Dashboard: pass community_id to sync status fetch, render all sync types dynamically including next scheduled run time
- Validate community_id against registry (404 for unknown) - Update /sync/health to accept community_id param - Fix formatRelativeTime to handle future timestamps (next_run) - Use _parse_iso_datetime in _get_most_recent_sync for robust comparison - Fix misleading citing_doi comment in papers source lookup - Add exc_info=True to warning log calls for full tracebacks - Add tests: prefix matching regression, syncs field, unknown community 404
Contributor
Dashboard Preview
This preview will be updated automatically when you push new commits. |
neuromechanist
added a commit
that referenced
this pull request
Feb 18, 2026
* Add OG meta tags to demo and dashboard pages Add Open Graph and Twitter Card meta tags so sharing links on Slack, Discord, Twitter, etc. shows a proper preview card with the OSA branding image from osc.earth. * Add OSA logo, dark mode, and branded footer - Inline SVG OSA logo in header (uses currentColor for dark mode compatibility) - Dark mode CSS via prefers-color-scheme on demo page - Footer with dynamic year, heart, and OSC link - Consistent deep blue color palette across both pages * Reorder footer: copyright holder first, then made with love * Fix review issues: dark mode, meta tags, broken links - Add dark mode to dashboard (matching frontend theme) - Add <meta name="description"> to both pages for SEO - Remove redundant twitter:title/description/image tags - Fix broken GitHub links (osc-em -> OpenScience-Collective) - Standardize org name to "OpenScience Collective" - Move dashboard inline styles to CSS classes - Rename .footer to .site-footer for consistency * Enforce mandatory HED tag validation before display (#211) * Enforce mandatory HED tag validation before display Fixes #210 * Address review: consistent error handling, sanitize exceptions * Fix sync status page: community-aware, all sync types, N/A display (#213) * Fix sync status page: N/A display, all sync types, community-aware Fixes #212 - Fix Papers Sync showing N/A: sync_metadata stores source names like "openalex:query", not "openalex", so use prefix matching to find the most recent timestamp for each source type - Make /sync/status community-aware: accept community_id query param and query the correct community database (previously always used hed default) - Add all sync types to response: new 'syncs' field includes github, papers, docstrings, mailman, beps, faq with last_sync and next_run - Dashboard: pass community_id to sync status fetch, render all sync types dynamically including next scheduled run time * Address review findings: validation, future times, health endpoint - Validate community_id against registry (404 for unknown) - Update /sync/health to accept community_id param - Fix formatRelativeTime to handle future timestamps (next_run) - Use _parse_iso_datetime in _get_most_recent_sync for robust comparison - Fix misleading citing_doi comment in papers source lookup - Add exc_info=True to warning log calls for full tracebacks - Add tests: prefix matching regression, syncs field, unknown community 404 * Fix test: add isolated_db fixture to community_id test * Bump version to 0.6.7.dev0 * Address PR review findings - Fix papers last_sync timestamp comparison: use _parse_iso_datetime instead of string max() to avoid wrong result with mixed UTC offsets - Fix dashboard /sync/health URL: pass community_id param so health badge reflects the viewed community, not always 'hed' - Add tests for /sync/health community_id param: 404 for unknown, 200 for known community * Fix logging: add exc_info and upgrade scheduler warning to error - Add exc_info=True to trigger_sync error log for full tracebacks - Upgrade scheduler job inspection failure from warning to error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #212
Summary
_get_sync_metadatalooked for source names like"openalex"but the DB stores"openalex:query_name". Fixed with prefix matching./sync/statusand/sync/healthnow accept?community_id=Xand query the correct per-community database. Unknown IDs return 404.syncsfield in response includes all configured sync types (github, papers, docstrings, mailman, beps, faq) withlast_syncandnext_runtimestamps.community_idto sync status fetch;renderSyncInforenders all sync types dynamically with "next run" info. FixedformatRelativeTimeto correctly display future timestamps (e.g., "6 days from now" instead of "Less than 1 hour ago").Changes
src/api/routers/sync.py: community_id param + registry validation, prefix matching for papers, all sync types in response,/healthendpoint updated,_get_most_recent_syncuses_parse_iso_datetime,exc_info=Trueon warningsdashboard/osa/index.html: community_id in sync fetch, dynamic sync type rendering, future timestamp supporttests/test_api/test_sync.py: regression test for prefix matching bug, syncs field presence, unknown community 404Test plan