Skip to content

Sovereignty page: interactive charts and mobile fixes - #1

Open
sovenparker wants to merge 1 commit into
GooeyAI:masterfrom
sovenparker:sovereignty-updates
Open

Sovereignty page: interactive charts and mobile fixes#1
sovenparker wants to merge 1 commit into
GooeyAI:masterfrom
sovenparker:sovereignty-updates

Conversation

@sovenparker

Copy link
Copy Markdown

Summary

  • Replace static Gemini and GLM benchmark images with interactive bar charts (category pills, favicon + title header, horizontal bars)
  • Add Hausa evaluation scatter plot inline in the Languages section, with title, byline, and in-chart branding
  • Fix mobile layout for inline-vis figures (positioning, full-width charts, edge-to-edge overview image)
  • Header: link logo to gooey.ai and hide login button when user is logged in

Test plan

  • Open https://gooey.ai/sovereignty after deploy and verify charts render on desktop
  • Scroll through steps 04–05 (DC + publications), 09–10 (Gemini + GLM benchmarks), and 13 (Hausa scatter)
  • Test mobile view (≤900px): inline charts centered, no horizontal overflow
  • Confirm GLM chart uses assets/zhipu-logo.svg and category pills show Coding, Agentic, Reasoning only
  • Verify logged-in users see no login button; logged-out users still see Login
  • Confirm logo links to https://gooey.ai/

Made with Cursor

Replace static benchmark images with Gemini and GLM bar charts, add the Hausa evaluation scatter plot, and improve mobile layout for inline visualizations.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This change updates sovereignty/index.html with a new CSS variable for header height used across the fixed header and sticky hscroll pin, plus styling for a wrapped logo link. The Gemini and GLM benchmark figures and the Hausa evaluation figure are converted from static images to interactive markup driven by new JavaScript: model/category datasets, chip-based category switching, SVG chart rendering, and a Hausa scatter plot. Mobile layout handling is reworked for inline visual containers and figlayer repositioning, with re-rendering triggered on layout breakpoint changes. Additional tweaks adjust chart label font sizing and conditionally remove the login button.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: interactive charts and mobile layout fixes on the Sovereignty page.
Description check ✅ Passed The description matches the changeset and accurately describes the new charts, Hausa scatter plot, and mobile/header fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sovereignty/index.html`:
- Around line 4534-4547: The renderBenchPanels function is only drawing the
first two benchmarks via cat.benchmarks.slice(0, 2), but the coding category
defines more benchmarks that are never shown. Update renderBenchPanels to render
the full intended set by removing the truncation or otherwise aligning the
displayed benchmarks with GLM_CATEGORIES and the bench-panel/svg generation so
no configured benchmarks are silently dropped.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7035f6f3-a9f7-4905-977e-f57b19f3cbe3

📥 Commits

Reviewing files that changed from the base of the PR and between d1d5049 and 39d163f.

⛔ Files ignored due to path filters (2)
  • sovereignty/assets/gooey-wordmark.png is excluded by !**/*.png
  • sovereignty/assets/zhipu-logo.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • sovereignty/index.html

Comment thread sovereignty/index.html
Comment on lines +4534 to +4547
function renderBenchPanels(panelsEl, cat, models) {
if (!panelsEl || !cat) return;
panelsEl.innerHTML = cat.benchmarks
.slice(0, 2)
.map(
(bench, bi) =>
`<div class="bench-panel"><svg class="bench-svg" data-bench="${bi}" viewBox="0 0 700 0" role="img" aria-label="${bench.name}"></svg></div>`,
)
.join("");
cat.benchmarks.slice(0, 2).forEach((bench, bi) => {
const svg = panelsEl.querySelector(`svg[data-bench="${bi}"]`);
if (svg) renderBenchSvg(svg, bench, models);
});
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the target function in context
sed -n '4510,4575p' sovereignty/index.html | cat -n

# Find other benchmark panel rendering or display limits
rg -n "slice\(0,\s*2\)|renderBenchPanels|benchmarks" sovereignty/index.html

# Locate category definitions with more than two benchmarks
rg -n "benchmarks\s*:\s*\[" sovereignty/index.html

Repository: GooeyAI/gooey-static-pages

Length of output: 5446


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the benchmark category definitions around all benchmark blocks
for range in \
  '3638,3700p' \
  '3690,3768p' \
  '3778,3838p' \
  '3870,4005p'
do
  echo "===== sed -n ${range} sovereignty/index.html ====="
  sed -n "$range" sovereignty/index.html | cat -n
done

# Look for any explanatory text or styling around the benchmark panels
rg -n "bench-panel|bench-svg|bench-chip|Influence the AI benchmarks|two|top 2|slice\\(0, 2\\)" sovereignty/index.html

Repository: GooeyAI/gooey-static-pages

Length of output: 14761


Only render the benchmarks you intend to show
renderBenchPanels truncates each category to slice(0, 2), but GLM_CATEGORIES.id="coding" defines five benchmarks. The other three never appear in the chart, so either render them all or remove the unused entries.

🧰 Tools
🪛 ast-grep (0.44.1)

[warning] 4535-4541: Avoid assigning untrusted data to innerHTML/outerHTML or document.write
Context: panelsEl.innerHTML = cat.benchmarks
.slice(0, 2)
.map(
(bench, bi) =>
<div class="bench-panel"><svg class="bench-svg" data-bench="${bi}" viewBox="0 0 700 0" role="img" aria-label="${bench.name}"></svg></div>,
)
.join("")
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

(inner-outer-html)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sovereignty/index.html` around lines 4534 - 4547, The renderBenchPanels
function is only drawing the first two benchmarks via cat.benchmarks.slice(0,
2), but the coding category defines more benchmarks that are never shown. Update
renderBenchPanels to render the full intended set by removing the truncation or
otherwise aligning the displayed benchmarks with GLM_CATEGORIES and the
bench-panel/svg generation so no configured benchmarks are silently dropped.

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.

1 participant