Skip to content

feat(hive): rename agents to Frames, remove Health Checks, expand work display#926

Open
castrojo wants to merge 4 commits into
projectbluefin:mainfrom
castrojo:feat/hive-frames-destiny
Open

feat(hive): rename agents to Frames, remove Health Checks, expand work display#926
castrojo wants to merge 4 commits into
projectbluefin:mainfrom
castrojo:feat/hive-frames-destiny

Conversation

@castrojo

@castrojo castrojo commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the agent layer to Frames (Destiny lore), removes the broken Health Checks panel, and makes Formation Log / Frame of the Day / Frame Formation show real project work instead of short snippets.

Changes

Frames + quotes

  • AgentCardFrameCard: shows up to 5 summary lines (was 2), or top 3 advisory work items; idle Frames show a verbatim in-game Destiny quote
  • AgentOfDayFrameOfDay: shows 10 summary lines + up to 5 advisory work items + a quote
  • Formation Log: expanded to 15 lines with show-more/less toggle; supervisor Frame gets a quote
  • What Frames Are Doing: now shows 5 full lines per Frame instead of a single truncated snippet
  • All panel titles updated: Agent FormationFrame Formation, Agents stat → Frames, etc.
  • Verbatim Destiny Frame quotes from Destinypedia, split into working/idle pools, hash-selected by Frame ID for stable assignment

Health Checks removed

  • Removed HealthPanel component, healthTone function, and hasHealth variable — panel was broken

Factory Contributors

  • Added centralized isBotLogin() helper (covers [bot], renovate, dependabot, github-actions, etc.)
  • Bots filtered from ContributorWall and ContributorLeaderboard
  • Metric changed from commits to repos active in — sorted by repo count desc, commits as tiebreaker
  • Removed bot PR chip from ContributorWall

Code cleanup

  • Removed unused firstMeaningfulLines function
  • Added .frameQuote and .frameAdvisoryItem CSS classes

Validation

  • npm run typecheck
  • npm run lint ✅ (no errors)

Summary by CodeRabbit

  • New Features

    • Redesigned Hive Factory Dashboard with "Frame" focus, replacing the previous AI Agent model.
    • Added tabbed Contributor Leaderboard displaying all-time, monthly, and weekly statistics with commit deltas and per-repo tracking.
    • Extended hive history window to approximately 6 months with daily contributor statistics tracking.
  • Documentation

    • Updated documentation with Hive Factory Dashboard architecture and implementation details.

castrojo added 3 commits June 3, 2026 16:35
Add full contributor leaderboard to the Bluefin Operating System Factory
dashboard with:

- Three tabs: All Time / This Month / This Week
- Top 25 contributors per tab with rank, avatar, commit count, active
  repos and milestone badges
- Milestone tiers: Contributor (10+), Veteran (100+), Elite (500+),
  Legend (1000+), Mythic (5000+) all-time commits
- Activity badges: Sprint (10+ this week), Rising (trending up vs
  4-week avg), Multi-repo (active in 3+ repos)
- Delta indicator showing change vs rolling average for weekly/monthly tabs
- Graceful fallback to all-time data when weekly stats are still
  accumulating, with note for users
- Mobile responsive: repo chips and badges hidden on small screens

Data pipeline (fetch-hive-history.js):
- New fetchContributorWeeklyStats() function using GitHub
  /stats/contributors endpoint (52-week per-contributor history)
- Computes lastWeek, lastMonth, last3Months windows
- 202-retry logic (GitHub computes stats async on cold cache)
- Separate 24h TTL from all-time counts (more expensive endpoint)
- New contributorStats and lastWeeklyStatsFetch fields in history schema

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Add comprehensive Hive Factory Dashboard section covering:
- Data sources (snapshot HTML, queue API, GitHub API, hive-history.json)
- All dashboard panels and their data sources
- Contributor Leaderboard design, badge tiers, fallback behavior
- hive-history.json schema including contributorStats fields
- 15 tracked factory repos
- Theme color constants
- Instructions for adding new panels
- update-hive-cache.yml CI workflow documentation

Also: add HiveFactoryDashboard to the Components table, add
update-hive-cache.yml workflow entry in CI/CD section.

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
…k display

- Rename AgentCard → FrameCard with verbatim Destiny Frame quotes (Destinypedia)
- Rename AgentOfDay → FrameOfDay, show 10 lines + 5 work items + quote
- FormationLog: expand to 15 lines with show more/less toggle + quote
- FrameCard: show 5 summary lines or top 3 advisory items per Frame
- What Agents/Frames Are Doing: show 5 full lines per Frame (not snippet)
- Remove broken Health Checks panel (HealthPanel, healthTone, hasHealth)
- Rename stat card 'Agents' → 'Frames', panel titles updated throughout
- ContributorWall: filter bots via centralized isBotLogin(), metric changed
  from commits to 'repos active in', sorted by repos count desc
- ContributorLeaderboard: filter bots from allLogins set
- Add FRAME_QUOTES_WORKING/IDLE arrays with verbatim in-game dialogue
- Add isBotLogin() helper, pickFrameQuote() hash-based selection
- Add .frameQuote and .frameAdvisoryItem CSS classes
- Remove unused firstMeaningfulLines function

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR renames the Hive dashboard from "Agent" to "Frame" terminology, adds a tabbed ContributorLeaderboard component with milestone badges and weekly/monthly deltas, extends fetch-hive-history.js to fetch and cache weekly contributor stats from the GitHub API, and documents the full dashboard architecture in AGENTS.md.

Changes

Hive Dashboard Overhaul

Layer / File(s) Summary
History schema, constants, and TypeScript types
scripts/fetch-hive-history.js, src/components/HiveFactoryDashboard.tsx
Extends the hive-history.json schema comment and default object with contributorStats/lastWeeklyStatsFetch fields, bumps MAX_ENTRIES, adds daily TTL constants, and adds matching TypeScript types (ContributorStat, MilestoneTier, MilestoneBadge) plus computeMilestones() in the dashboard.
Weekly contributor stats fetch logic
scripts/fetch-hive-history.js
Adds fetchContributorWeeklyStats() with per-repo /stats/contributors queries, 202-retry with backoff, bot filtering, and lastWeek/lastMonth/last3Months aggregation into byRepo. Wires both all-time and weekly refreshes into main() with daily TTL skip guards.
Frame helpers: isBotLogin, pickFrameQuote, parser cleanup
src/components/HiveFactoryDashboard.tsx
Adds isBotLogin() multi-heuristic bot detection, frame-dialogue quote constants, and pickFrameQuote(). Removes HiveHealthEntry type, firstMeaningfulLines(), and healthTone(). Updates parseMergedPRs() to use isBotLogin().
FrameCard, FrameOfDay, and FormationLog UI rework
src/components/HiveFactoryDashboard.tsx, src/components/HiveFactoryDashboard.module.css
Replaces agent-card summary logic with FrameCard using meaningfulSummaryLines(), deterministic quotes, and advisory-priority rendering. Replaces AgentOfDay with FrameOfDay (expandable summary, advisory list). Makes FormationLog expandable with timestamps and optional frame quote. Adds .frameQuote/.frameAdvisoryItem CSS classes.
ContributorWall update and ContributorLeaderboard component
src/components/HiveFactoryDashboard.tsx, src/components/HiveFactoryDashboard.module.css
Rewrites ContributorWall to derive contributors from contributorsByRepo with bot filtering and repo-count chips. Adds ContributorLeaderboard (tabbed alltime/monthly/weekly, top-25 table, milestone badges, delta indicators) with full leaderboard CSS module.
Main render wiring and section renames
src/components/HiveFactoryDashboard.tsx
Wires ContributorLeaderboard and FrameOfDay into the render tree. Memoizes advisoriesByAgent. Renames all "Agent" headings/labels to "Frame". Removes HealthPanel and hasHealth. Updates Layout description strings and stats-strip label.
AGENTS.md documentation
AGENTS.md
Documents the update-hive-cache.yml workflow, adds HiveFactoryDashboard.tsx to the components table, and fully describes the Hive Factory Dashboard: data sources, panel mappings, hive-history.json schema, tracked repos, theme constants, new-panel checklist, CSP allowlist, and pipeline constraints.

Sequence Diagram(s)

sequenceDiagram
  participant Scheduler as GitHub Actions Scheduler
  participant Script as fetch-hive-history.js
  participant GH as GitHub API
  participant Store as hive-history.json

  Scheduler->>Script: trigger daily
  Script->>Store: loadHistory()
  Store-->>Script: existing history + timestamps
  Script->>Script: check lastContributorFetch vs CONTRIBUTOR_TTL_MS
  alt all-time stats stale
    Script->>GH: GET /repos/:repo/contributors
    GH-->>Script: contributor list
    Script->>Store: update contributors / contributorsByRepo
  end
  Script->>Script: check lastWeeklyStatsFetch vs WEEKLY_STATS_TTL_MS
  alt weekly stats stale
    loop per factory repo
      Script->>GH: GET /stats/contributors
      alt 202 computing
        Script->>GH: retry up to 3× with backoff
      end
      GH-->>Script: weekly commit arrays
    end
    Script->>Script: filter bots, aggregate lastWeek/lastMonth/last3Months/byRepo
    Script->>Store: update contributorStats / lastWeeklyStatsFetch
  end
  Script->>Store: saveHistory()

  Note over Store: hive-history.json committed to repo

  participant Browser as Browser /hive/
  participant Dashboard as HiveFactoryDashboard.tsx

  Browser->>Dashboard: load page
  Dashboard->>Store: fetch hive-history.json (static)
  Dashboard->>GH: fetch snapshot HTML + queue API
  Dashboard->>Dashboard: parse contributorStats → ContributorLeaderboard
  Dashboard->>Dashboard: computeMilestones() → MilestoneBadge[]
  Dashboard->>Browser: render FrameCards, FrameOfDay, ContributorLeaderboard
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • projectbluefin/documentation#930: Directly overlaps with changes to HiveFactoryDashboard.tsx and HiveFactoryDashboard.module.css around the Contributor Leaderboard's handling of pending/accumulating weekly stats states.

Poem

🐇 Hop hop, the Frames have arrived today,
No more "Agents" — the Hive rebrands its way!
Weekly stats fetched with retries and care,
Leaderboard badges shimmer everywhere.
The bots are filtered, the humans shine bright,
A Destiny-themed dashboard — what a delight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the three main changes: renaming agents to Frames, removing Health Checks, and expanding work display, which aligns with the PR's primary objectives.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/hive-frames-destiny

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 and usage tips.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM on content — Frames rename and expanded work display look good. Note: has a merge conflict that needs resolving before this can be merged.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Revoking approval after closer diff review. The title ('rename agents to Frames, remove Health Checks, expand work display') doesn't fully describe the scope:

  • scripts/fetch-hive-history.js +139/-7: adds a new weekly contributor stats feature (new TTL, new contributorStats schema, new fetch path) — this is a non-trivial JS feature, not implied by the title
  • src/components/HiveFactoryDashboard.tsx +436/-133 and .module.css +210: significant component overhaul

Please either split the fetch-hive-history.js feature into its own PR, or update the title/description to accurately cover all three dimensions of what's changing (rename + CSS overhaul + new weekly stats). Also has a merge conflict that will need resolving before this can land.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Solid UI improvement. Removing the broken HealthPanel is clearly correct. isBotLogin() centralization is the right call — scattered bot filtering was a maintenance hazard. Switching ContributorLeaderboard metric from commits to repos-active-in is a better signal for breadth of contribution. npm run typecheck and lint both clean. One note: the Destiny Frame quotes are sourced from Destinypedia — confirm licensing/attribution is acceptable before shipping to a public-facing page; if copyrighted they may need attribution. LGTM pending that check.

hanthor
hanthor previously approved these changes Jun 16, 2026

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved via org-wide review.

- AGENTS.md: rename 'Agent Formation' to 'Frame Formation' in panel table
- AGENTS.md: add 'npm run build' to add-a-panel validation checklist
- fetch-hive-history.js: update MAX_ENTRIES to 2016 (~6 months) to match AGENTS.md docs
- HiveFactoryDashboard.tsx: complete 'Frames' rename in hero text and meta descriptions

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot

@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: 2

🤖 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 `@AGENTS.md`:
- Line 245: The documentation at line 245 in AGENTS.md claims the workflow has
`contents:write` permissions to commit the hive-history.json file back to main,
but the workflow itself only has `contents:read` permissions, which cannot
perform write operations. Verify the intended behavior: if the workflow should
only cache the file without committing it, update line 245 to accurately reflect
this read-only behavior. If commits to hive-history.json are actually required,
update the workflow permissions configuration to include `contents:write`.
Ensure the documentation and workflow permissions are aligned with the actual
intended behavior.

In `@src/components/HiveFactoryDashboard.module.css`:
- Around line 2258-2320: The interactive elements .lbTab and .lbRow currently
only define :hover states for visual feedback but lack keyboard focus indicators
required for accessibility compliance. Add :focus-visible pseudo-class selectors
to both .lbTab and .lbRow with appropriate styling that provides clear visual
indication when these elements receive focus via keyboard navigation, using
similar visual treatment to their existing :hover states to ensure consistency.
🪄 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 Plus

Run ID: ca9354c6-5c38-468b-91ae-e08b4b0ebb33

📥 Commits

Reviewing files that changed from the base of the PR and between 95f7298 and ca05b81.

📒 Files selected for processing (4)
  • AGENTS.md
  • scripts/fetch-hive-history.js
  • src/components/HiveFactoryDashboard.module.css
  • src/components/HiveFactoryDashboard.tsx

Comment thread AGENTS.md

Steps: checkout → setup-node → restore hive cache (incremental, key: `github-data-hive-`) → `npm run fetch-hive-history` → save cache → commit updated `static/data/hive-history.json`

Permissions: `contents:write` — commits history file back to main.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify actual permissions in the workflow
rg -A5 "permissions:" .github/workflows/update-hive-cache.yml

Repository: projectbluefin/documentation

Length of output: 171


Line 245: Fix permissions documentation mismatch

The workflow has permissions: contents:read only, but line 245 documents contents:write with the intent to "commit updated hive-history.json" back to main. A read-only workflow cannot write commits to the repository. Either:

  1. Correct line 245 to reflect that the workflow caches the file but does not commit it, or
  2. Update the workflow to include contents:write if commits are required

Verify the intended behavior and align documentation with implementation.

🤖 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 `@AGENTS.md` at line 245, The documentation at line 245 in AGENTS.md claims the
workflow has `contents:write` permissions to commit the hive-history.json file
back to main, but the workflow itself only has `contents:read` permissions,
which cannot perform write operations. Verify the intended behavior: if the
workflow should only cache the file without committing it, update line 245 to
accurately reflect this read-only behavior. If commits to hive-history.json are
actually required, update the workflow permissions configuration to include
`contents:write`. Ensure the documentation and workflow permissions are aligned
with the actual intended behavior.

Comment on lines +2258 to +2320
.lbTab {
background: transparent;
border: 1px solid #30363d;
color: #8b949e;
font-size: 0.75rem;
font-family: inherit;
padding: 0.3rem 0.9rem;
border-radius: 6px;
cursor: pointer;
transition: all 0.15s;
letter-spacing: 0.03em;
text-transform: uppercase;
}

.lbTab:hover {
border-color: #58a6ff;
color: #58a6ff;
}

.lbTabActive {
border-color: #d29922;
color: #d29922;
background: rgba(210, 153, 34, 0.1);
}

.lbTable {
display: flex;
flex-direction: column;
gap: 0;
font-size: 0.8rem;
}

.lbHeader {
display: grid;
grid-template-columns: 2rem 1fr 6rem 10rem 1fr;
gap: 0.5rem;
align-items: center;
padding: 0.3rem 0.5rem;
color: #484f58;
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 0.06em;
border-bottom: 1px solid #21262d;
margin-bottom: 0.25rem;
}

.lbRow {
display: grid;
grid-template-columns: 2rem 1fr 6rem 10rem 1fr;
gap: 0.5rem;
align-items: center;
padding: 0.4rem 0.5rem;
border-radius: 6px;
text-decoration: none;
color: #c9d1d9;
transition: background 0.12s;
}

.lbRow:hover {
background: #161b22;
text-decoration: none;
color: #c9d1d9;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add keyboard focus states for accessibility.

Both .lbTab (button) and .lbRow (link) are interactive elements but only define :hover states. Keyboard users navigating with Tab need visible focus indicators to meet WCAG requirements.

♿ Proposed fix to add focus-visible states
 .lbTab:hover {
   border-color: `#58a6ff`;
   color: `#58a6ff`;
 }
+
+.lbTab:focus-visible {
+  outline: 2px solid `#58a6ff`;
+  outline-offset: 2px;
+}

 .lbTabActive {
   border-color: `#d29922`;
 .lbRow:hover {
   background: `#161b22`;
   text-decoration: none;
   color: `#c9d1d9`;
 }
+
+.lbRow:focus-visible {
+  outline: 2px solid `#58a6ff`;
+  outline-offset: 2px;
+  background: `#161b22`;
+}

 .lbColRank {
   font-family: "JetBrains Mono", "Fira Code", monospace;
🤖 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 `@src/components/HiveFactoryDashboard.module.css` around lines 2258 - 2320, The
interactive elements .lbTab and .lbRow currently only define :hover states for
visual feedback but lack keyboard focus indicators required for accessibility
compliance. Add :focus-visible pseudo-class selectors to both .lbTab and .lbRow
with appropriate styling that provides clear visual indication when these
elements receive focus via keyboard navigation, using similar visual treatment
to their existing :hover states to ensure consistency.

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.

2 participants