Skip to content

Conversation

@abhiraj-mengade
Copy link
Collaborator

This PR implements a per-clue countdown timer that splits the hunt's total duration across all clues, displays remaining time prominently at the top of each clue, and includes timeTaken in True Network attestations for enhanced scoring.
The algorithm now considers both efficiency (attempts used) and speed (time taken) when calculating user trust scores, with appropriate weighting for each factor in the reputation system.

@vercel
Copy link

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
khoj Ready Ready Preview Comment Aug 20, 2025 6:55pm
khoj-prototype Ready Ready Preview Comment Aug 20, 2025 6:55pm

@abhiraj-mengade abhiraj-mengade changed the title feat: add countdown timer to clues with time-based scoring in True Network attestations feat: add countdown timer to clues with time-based scoring in True Network attestations. Issue #14 Aug 20, 2025
@abhiraj-mengade abhiraj-mengade changed the title feat: add countdown timer to clues with time-based scoring in True Network attestations. Issue #14 feat: add countdown timer to clues with time-based scoring in True Network attestations. Aug 20, 2025
const storedStart = localStorage.getItem(clueTimerKey);
const startTimestamp = storedStart ? Number(storedStart) : Date.now();
if (!storedStart) {
localStorage.setItem(clueTimerKey, String(startTimestamp));
Copy link
Owner

Choose a reason for hiding this comment

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

This is probably not the best approach. If the user changes the browser in the same hunt, it will not work.

I think there is a larger problem we have to solve here. There are multiple things being stored in local storage which is not the best approach. Need to clean all of that and decide where to store it.

}

// Compute per-clue duration from hunt duration if available
const totalDurationSeconds = huntDetails ? Number(huntDetails[3] ?? 0) : 0;
Copy link
Owner

Choose a reason for hiding this comment

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

totalDuration default is 0?

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.

3 participants