Skip to content

feat(axum-discordsh): clickable links, gear expansion, JSON API + session viewer#7699

Merged
h0lybyte merged 1 commit intodevfrom
trunk/discordsh-gear-api-1772840487
Mar 7, 2026
Merged

feat(axum-discordsh): clickable links, gear expansion, JSON API + session viewer#7699
h0lybyte merged 1 commit intodevfrom
trunk/discordsh-gear-api-1772840487

Conversation

@h0lybyte
Copy link
Member

@h0lybyte h0lybyte commented Mar 7, 2026

Summary

  • Clickable profile links: Move player roster from embed footer (plain text) to embed field where [text](url) markdown links are clickable
  • Gear expansion: Add 7 new gear items including Legendary tier (Excalibur, Void Scythe, Dragon Scale) and new DamageReduction gear special
  • JSON API: Add /api/session/{id} endpoint returning full session state as JSON with Cache-Control: no-cache
  • Session viewer: Add /session/{id} page via Askama template with game/map/inventory card images, OG metadata for social sharing, and inline JS that fetches session JSON
  • Serde serialization: Add serde::Serialize to all game types with custom serializers for HashMap<UserId, _> and HashMap<MapPos, _>

New Gear Items

Name Slot Rarity Special
Iron Mace Weapon Uncommon
Glass Stiletto Weapon Rare +15% Crit
Excalibur Weapon Legendary +10% Crit
Void Scythe Weapon Legendary 15% Lifesteal
Shadow Cloak Armor Uncommon
Runeguard Plate Armor Rare 2 Thorns
Dragon Scale Armor Legendary 10% DmgReduction

Files Changed

  • Cargo.toml — enable serde feature on uuid
  • types.rsserde::Serialize on all types, DamageReduction variant, custom serializers
  • content.rs — 7 new gear items, updated loot tables (skeleton, wraith, boss)
  • logic.rsDamageReduction in single-target + AoE enemy damage calc
  • card.rsDamageReduction match arm in gear display
  • render.rs — roster in embed field with clickable links, simplified footer
  • askama.rsSessionViewerTemplate struct
  • transport/api.rsnew JSON + page endpoints with tests
  • transport/mod.rspub mod api;
  • transport/https.rs — merge API router
  • templates/askama/session.htmlnew session viewer HTML template

Test plan

  • cargo build -p axum-discordsh compiles
  • cargo test -p axum-discordsh — 372 tests pass
  • Manual: dungeon embed shows clickable profile links
  • Manual: curl /api/session/{sid} returns valid JSON
  • Manual: /session/{sid} renders viewer page with cards
  • Manual: boss drops Legendary gear
  • Manual: Dragon Scale reduces enemy damage by 10%

…PI + session viewer

Move player roster from embed footer to field for clickable markdown links.
Add 7 new gear items including Legendary tier and DamageReduction special.
Add serde Serialize to all game types for JSON serialization.
Add /api/session/{id} JSON endpoint and /session/{id} viewer page via Askama.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@h0lybyte h0lybyte merged commit f5e43e4 into dev Mar 7, 2026
5 checks passed
@h0lybyte h0lybyte deleted the trunk/discordsh-gear-api-1772840487 branch March 7, 2026 00:33
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.

1 participant