Skip to content

feat(company): full detail page + members table with tenure & periods#246

Merged
Progi1984 merged 1 commit into
PrestaShop:developfrom
PrestaEdit:feat/company-detail-parity
Jul 23, 2026
Merged

feat(company): full detail page + members table with tenure & periods#246
Progi1984 merged 1 commit into
PrestaShop:developfrom
PrestaEdit:feat/company-detail-parity

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

Summary

Companion PR to PrestaShop/traces#239, which serializes the new employees field on topcompanies_prs.json. Must merge Traces first, then regenerate the snapshot before this PR provides its full value on prod.

Two features in one branch:

1. Full detail-page parity (commit 7b298bf) — the company detail page now renders the same rich toolkit as a contributor detail page: yearly stacked chart, PR breakdown, top repos, year drilldown, exhaustive repos table. A synthetic Contributor is built from the members' PRs via aggregateContributors(), so the whole existing toolkit accepts it as input without downstream per-entity forking.

2. Members table (commit d6d3ac3) — replaces the flat member grid with a sortable table sourced from the new employees field.

Columns:

  • Contributor (avatar + name + @handle)
  • Periods — one line per timeframe; supports multiple stints per person (e.g. gRoussac has Aug 2007 → Oct 2009 and Aug 2012 → Dec 2015)
  • Joined — first start_date (default sort)
  • Status — green Active pill if the last timeframe has no end_date or end_date ≥ today, otherwise gray Left
  • Tenure — sum of period lengths, formatted Ny Nm
  • Merged PRs — from contributors_prs.json, joined by login
  • OSS years — first–last year with a merged PR in mergedPullRequestsByYear
  • Actioninsights icon (matches the Wall of Fame tables) linking to /contributor/:login

Employees without a matching contributors_prs.json entry (deleted/renamed GH accounts, non-PR-authors) still render, dimmed, with for OSS stats — instead of vanishing silently.

Sidebar count and the table header now agree: both use employees.length, the authoritative source. The old grid is kept as a fallback when the field is absent (legacy snapshots) so the branch degrades gracefully during the Traces-deploy window.

Test plan

  • pnpm typecheck (via node_modules/.bin/vue-tsc --noEmit) → green
  • Local snapshot: topcompanies_prs.json regenerated from the companion Traces branch; the PrestaShop entry carries 69 employees
  • /company/prestashop renders the 69-row table; Gregory Roussac (2 stints), Sarah Dib (Active, 14y 10m), and departed employees (gray Left … pill) all display correctly
  • Sidebar NN contributors matches the table's Contributors (NN)
  • insights icon in the action column navigates to the contributor detail page
  • Regenerate the snapshot in prod once traces#239 lands

🤖 Generated with Claude Code

Replaces the flat DetailMembersList grid with a sortable table sourced
from the newly-serialized `employees` field of topcompanies_prs.json
(traces.byyear-breakdown mirrors `var/data/companies.json` there).

Columns
-------
- Contributor (avatar + name + @handle, linking to /contributor/:login)
- Periods (one line per timeframe — e.g. gRoussac has two stints)
- Joined (first startDate — the default sort)
- Status pill: Active (green) if the last timeframe has no endDate or
  endDate ≥ today, otherwise "Left <Mon YYYY>"
- Tenure (sum of period lengths, formatted "Ny Nm")
- Merged PRs (from contributors_prs.json, joined by login)
- OSS years (first–last non-zero year in mergedPullRequestsByYear)

Sidebar count now reads `employees.length` when the field is present
(the authoritative source), falling back to the old derived
`contributors` list only for snapshots produced before the Traces
change. This fixes the 93 / 87 mismatch — sidebar and section header
now agree.

Employees without a matching entry in contributors_prs.json (comptes GH
supprimés/renommés, ou contributeur droppé par la pipeline
`traces:fetch:contributors`) still render — dimmed, with dashes for
their OSS stats — instead of vanishing silently.

The old DetailMembersList is kept as a fallback for legacy snapshots
that lack `employees`, so the branch degrades gracefully during the
window between the front deploy and the next Traces snapshot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Jul 22, 2026
@Progi1984
Progi1984 merged commit cfec0b9 into PrestaShop:develop Jul 23, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for review to Merged in PR Dashboard Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants