Skip to content

Restore missing template contracts that broke build-and-test assertions - #1

Draft
jerry-kay19 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-and-test-job
Draft

jerry-kay19 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-and-test-job

Conversation

Copilot AI commented Oct 12, 2026 •

Copy link
Copy Markdown

The build-and-test workflow was failing because recent template changes removed HTML/meta contracts relied on by server-render tests (homepage landmarks, OG/Twitter metadata, accessibility attributes, and share/toast hooks). This PR restores those contracts with minimal template-only changes.

  • Metadata contract restoration (base.html)

    • Reintroduced Open Graph and Twitter card tags at the shared layout level.
    • Added robust URL construction via config.BASE_URL with request-root fallback to avoid context-dependent template failures.
  • Homepage DOM contract restoration (index.html)

    • Restored required IDs for saved-project UI:
      • saved-projects-panel
      • saved-projects-list
      • saved-projects-count
    • Restored initial hidden state expected by tests:
      • id="results-section" + inline style="display:none;"
    • Restored progressbar accessibility attributes:
      • role="progressbar"
      • aria-valuemin="0", aria-valuemax="100", aria-valuenow="0"
  • Project detail/share contract restoration (project.html)

    • Reintroduced id="share-toast" placeholder used by share-related tests and UI hooks.
  • Explore/profile compatibility adjustments

    • explore.html: normalized project card wrapper to include the exact project-card class shape expected by pagination render assertions.
    • profile.html: removed deprecated section copy/signatures while keeping an explicit Account Management section.
{% set base_url = (config.BASE_URL | default(request.url_root.rstrip('/'), true)) %}
<meta property="og:image" content="{{ base_url.rstrip('/') }}/static/og-banner.png" />
<meta property="og:url" content="{{ base_url.rstrip('/') }}{{ request.path }}" />

Co-authored-by: jerry-kay19 <260964975+jerry-kay19@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'build-and-test' Restore missing template contracts that broke build-and-test assertions Oct 12, 2026
Copilot AI requested a review from jerry-kay19 October 12, 2026 12:21
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.

2 participants