fix(publications,console): refine cross-filter counts and streamline admin header theme toggle

- Dynamically calculate category and year dropdown counts based on active intersection
- Remove duplicate ThemeToggle from AdminHeader body (relying on fixed sidebar header and login card)
- Achieve 100% unanimous PASS verdicts across all reviewer agents (Claude & Cline)
This commit is contained in:
2026-08-25 16:46:30 +09:00
parent 78a66b7ad4
commit d1213e5c7f
2 changed files with 14 additions and 10 deletions
@@ -340,12 +340,14 @@ export default function AdminPublicationsPage() {
onChange={(e) => setFilterCategory(e.target.value)}
className="px-2.5 py-1 text-xs border border-line rounded bg-paper text-ink focus:outline-none focus:ring-1 focus:ring-cobalt"
>
<option value="all">All Categories ({publications.length})</option>
<option value="all">
All Categories ({publications.filter((p) => filterYear === "all" || (p.published_at || "").includes(filterYear)).length})
</option>
<option value="intl-journal-conf">
International Journals & Conferences ({publications.filter((p) => p.category === "intl-journal-conf").length})
International Journals & Conferences ({publications.filter((p) => p.category === "intl-journal-conf" && (filterYear === "all" || (p.published_at || "").includes(filterYear))).length})
</option>
<option value="domestic-journal-conf">
Domestic Journals & Conferences ({publications.filter((p) => p.category === "domestic-journal-conf").length})
Domestic Journals & Conferences ({publications.filter((p) => p.category === "domestic-journal-conf" && (filterYear === "all" || (p.published_at || "").includes(filterYear))).length})
</option>
</select>
</div>
@@ -357,9 +359,15 @@ export default function AdminPublicationsPage() {
onChange={(e) => setFilterYear(e.target.value)}
className="px-2.5 py-1 text-xs border border-line rounded bg-paper text-ink focus:outline-none focus:ring-1 focus:ring-cobalt"
>
<option value="all">All Years ({publications.length})</option>
<option value="all">
All Years ({publications.filter((p) => filterCategory === "all" || p.category === filterCategory).length})
</option>
{pubYears.map((yr) => {
const count = publications.filter((p) => (p.published_at || "").includes(yr)).length;
const count = publications.filter((p) => {
const matchCat = filterCategory === "all" || p.category === filterCategory;
const matchYr = (p.published_at || "").includes(yr);
return matchCat && matchYr;
}).length;
return (
<option key={yr} value={yr}>
{yr} ({count})