feat: add repository and contributor detail views - #504
Conversation
Open a detail view for any repository or contributor from its name in the dashboard's tables and charts, backed by period-accurate activity computed from the persisted events and published through the data API. * Add the entity_activity pipeline: tracked actions per repository, contributor and (repository, contributor) pair for Week, 1 month, 1 year and all time, each counted from its own events, plus monthly trends * Publish per-org entity indexes and lazily fetched detail documents (additive to API v1) with source, freshness, population, methodology and window dates; empty periods are zeros * Join releases, governance, HIP engagement, onboarding and security into a repository's view, naming tables a run did not produce and linking each figure back to its dashboard section * Link repository and contributor names in tables and charts to their view, keeping a separate GitHub link; keep navigation in the URL so shared links, Back and Forward work * Hold a section jump on its target while charts above it load * Cover calculations, documents, contract, navigation and rendering with tests; document the data model in docs/entity-views.md Fixes #503 Fixes #357 Signed-off-by: Ntege Daniel <danientege785@gmail.com>
📊 Dashboard previewThe dashboard was built for this PR. ➡️ Download
|
Wrap each multi-line methodology and limits entry in the entity views' spec in parentheses, as the family modules already do, so an implicit string concatenation cannot be mistaken for a missing comma. The text of every entry is unchanged. Signed-off-by: Ntege Daniel <danientege785@gmail.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: hiero-hackers/analytics/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThis change adds period-based repository and contributor activity data, publishes entity indexes and detail documents, and adds dashboard navigation and detail views. It also adds entity links across tables and charts, print-specific behavior, documentation, and test coverage. ChangesEntity activity and publication
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue remains identified. Unavailable entity indexes now show appropriate states instead of misleading zero-activity results; the change is mergeable subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new views expose published activity summaries without adding demonstrated write authority or an authorization bypass. Organization-scoped lookup and loading guards limit navigation mistakes. Complete data-exposure and live-publication guarantees remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 68.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 135 functions across 30 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: hiero-hackers/analytics/.coderabbit.yml
Review profile: CHILL
Plan: Advanced
Run ID: e8ecbb8f-6950-4418-aff5-4aecf2a640a3
📒 Files selected for processing (35)
README.mddocs/architecture.mddocs/entity-views.mddocs/snapshots.mdsrc/hiero_analytics/analysis/entity_activity.pysrc/hiero_analytics/dashboard_spec/entities.pysrc/hiero_analytics/export/chart_data.pysrc/hiero_analytics/export/data_api.pysrc/hiero_analytics/export/entity_views.pysrc/hiero_analytics/pipelines/__init__.pysrc/hiero_analytics/pipelines/entity_activity.pytests/analysis/test_entity_activity.pytests/contracts/test_output_contract.pytests/export/test_chart_data.pytests/export/test_entity_views.pytests/pipelines/test_entity_activity.pyweb/README.mdweb/e2e/entities.spec.tsweb/src/App.tsxweb/src/api.tsweb/src/components/ContributorCell.tsxweb/src/components/DataTable.tsxweb/src/components/EntityLink.tsxweb/src/components/EntityView.tsxweb/src/components/RepoCell.tsxweb/src/components/SectionTable.tsxweb/src/components/charts/EntityTick.tsxweb/src/components/charts/EventsView.tsxweb/src/components/charts/MatrixView.tsxweb/src/components/charts/NetworkView.tsxweb/src/components/charts/SeriesView.tsxweb/src/entities.tsweb/src/printing.tsxweb/src/test/entities.test.tsxweb/src/test/entityFixtures.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
A detail view could claim a contributor had no tracked activity when the contributor index had failed to load, and a shared detail link stayed on its loading skeleton forever when no index loaded. * Track each kind's index as loaded, failed or unpublished, with a retry that reloads the directory * Say "no tracked activity" only from a loaded index; show a Retry for a failed index and a notice when the org publishes none * Link names only when their kind's index has loaded * Cover the failed, retried and unpublished cases with tests Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Description:
Add detail views for individual repositories and contributors, opened from their names anywhere on the dashboard, backed by period-accurate activity computed from the persisted events and published through the data API.
Add an
entity_activitypipeline (offline-capable, every org). It counts each repository's, contributor's and (repository, contributor) pair's tracked actions for Week, 1 month, 1 year and all time, plus monthly trends. Each window is counted from its own events, so distinct active contributors are exact.Publish, additively within v1, per-org repository and contributor indexes (
manifest.orgs.<org>.entities) and one lazily fetched detail document per entity. Each document states its source, generation time, freshness, population, methodology, limits and window dates. Periods with no activity are published as zeros.Join the optional per-repository tables into a repository's view:
A table a run did not produce is named as unavailable, and each section links back to the dashboard sections it summarises.
Add the repository and contributor views. Each shows counts by period, work mix, the monthly trend, the contributor or repository breakdown with period tabs and CSV export, and a methodology card. It states that tracked activity covers PR authoring, reviews, merges, issue creation and label applications, and does not measure commits, comments, reactions or individual performance.
Make repository and contributor names in tables, heatmaps, ranking and release-timeline axes, chart Data views and the network panel open the view, with a separate GitHub link beside each. A name with no tracked activity opens a view that says so.
Keep navigation in the URL (
entity=repo:<id>/entity=contributor:<id>), so shared links, Back and Forward work. Switching tab closes the view, switching org clears it with the focus, and "Focus the dashboard on …" sets the focus and returns to the tab in one step.Hold a section jump (
#widget=, used by shared links and the new source links) on its target while charts above it load, so it no longer lands short.Add
chart_document(table=…)so a timeseries or categories chart can be built from an in-memory slice.Cover the calculations, documents, contract, navigation and rendering with tests, and document the data model in
docs/entity-views.md.Related issue(s):
Fixes #503
Fixes #357
Notes for reviewer:
combined_activity_eventsand the same definitions as the contributor profiles. Merges are credited to the merger; label removals and automation accounts are excluded.analysis/entity_activity.pyis pure.pipelines/entity_activity.pywrites five org-level CSVs with sidecars.export/entity_views.pybuilds the documents from them, anddata_apiis still the only writer.dashboard_spec/entities.pydeclares the files, wording and joined tables as data.<org>/entities/, and new optional document fields.SectionTableaccepts any section-shaped table (TableDoc).PrintControlstakes an optional label.entities/tree is rewritten on each emit, so no stale documents are left behind.docs/snapshots.md.is_bot_loginmisses (e.g.stepsecurity-app) count as people; see Flag bot-like logins that slip past is_bot_login for review. #410.npm run lintshows only existing warnings, andnpm run format:checkandnpm run buildpass.Checklist
/assignbefore starting (see contributing guide)uv run pytestanduv run ruff check src testspass locallysrc/layout)git commit -S -s