WIP: feat: Cosmetic title replaces clickable username on leaderboard #145

Draft
typosaurus wants to merge 3 commits from typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard into master
Collaborator

Unfinished

This pull request is incomplete.

  • Write and run tests for leaderboard title fix — failed
  • Reconcile rebase conflicts onto master — failed
  • Reconcile rebase conflicts onto master — failed
  • Reconcile rebase conflicts onto master — failed
  • Reconcile rebase conflicts onto master — failed
  • Reconcile rebase conflicts onto master — failed
  • Reconcile rebase conflicts onto master — failed
  • Reconcile rebase conflicts onto master — failed

What was built

Summary

When a player equips a Code Farm cosmetic title (e.g. "Serial Refactorer"), the Game leaderboard sidebar displays the title text instead of the player's clickable username. The username is no longer visible, the entry is not a link to the player's farm page, and other players cannot navigate to the farm from the leaderboard.

Steps to Reproduce

  1. Equip a cosmetic title (e.g. "Serial Refactorer") via the farm's cosmetics shop.
  2. Go to the Code Farm page (/game).
  3. Look at the leaderboard sidebar on the right.
  4. Observe that your entry shows the title text instead of your username, and is not clickable.

Expected Behaviour

The cosmetic title should be displayed as a decorative label or badge alongside the username, not as a replacement for it. The username should remain visible and linked to the player's farm page so that other players can still click through.

Actual Behaviour

The leaderboard entry shows only the title text (e.g. "Serial Refactorer") instead of the player's clickable username. The username is hidden and the entry is not a hyperlink to the player's farm page.

Environment

Not provided.


Reported by D-04got10-01 via DevPlace.

Acceptance criteria

  • The ticket objective is satisfied: Cosmetic title replaces clickable username on leaderboard

Commits

Commit Summary Node
a8ba5dee81b9 feat(sveta): Add tests verifying username remains clickable with decorative title badge on leaderboard -
8dee1f2ffc97 feat(nadia): Fix frontend rendering to show username as clickable link with decorative title 9516bca3c991
0b8ea359d9ad feat(nadia): Fix data layer to always return username and title ad2242c5c3b4

Run

Cost: 0.1081 USD · Nodes: 16 · Verification: make test

Closes #134

## Unfinished This pull request is incomplete. - Write and run tests for leaderboard title fix — failed - Reconcile rebase conflicts onto master — failed - Reconcile rebase conflicts onto master — failed - Reconcile rebase conflicts onto master — failed - Reconcile rebase conflicts onto master — failed - Reconcile rebase conflicts onto master — failed - Reconcile rebase conflicts onto master — failed - Reconcile rebase conflicts onto master — failed ## What was built ## Summary When a player equips a Code Farm cosmetic title (e.g. "Serial Refactorer"), the Game leaderboard sidebar displays the title text instead of the player's clickable username. The username is no longer visible, the entry is not a link to the player's farm page, and other players cannot navigate to the farm from the leaderboard. ## Steps to Reproduce 1. Equip a cosmetic title (e.g. "Serial Refactorer") via the farm's cosmetics shop. 2. Go to the Code Farm page (/game). 3. Look at the leaderboard sidebar on the right. 4. Observe that your entry shows the title text instead of your username, and is not clickable. ## Expected Behaviour The cosmetic title should be displayed as a decorative label or badge alongside the username, not as a replacement for it. The username should remain visible and linked to the player's farm page so that other players can still click through. ## Actual Behaviour The leaderboard entry shows only the title text (e.g. "Serial Refactorer") instead of the player's clickable username. The username is hidden and the entry is not a hyperlink to the player's farm page. ## Environment Not provided. --- *Reported by **D-04got10-01** via DevPlace.* ## Acceptance criteria - The ticket objective is satisfied: Cosmetic title replaces clickable username on leaderboard ## Commits | Commit | Summary | Node | |---|---|---| | `a8ba5dee81b9` | feat(sveta): Add tests verifying username remains clickable with decorative title badge on leaderboard | `-` | | `8dee1f2ffc97` | feat(nadia): Fix frontend rendering to show username as clickable link with decorative title | `9516bca3c991` | | `0b8ea359d9ad` | feat(nadia): Fix data layer to always return username and title | `ad2242c5c3b4` | ## Run Cost: 0.1081 USD · Nodes: 16 · Verification: make test Closes #134
typosaurus added 3 commits 2026-07-27 11:30:47 +02:00
Outcome: done
Changed: none
Verified by: `python -m py_compile devplacepy/services/game/store/farm.py && python -m py_compile devplacepy/services/game/store/era.py` — both pass (0 exit code)
Findings:
- `leaderboard()` at farm.py:113-148 returns both `username` and `title` as separate fields in every entry.
- `_entry()` at farm.py:149-165 returns both `username` and `title` — all boards using `_ranked_entries()` (prestige, harvests_week, fair_play) inherit both fields.
- `leaderboard_raid_efficiency()` at farm.py:226-268 uses `_entry()` and includes both `username` and `title`.
- `leaderboard_time_to_kernel()` at farm.py:195-213 uses `_entry()` and includes both `username` and `title`.
- `leaderboard_era()` at era.py:131-166 returns both `username` and `title` as separate fields.
- No leaderboard function returns `title` as `username` or omits either field — the data layer is fully correct and requires no changes.
- Root cause is CSS flex layout (`game.css:81`): `.game-lb-name` (`flex: 1; min-width: 0; overflow: hidden`) shrinks to 0px while `.game-lb-title` (`flex-shrink: 0`) does not shrink. Fix belongs in CSS/template layer.
Open: CSS/template fix delegated to a separate leaf node (add `min-width` to `.game-lb-name` or `flex-shrink: 1` to `.game-lb-title`, or restructure template to place title within/before the anchor)
Confidence: high - every leaderboard function was read and confirmed to return both `username` and `title` as separate fields; none require changes

Typosaurus-Run: b99050b08d5a4dc996c2175d228fe8cf
Typosaurus-Node: ad2242c5c3b448eda7073b97d6e565ae
Typosaurus-Agent: @nadia
Refs: #134
Outcome: done
Changed: devplacepy/static/css/game.css:249-274
Verified by: `node --check devplacepy/static/js/GameFarm.js` — syntax clean; `python3 -c` CSS brace check — 101/101 balanced, OK. Full test suite not runnable due to Python 3.11 environment (project requires 3.12+); changes are JS/CSS only.
Findings: The JS template (title inside anchor, `${entry.username}${titleHtml}`) was already committed in a6fd91b and is correct. The uncommitted CSS change adds `min-width: 80px` to `.game-lb-name` so the anchor never shrinks to 0px in the 280px sidebar. `.game-lb-title` is restyled as `display: inline-block` with `max-width: 100px; overflow: hidden; text-overflow: ellipsis;` for independent truncation inside the anchor, styled as italic accent badge. The title leading space (`" <span..."`) provides visual separation without CSS margin. No other leaderboard rendering sites exist — all boards share this single JS template path.
Open: none
Confidence: high — root cause confirmed by investigation sibling (flex asymmetry at 280px); JS fix already committed; CSS guards directly resolve the collapse and ensure the title is always decorative, never a replacement.

Typosaurus-Run: b99050b08d5a4dc996c2175d228fe8cf
Typosaurus-Node: 9516bca3c9914bcdab26ec17b52dfa07
Typosaurus-Agent: @nadia
Refs: #134
Some checks failed
DevPlace CI / test (pull_request) Failing after 58m1s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard:typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard
git checkout typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: retoor/devplacepy#145
No description provided.