feat: implement code city apocalypse dashboard#33
Conversation
- Refactor frontend for apocalypse theme with custom CSS and scanlines. - Improve success detection logic in `is_event_success`. - Add 'System Logs' tab for real-time terminal telemetry. - Update leaderboard to include all active models, even those with zero successes. - Rename 'Sectors Compromised' to 'Sectors Secured' for better clarity. - Remove unused playwright dependency from project. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request introduces several enhancements to the frontend, including a new "System Logs" tab, styling updates for successful cards in the digital bestiary, and improved logic for calculating apocalypse metrics to include models with zero successes. The review feedback highlights two important issues with pandas DataFrame handling: first, potential NaN values in model_display could incorrectly appear on the leaderboard, which can be resolved by applying .dropna(); second, using .get() on a pandas Series row returns NaN rather than the fallback default string for missing values, which should be handled using pd.notna() to avoid rendering **nan** in the UI.
| model = row.get("model_display", "UNKNOWN_AGENT") | ||
| challenge = row.get("challenge", "UNKNOWN_SECTOR") | ||
| is_success = row.get("is_success", False) |
There was a problem hiding this comment.
When iterating over a pandas DataFrame using iterrows(), each row is represented as a pd.Series. Calling row.get("model_display", "UNKNOWN_AGENT") will return NaN (a float) if the column exists but the value is null/missing, rather than falling back to the default string. This causes the UI to render **nan** instead of the fallback placeholder.
Using pd.notna() checks ensures that missing values are correctly replaced with the intended fallback strings.
model_val = row.get("model_display")
model = model_val if pd.notna(model_val) and model_val != "" else "UNKNOWN_AGENT"
challenge_val = row.get("challenge")
challenge = challenge_val if pd.notna(challenge_val) and challenge_val != "" else "UNKNOWN_SECTOR"
is_success_val = row.get("is_success")
is_success = bool(is_success_val) if pd.notna(is_success_val) else FalseCo-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: BleakNarratives <bleaknarratives@gmail.com>
This PR transforms the AIRTBench frontend into a thematic 'Code City Apocalypse' dashboard.
Key changes:
PR created automatically by Jules for task 7778644714997318215 started by @BleakNarratives