Skip to content

feat(profile): proper pages for skins, drinks and custom items - #216

Merged
ryanbarlow97 merged 3 commits into
mainfrom
feat/profile-items-polish
Oct 12, 2026
Merged

ryanbarlow97 merged 3 commits into
mainfrom
feat/profile-items-polish

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

The skin page showed the staff review sheet, a server-rendered PNG with id=… kind=… captions baked in. Clicking a custom item left Profile for the character's bare kit list, which doesn't show the item at all. This PR gives all three item types the same page: a large stage on the left; the name, review state, in-game tooltip and details on the right.

Skins. The stage is the editor's 3D viewer (ModelPreview / ArmorPreview with a new stage mode: transparent, fills its box, no upload controls) and opens on the item itself. It's fed the owner's own files through a new owner-only GET /skins/submissions/{id}/files/{filename} (.png/.json only, never meta.json, review_sheet.png or name_preview.png). Armour sets switch between their sets and show the four inventory icons. Books switch between unsigned and signed. The wardrobe thumbnail stands in while files load or if the viewer fails.

Drinks. Large potion, tooltip with lore, then ingredients (catalogue names), brewing steps (cook, distil, age in barrel), effects and colour. Drinks with their own texture had a hanger on their card; the new owner-only GET /drinks/submissions/{id}/texture returns the upload, else the shared drink_textures file it reuses.

Custom items. Cards like Skins and Drinks, opening inside the tab at ?tab=items&item=<character>/<kit key>. The page shows the character and kit, the state, the tooltip (kit lore, a gap, then the player's lines) and Edit item while the kit is still claimable. GET /profile now sends kit_id on each item.

Removed: skins/StatusCard, drinks/StatusCard, ProfileCustomItemsList and the frontend getReviewSheet. The backend review-sheet route stays for staff and Discord.

Tests: backend test_skin_owner_files.py and two owner_drink_texture tests; frontend ownerFiles.test.ts and a Profile test that opens a custom item and returns with Back. Full suites pass: frontend 2179, backend src/api + src/characters + drinks 677. I checked it in a local lab with real skin and drink files copied from the server: staff, armour set, book on a phone, drinks list and page, custom items list and page.

Docs: TF-Minecraft/Docs#189

🤖 Generated with Claude Code

A skin's page now shows the skin in the editor's 3D viewer, fed the
owner's own files through a new owner-only GET
/skins/submissions/{id}/files/{filename}, instead of the staff review
sheet with its debug captions. Armour sets switch between sets and show
their inventory icons; books switch covers.

A drink's page shows the potion, the in-game tooltip and the recipe:
ingredients, brewing steps and effects. Drinks with their own texture
now show it on their card and page through GET
/drinks/submissions/{id}/texture.

Custom items are cards like Skins and Drinks, and open inside the tab
(?tab=items&item=<character>/<kit key>) instead of the character's kit
list. GET /profile sends each item's kit_id so the page finds its kit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cf071d73-ba14-4265-8cd2-9191e39fd96b

📥 Commits

Reviewing files that changed from the base of the PR and between f5fb3b7 and b83800b.


📒 Files selected for processing (27)
  • backend/src/api/drinks_routes.py
  • backend/src/api/skins_routes.py
  • backend/src/api/test_skin_owner_files.py
  • backend/src/characters/lore_items.py
  • backend/src/skins/drinks.py
  • backend/src/skins/test_drinks.py
  • frontend/app/components/drinks/StatusCard.tsx
  • frontend/app/components/profile/DrinkShowcase.tsx
  • frontend/app/components/profile/ItemShowcase.tsx
  • frontend/app/components/profile/ProfileCustomItems.tsx
  • frontend/app/components/profile/ProfileCustomItemsList.tsx
  • frontend/app/components/profile/ProfileItems.tsx
  • frontend/app/components/profile/ProfilePanel.test.tsx
  • frontend/app/components/profile/ProfilePanel.tsx
  • frontend/app/components/profile/ProfileWardrobes.tsx
  • frontend/app/components/profile/SkinShowcase.tsx
  • frontend/app/components/profile/Wardrobe.tsx
  • frontend/app/components/profile/WardrobePictures.tsx
  • frontend/app/components/skins/ArmorPreview.tsx
  • frontend/app/components/skins/ModelPreview.tsx
  • frontend/app/components/skins/StatusCard.tsx
  • frontend/lib/drinks/api.ts
  • frontend/lib/profile/api.ts
  • frontend/lib/profile/paths.ts
  • frontend/lib/skins/api.ts
  • frontend/lib/skins/ownerFiles.test.ts
  • frontend/lib/skins/ownerFiles.ts

💤 Files with no reviewable changes (3)
  • frontend/app/components/profile/ProfileCustomItemsList.tsx
  • frontend/app/components/skins/StatusCard.tsx
  • frontend/app/components/drinks/StatusCard.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Summary

Summary by CodeRabbit

  • New Features
    • Added profile views for custom items, drinks and skins, including submission details, status updates and editing options where available.
    • Added previews for uploaded drink textures and skin files in profile showcases and wardrobes.
    • Added secure access to owners’ uploaded submission files.
  • Bug Fixes
    • Profile content now stays visible during refreshes instead of reverting to a loading state.
    • Unavailable preview images display a fallback.

Walkthrough

Owner-authenticated endpoints now serve submission textures and permitted skin files. Profile views display drink, skin and custom-item submission details, previews and status information. Custom-item navigation uses kit identifiers, and armour and model previews support an embedded stage mode.

Changes

Profile submission views

Layer / File(s) Summary
Owner asset retrieval
backend/src/api/drinks_routes.py, backend/src/api/skins_routes.py, backend/src/skins/drinks.py, backend/src/api/test_skin_owner_files.py, backend/src/skins/test_drinks.py, frontend/lib/skins/ownerFiles.ts, frontend/lib/skins/ownerFiles.test.ts, frontend/lib/skins/api.ts, frontend/lib/drinks/api.ts
Owner-authenticated routes serve drink textures and allowed skin files. Frontend helpers map and request uploaded files. Tests cover file access, texture lookup and filename mapping.
Showcase and preview components
frontend/app/components/profile/ItemShowcase.tsx, frontend/app/components/profile/Wardrobe.tsx, frontend/app/components/skins/ArmorPreview.tsx, frontend/app/components/skins/ModelPreview.tsx
Shared showcase controls and display components are added. Armour and model previews support a transparent stage presentation. Wardrobe cards and status-chip exports are updated.
Drink and skin profile views
frontend/app/components/profile/DrinkShowcase.tsx, frontend/app/components/profile/SkinShowcase.tsx, frontend/app/components/profile/ProfileItems.tsx, frontend/app/components/profile/ProfileWardrobes.tsx, frontend/app/components/profile/WardrobePictures.tsx, frontend/app/components/drinks/StatusCard.tsx, frontend/app/components/skins/StatusCard.tsx
Drink and skin detail views display submission information and previews. Profile item views use the new showcases, and drink wardrobe pictures request uploaded textures when no colour is available. The previous status-card components are removed.
Custom-item profile navigation
backend/src/characters/lore_items.py, frontend/lib/profile/api.ts, frontend/lib/profile/paths.ts, frontend/app/components/profile/ProfileCustomItems.tsx, frontend/app/components/profile/ProfileCustomItemsList.tsx, frontend/app/components/profile/ProfilePanel.tsx, frontend/app/components/profile/ProfilePanel.test.tsx
Custom-item records include kit identifiers. Profile navigation supports opening a custom item, and the detail view loads its kit and displays item information with an edit action when the stated conditions are met. Profile tests cover the item detail and browser Back navigation.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SkinShowcase
  participant ownerFileNames
  participant getSubmissionFile
  participant owner_file
  SkinShowcase->>ownerFileNames: Map submission to uploaded filenames
  SkinShowcase->>getSubmissionFile: Request files with session token
  getSubmissionFile->>owner_file: Send authenticated file request
  owner_file-->>getSubmissionFile: Return file response or 404
  getSubmissionFile-->>SkinShowcase: Return File or null
Loading

Merge Risk: ⚪ Minimal · up to b8380

This change adds item detail pages for skins, drinks and custom items, backed by owner-only asset endpoints. The visible evidence shows no concrete merge-blocking risk, and tests cover the main access-control paths.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the item page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanbarlow97
ryanbarlow97 merged commit 4e3396e into main Oct 12, 2026
6 checks passed
@ryanbarlow97
ryanbarlow97 deleted the feat/profile-items-polish branch October 12, 2026 15:35

This branch was successfully deployed

1 active deployment
preview — b83800b2 Deployed Oct 12, 2026 by ryanbarlow97 via deploy #369
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