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

3 Commits

Author SHA1 Message Date
a8ba5dee81 feat(sveta): Add tests verifying username remains clickable with decorative title badge on leaderboard
Some checks failed
DevPlace CI / test (pull_request) Failing after 58m1s
2026-07-27 09:30:12 +00:00
8dee1f2ffc feat(nadia): Fix frontend rendering to show username as clickable link with decorative title
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
2026-07-27 09:30:12 +00:00
0b8ea359d9 feat(nadia): Fix data layer to always return username and title
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
2026-07-27 09:29:04 +00:00