Skip to content

file-age-color - Dim files older than 1 year#9163

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/add-opacity-reduction-for-old-files
Closed

file-age-color - Dim files older than 1 year#9163
Copilot wants to merge 3 commits into
mainfrom
copilot/add-opacity-reduction-for-old-files

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

Files older than 1 year get opacity: 0.8 applied directly to the age element. The existing heat-color logic only covers recently updated files (~23 days), so the old-file path returns early before reaching createHeatIndex.

// Files older than 1 year are dimmed; `createHeatIndex` only covers recently updated files
if (diff > 365.25 * 24 * 60 * 60 * 1000) {
    lastUpdateElement.style.opacity = '0.8';
    return;
}

Test URLs

https://github.com/refined-github/refined-github
https://github.com/refined-github/refined-github/tree/main/source

Screenshot

Copilot AI changed the title [WIP] Add opacity reduction for files older than one year file-age-color: dim rows for files older than 1 year Apr 6, 2026
Copilot AI requested a review from fregante April 6, 2026 05:41
Comment thread source/features/file-age-color.tsx Outdated
const diff = Date.now() - lastUpdate.getTime();

if (diff > 365.25 * 24 * 60 * 60 * 1000) {
lastUpdateElement.closest('tr, [role="row"]')!.style.opacity = '0.8';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
lastUpdateElement.closest('tr, [role="row"]')!.style.opacity = '0.8';
lastUpdateElement.style.opacity = '0.8';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 05ae1db.

Comment thread source/features/file-age-color.tsx
Copilot AI changed the title file-age-color: dim rows for files older than 1 year file-age-color: dim files older than 1 year Apr 6, 2026
Copilot AI requested a review from fregante April 6, 2026 05:57
@github-actions github-actions Bot changed the title file-age-color: dim files older than 1 year file-age-color: dim files older than 1 year Apr 6, 2026
@github-actions github-actions Bot changed the title file-age-color: dim files older than 1 year file-age-color: dim files older than 1 year Apr 6, 2026
@fregante fregante changed the title file-age-color: dim files older than 1 year file-age-color - Dim files older than 1 year Apr 6, 2026
@fregante fregante marked this pull request as ready for review April 6, 2026 06:09
@fregante fregante closed this Apr 6, 2026
@SunsetTechuila SunsetTechuila deleted the copilot/add-opacity-reduction-for-old-files branch April 23, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants