Strip duplicate page nav + add AI emotions sub-tab to /mirror

#6
by ArthurZ HF Staff - opened
SlyFox org

Two fixes

1. Duplicate top-bar nav removed

All 7 standalone pages (cards, arena, buddy, mirror, quests, mood-ci, marketplace) had their body <header> block stripped. The friend's outer shell already provides the global top bar; the page-level nav was duplicating it.

Confirmed with grep: zero <header> tags in any of the 7 files now.

2. /mirror gets an "AI emotions" sub-tab

A sub-tab strip at the top of the page lets you flip between:

  • Buddy mirror (existing): dual-orb (you vs buddy) + divergence meter in the corner of the terminal
  • AI emotions (new): bottom bar across the terminal showing the model's top-5 active emotions per turn, as live bars with cosine values

Header reads live . ai emotions . open weights with a pulsing green dot, plus model name + layer (gemma-2-2b-it . layer 22/26 . turn N). The fun framing - only possible with open weights - is in the badge and explainer card below.

The per-turn emotion arrays are seeded from the real Arthur persona data we generated (afraid +0.079, angry +0.061, hostile +0.058 on frustration spikes; confident +0.077, calm +0.064 on recovery). When the swap to live parquet happens, the JS just reads scores_json from each row instead of the hardcoded array - same shape, same render path.

Why a new PR

These changes were pushed to refs/pr/5 after PR #5 was merged, so they didn't land. Reopening from current main HEAD (06d6d54a).

ArthurZ changed pull request status to open
ArthurZ changed pull request status to merged

Sign up or log in to comment