Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebHost: Sort tracker last activity 'None' as maximum instead of -1 #2446

Merged
merged 2 commits into from
Nov 11, 2023

Conversation

remyjette
Copy link
Collaborator

What is this fixing or adding?

When managing an async, it can be useful to sort the tracker by Last Activity to see who has potentially abandoned their slots. Today, if a slot hasn't been started (last activity is None) then it is sorted as if last activity is -1, that it is it has had more recent activity than any other slot.

This change makes it so slots that haven't started are treated as if they have last activity MAX_VALUE time ago. This way they get sorted with slots that haven't been touched in a long time which should make intuitive sense as the "last activity" is effectively inf time ago.

Please format your title with what portion of the project this pull request is
targeting and what it's changing.

How was this tested?

Ran the tracker locally with a game that had some slots started and some not. Clicked the last activity column.

When managing an async, it can be useful to sort the tracker by Last
Activity to see who has potentially abandoned their slots. Today, if a
slot hasn't been started (last activity is None) then it is sorted as
if last activity is -1, that it is it has had more recent activity than
any other slot.

This change makes it so slots that haven't started are treated as if
they have last activity MAX_VALUE time ago. This way they get sorted
with slots that haven't been touched in a long time which should make
intuitive sense as the "last activity" is effectively inf time ago.
@ThePhar ThePhar added is: refactor/cleanup Improvements to code/output readability or organizization. affects: webhost Issues/PRs that touch webhost and may need additional validation. labels Nov 10, 2023
@LegendaryLinux LegendaryLinux merged commit df1e78c into ArchipelagoMW:main Nov 11, 2023
10 checks passed
@remyjette remyjette deleted the sort-last-activity-none branch November 11, 2023 06:18
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
…rchipelagoMW#2446)

When managing an async, it can be useful to sort the tracker by Last
Activity to see who has potentially abandoned their slots. Today, if a
slot hasn't been started (last activity is None) then it is sorted as
if last activity is -1, that it is it has had more recent activity than
any other slot.

This change makes it so slots that haven't started are treated as if
they have last activity MAX_VALUE time ago. This way they get sorted
with slots that haven't been touched in a long time which should make
intuitive sense as the "last activity" is effectively inf time ago.
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
…rchipelagoMW#2446)

When managing an async, it can be useful to sort the tracker by Last
Activity to see who has potentially abandoned their slots. Today, if a
slot hasn't been started (last activity is None) then it is sorted as
if last activity is -1, that it is it has had more recent activity than
any other slot.

This change makes it so slots that haven't started are treated as if
they have last activity MAX_VALUE time ago. This way they get sorted
with slots that haven't been touched in a long time which should make
intuitive sense as the "last activity" is effectively inf time ago.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: webhost Issues/PRs that touch webhost and may need additional validation. is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants