Skip to content

Feat/dev profile top commits#12

Merged
lex0c merged 5 commits intomainfrom
feat/dev-profile-top-commits
Apr 21, 2026
Merged

Feat/dev profile top commits#12
lex0c merged 5 commits intomainfrom
feat/dev-profile-top-commits

Conversation

@lex0c
Copy link
Copy Markdown
Owner

@lex0c lex0c commented Apr 21, 2026

No description provided.

lex0c and others added 3 commits April 21, 2026 14:01
Mirrors dataset-level TopCommits per developer: largest individual
commits by lines changed, capped at 10 with a hidden counter. Shown
in the CLI profile output and the standalone --email HTML profile
page; intentionally not surfaced on the main report's Developer
Profiles cards to keep those compact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the Top commits row to the Profile table (ranking key, tiebreak,
message truncation, render surfaces, and the IsZero divergence from
the dataset-level Top Commits section), a README bullet alongside
Top files, and includes TopCommits in the deterministic-tiebreak
note on per-profile sub-lists.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the "X of Y" pattern already used on Top Contributors, Hotspots,
Directories, and other top-N sections so a reader can tell at a glance
that the cards below are a truncated slice of a larger dev set rather
than the full roster.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lex0c
Copy link
Copy Markdown
Owner Author

lex0c commented Apr 21, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e611f7a3ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/stats/format.go Outdated
Comment thread internal/report/profile_template.go Outdated
Both new Top-commits surfaces sliced SHA to a fixed 12 chars
(`tc.SHA[:12]` in the CLI formatter, `{{slice .SHA 0 12}}` in the HTML
profile template), which panics / errors when a dataset carries short
commit IDs — LoadJSONL performs no length validation, so hand-built
fixtures like "c1" or any future ingest path that emits abbreviated
SHAs would crash profile text output or break template execution.

CLI clamps via `if len(sha) > 12` before slicing; HTML uses
`printf "%.12s"` which truncates safely on any length. The other
SHA slice sites in format.go (TopCommits / LatestCommits) share the
same latent risk and are left untouched to keep this change scoped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lex0c
Copy link
Copy Markdown
Owner Author

lex0c commented Apr 21, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

profile_template.go: the per-dev Top Commits block now drops the
Message column (header, cells, and hidden-row colspan) when the first
commit carries an empty message — mirrors the dataset-level Top
Commits convention so `extract --include-commit-messages` is a strict
opt-in instead of leaving an always-empty column in place.

template.go: the dataset-level Top Commits row switched from
{{slice .SHA 0 12}} to {{printf "%.12s" .SHA}}, closing the same
latent crash path the profile block was already patched for.

Added a report-level regression covering both invariants on the
profile template: short SHAs render intact, the 16-char SHA clamps
to 12, and the Message column is absent when no TopCommit has a
message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lex0c lex0c merged commit fe29198 into main Apr 21, 2026
4 checks passed
@lex0c lex0c deleted the feat/dev-profile-top-commits branch April 21, 2026 17:36
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.

1 participant