feat(hive): rename agents to Frames, remove Health Checks, expand work display#926
feat(hive): rename agents to Frames, remove Health Checks, expand work display#926castrojo wants to merge 4 commits into
Conversation
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
📝 WalkthroughWalkthroughThe PR renames the Hive dashboard from "Agent" to "Frame" terminology, adds a tabbed ChangesHive Dashboard Overhaul
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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. Comment |
hanthor
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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 titlesrc/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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
AGENTS.mdscripts/fetch-hive-history.jssrc/components/HiveFactoryDashboard.module.csssrc/components/HiveFactoryDashboard.tsx
|
|
||
| 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. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify actual permissions in the workflow
rg -A5 "permissions:" .github/workflows/update-hive-cache.ymlRepository: 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:
- Correct line 245 to reflect that the workflow caches the file but does not commit it, or
- Update the workflow to include
contents:writeif 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.
| .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; | ||
| } |
There was a problem hiding this comment.
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.
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
AgentCard→FrameCard: shows up to 5 summary lines (was 2), or top 3 advisory work items; idle Frames show a verbatim in-game Destiny quoteAgentOfDay→FrameOfDay: shows 10 summary lines + up to 5 advisory work items + a quoteHealth Checks removed
HealthPanelcomponent,healthTonefunction, andhasHealthvariable — panel was brokenFactory Contributors
isBotLogin()helper (covers[bot],renovate,dependabot,github-actions, etc.)Code cleanup
firstMeaningfulLinesfunction.frameQuoteand.frameAdvisoryItemCSS classesValidation
npm run typecheck✅npm run lint✅ (no errors)Summary by CodeRabbit
New Features
Documentation