Skip to content

Map recap loses its "best moment" when a contract completes: ContractCompleted outweighs common skill shots but Describe() renders it as an empty string #23

Open

Description

@matt-edmondson

What's wrong

CounterStrikeProgression.Core/Recap/RecapTracker.cs handles every notice kind except NoticeKind.ContractCompleted, which arrived with the daily and weekly contracts in #13:

  • Weight() (~L163-L176) has no case for it, so a completed contract falls to kind 0, alongside common skill shots. Within a kind, ties are broken by notice.Xp. A contract notice carries 500 XP (daily) or 2500 XP (weekly) (ProgressionEngine.cs ~L476, ProgressionSettings.cs ~L184/L187). A common skill shot carries about 10, so the contract wins and becomes best.
  • Describe() (~L143-L156) has no case for it either. The fallback _ => weapon is null ? $"{notice.SkillShot?.Name}" : … returns "" because a contract notice has neither a weapon nor a skill shot.
  • The renderers skip an empty Best: PanelFormatter.cs ~L163 and site.js ~L1290.
  • Add() doesn't count contract completions in the recap totals either.

Failure scenario

In one map a player earns a couple of Wallbangs (common skill shots) and finishes the daily contract "Get 15 headshot kills". There is no rare or epic shot, tier, weapon level-up or rank-up. At map end:

  • The chat recap has no "best:" part at all.
  • The site's "Last session" card has no "Best moment".

The recap should show the contract, for example "best: Daily contract: Get 15 headshot kills", or at the very least the Wallbang. Instead the highlight vanishes.

Suggested fix

  • Give ContractCompleted an explicit weight in Weight(), somewhere between tier and epic skill shot, and update the doc comment's ordering.
  • Add a Describe() case using the contract's title (e.g. FeedBuilder.ContractTitle(notice.Contract)).
  • Optionally count completed contracts in MapRecap.
  • Add a RecapTests case: common skill shots plus a contract completion produce a non-empty Best naming the contract.

Activity

  1. added
    bug
    on Oct 18, 2026
  2. matt-edmondson commented on Oct 18, 2026

    @matt-edmondson
    ContributorAuthor

    Triage

    • Category: Bug
    • Priority: Low. This is cosmetic: the recap loses its "best moment" highlight. XP and contract progress are unaffected.
    • Area / suggested assignee: RecapTracker.Weight() / Describe() / Add(). Owner: @matt-edmondson
    • Duplicates / in progress: none found. It is a follow-up to the contracts work in Add daily and weekly contracts #13. No open PR covers it.
    • Next step: give ContractCompleted an explicit weight between tier and epic, and describe it with the contract title. Add a RecapTests case.

    Generated by Claude Code

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

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions