Skip to content

Conversation

@dangrous
Copy link
Contributor

@dangrous dangrous commented Dec 18, 2025

As the title says.

This was 99% Cursor, not me, so feel free to rip it apart. Seems to work okay though.

Look at the bottom of your sidebar (example, on this PR!) and try toggling timestamps on and off! That's all this does, but it seems helpful - https://expensify.slack.com/archives/CDXCTAJQP/p1766012917820919

image

@dangrous dangrous marked this pull request as ready for review December 23, 2025 21:57
@dangrous dangrous requested a review from a team December 23, 2025 22:01
@melvin-bot melvin-bot bot requested review from JS00001 and removed request for a team December 23, 2025 22:02
// Set up timestamp format conversion
const applyTimestampFormatPeriodic = AllPages.applyTimestampFormat();
setTimeout(() => applyTimestampFormatPeriodic(), 500);
setInterval(() => applyTimestampFormatPeriodic(), 2000);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not too sure how this works, but a constant loop to do this seems a bit excessive. Could we just apply timestamp on page load rather than every 2 seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so I think this is to allow for things like "load more" button presses, so we probably want it at least somewhat periodically? Can definitely slow it down, though - let me know what you think!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the changes that k2 makes on typical pages are done repeatedly, but I don't know how frequent it needs to be. I bet we could consolidate them all down to like every 5 sec and no one would notice a difference

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds good to me, thanks!

@dangrous dangrous requested a review from JS00001 December 30, 2025 20:07
@dangrous
Copy link
Contributor Author

okay i simplified the timestamp stuff to only one interval, and set it to 5 seconds

@JS00001 JS00001 merged commit 71ce691 into main Jan 8, 2026
6 checks passed
@JS00001 JS00001 deleted the dangrous-relativeTimestamps branch January 8, 2026 12:43
@os-botify
Copy link
Contributor

os-botify bot commented Jan 8, 2026

🚀 Released in version 1.5.17 🚀


"name": "K2 for GitHub",
"version": "1.5.15",
"version": "1.5.16",
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to manually update these anymore. There is a GH action that will automatically bump them.


// Set up timestamp format conversion
setTimeout(() => AllPages.applyTimestampFormat(), 500);
setInterval(() => AllPages.applyTimestampFormat(), 5000);
Copy link
Contributor

Choose a reason for hiding this comment

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

This will be applied every 5 seconds. Is there a reason it's refreshed so often?

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.

4 participants