Summary
Every recently-viewed entry is recorded with the interest "General" because project.html never emits the data-project-interest attribute that script.js looks for. The "Recently Viewed" panel (recently-viewed.js) then displays a meaningless "General" chip on every card instead of the project's actual interest (e.g., "Web", "Data", "Cybersecurity").
Evidence
src/static/script.js:1161-1166 (project page view tracking):
if (typeof RecentlyViewed !== "undefined") {
var projectInterest = document.querySelector("[data-project-interest]");
var interest = projectInterest ? projectInterest.getAttribute("data-project-interest") : "General";
RecentlyViewed.trackView({
id: ...,
title: ...,
interest: interest
});
}
- A repo-wide search for
data-project-interest returns zero matches in src/templates/project.html (and anywhere else), so projectInterest is always null and interest is always "General".
src/static/recently-viewed.js:107-112 stores that value (interest: project.interest || "General") and renders it at line 182 (interest.textContent = project.interest).
Impact
- The recently-viewed panel shows a useless constant "General" label instead of the actual interest category, degrading the feature's purpose (quickly recognizing what kind of projects you were looking at).
- The project detail page already knows the interest (
Project.interest is rendered elsewhere on the page), so the data is available — it's just never wired to this attribute.
Suggested Fix
Add data-project-interest="{{ project.interest }}" to the appropriate element in src/templates/project.html (e.g., the <body> or a wrapper section), so the view tracker captures the real interest. Update the tracker to fall back to the project's own metadata rather than a hardcoded string.
Summary
Every recently-viewed entry is recorded with the interest "General" because
project.htmlnever emits thedata-project-interestattribute thatscript.jslooks for. The "Recently Viewed" panel (recently-viewed.js) then displays a meaningless "General" chip on every card instead of the project's actual interest (e.g., "Web", "Data", "Cybersecurity").Evidence
src/static/script.js:1161-1166(project page view tracking):data-project-interestreturns zero matches insrc/templates/project.html(and anywhere else), soprojectInterestis alwaysnullandinterestis always"General".src/static/recently-viewed.js:107-112stores that value (interest: project.interest || "General") and renders it at line 182 (interest.textContent = project.interest).Impact
Project.interestis rendered elsewhere on the page), so the data is available — it's just never wired to this attribute.Suggested Fix
Add
data-project-interest="{{ project.interest }}"to the appropriate element insrc/templates/project.html(e.g., the<body>or a wrapper section), so the view tracker captures the real interest. Update the tracker to fall back to the project's own metadata rather than a hardcoded string.