Repository navigation
Display custom item and mob identities in staff activity - #108
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe activity reader now fetches bounded metadata blobs for rows on the final page and uses decoded names and MMOItems or MythicMobs identities in item and mob-kill labels. A bounded Java-serialization and NBT parser handles supported metadata and falls back to vanilla labels for invalid or oversized input. ChangesActivity labels
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Activity.fetch
participant _fetch_metadata
participant CoreProtect_reader
participant Activity._entry
participant metadata_labels
Activity.fetch->>_fetch_metadata: selected page rows
_fetch_metadata->>CoreProtect_reader: bounded row-ID metadata queries
CoreProtect_reader-->>_fetch_metadata: metadata blobs
_fetch_metadata-->>Activity.fetch: attach metadata to rows
Activity.fetch->>Activity._entry: build page entries after reader closes
Activity._entry->>metadata_labels: decode item or mob metadata for targets
Merge Risk: ⚪ Minimal · up to No actionable issue remains in the reviewed activity-label change; it is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change adds metadata parsing but preserves existing staff permissions and read-only database access. Parsing and output are bounded, malformed data falls back to ordinary labels, and raw metadata is not returned. No concrete security regression was established; production validation remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Comment |
The staff activity feed labels MMOItems and MythicMobs records as vanilla materials/entities. Decode bounded, final-page metadata to show saved item names plus MMOItems type/ID, and MythicMobs internal IDs when captured by the companion CoreProtect change. Distinguish renamed vanilla items and historical mob names from proven custom identities.
Metadata reads stay within the existing read budget; decoding occurs after the database reader closes. Malformed or oversized metadata falls back to the vanilla label and raw metadata never enters the API response. No new dependency or database migration.
Rebased on the merged LuckPerms/Ranks feature (#107) for one combined website release. Validation: 98 combined CoreProtect/LuckPerms tests passed, plus earlier staff API privacy checks and actual Dev CoreProtect rows. Offline Main-sized synthetic-data gate: read p99/max 17.7/23.4 ms, no errors; writer p99/max 99.0/105.9 ms alone versus 97.2/118.8 ms with readers, no failures. An initial run overlapped a large database copy and failed the latency gate; these reported results are from the subsequent controlled run, with both retained locally.
Part of the coordinated Main release; no independent production deployment.