Skip to content

fix(miners): show dates in PR table date column#1252

Open
victortran0904 wants to merge 2 commits into
entrius:testfrom
victortran0904:codex/pr-date-column-dates
Open

fix(miners): show dates in PR table date column#1252
victortran0904 wants to merge 2 commits into
entrius:testfrom
victortran0904:codex/pr-date-column-dates

Conversation

@victortran0904
Copy link
Copy Markdown

Summary

  • render an actual date in the miner PR table Date column for open and closed PRs
  • use merged date for merged PRs, closed date for closed PRs when available, and created date otherwise
  • preserve the existing Date sort behavior

Fixes #1111.

Verification

  • npm run lint
  • npm run build
  • git diff --check

Note: the local pre-commit hook failed only because lint-staged/prettier split this workspace path at spaces (New project 2). The same lint and build checks passed manually.

Copilot AI review requested due to automatic review settings May 20, 2026 17:20
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the miner detail Pull Requests table so the Date column displays an actual date for all PR states (open/closed/merged), aligning the cell renderer with the column’s intent.

Changes:

  • Add getPrDateLabel helper to choose the appropriate displayed date (merged → mergedAt, closed → closedAt/prCreatedAt, open → prCreatedAt).
  • Update the Date column’s renderCell to use the new helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/miners/MinerPRsTable.tsx Outdated
Comment on lines +114 to +117
const getPrDateLabel = (pr: CommitLog): string => {
if (pr.mergedAt) return formatDate(pr.mergedAt);
if (pr.prState === 'CLOSED') return formatDate(pr.closedAt || pr.prCreatedAt);
return formatDate(pr.prCreatedAt);
@victortran0904
Copy link
Copy Markdown
Author

Updated to address the Copilot comment: the Date column sort now uses the same effective date as the renderer (mergedAt, closed PR closedAt || prCreatedAt, otherwise prCreatedAt), so sorting matches the displayed values.

Verification:

  • npm run lint
  • npm run build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PR list "Date" column shows the words "Open" / "Closed" instead of dates for non-merged PRs

2 participants