Files
mtg-online-drafter/docs/development/CENTRAL.md
2025-12-18 20:26:42 +01:00

24 KiB

Development Status (Central)

Active Plans

Recent Completions

  • Game Battlefield & Manual Mode: Completed.
  • Helm Chart Config: Completed.
  • CSV Import Robustness: Completed. Enhanced CSV parser to dynamically map columns from headers, supporting custom user imports.
  • Fix Socket Mixed Content: Completed. Resolved mixed content error in production by making socket connection URL environment-aware.
  • Draft Rules & Pick Logic: Completed. Enforced 4-player minimum and "Pick 2" rule for 4-player drafts.
  • Fix Pack Duplication: Completed. Enforced deep cloning and unique IDs for all draft packs to prevent opening identical packs.
  • Reconnection & Auto-Pick: Completed. Implemented session persistence, seamless reconnection, and 30s auto-pick on disconnect.
  • Draft Interface UI Polish: Completed. Redesigned the draft view for a cleaner, immersive, game-like experience with no unnecessary scrolls.
  • Resizable Draft Interface: Completed. Implemented user-resizable pool panel and card sizes with persistence.
  • Draft UI Zoom Zone: Completed. Implemented dedicated zoom zone for card preview.
  • Host Disconnect Pause: Completed. Specific logic to pause game when host leaves.
  • 2025-12-16-215000_anti_tampering.md: Implemented server-side validation for game actions.
  • 2025-12-16-220000_session_persistence.md: Plan for session persistence and safer room exit logic.
  • 2025-12-16-221000_lobby_improvements.md: Plan for kick functionality and exit button relocation.
  • Fix Draft UI Layout: Completed. Fixed "Waiting for next pack" layout to be consistently full-screen.
  • Draft Timer Enforcement: Completed. Implemented server-side 60s timer per pick, AFK auto-pick, and global draft timer loop.
  • Pack Generation Update: Completed. Implemented new 15-slot Play Booster algorithm with lands, tokens, and wildcards.
  • Card Metadata Enhancement: Completed. Extended Scryfall fetching and DraftCard interfaces to include full metadata (CMC, Oracle Text, etc.).
  • Rich Metadata Expansion: Completed. Further expanded metadata to include legalities, finishes, artist, frame effects, and produced mana.
  • Persist Metadata: Completed. Implemented IndexedDB persistence for Scryfall metadata to ensure offline availability and reduce API calls.
  • Bulk Parse Feedback: Completed. Updated CubeManager to handle metadata generation properly and provide feedback on missing cards.
  • Full Metadata Passthrough: Completed. DraftCard now includes a definition property containing the complete, raw Scryfall object for future-proofing and advanced algorithm usage.
  • Server-Side Caching: Completed. Implemented logic to cache images and metadata on the server upon bulk parsing, and updated client to use local assets.
  • Peasant Algorithm Implementation: Completed. Implemented Peasant-specific pack generation rules including slot logic for commons, uncommons, lands, and wildcards.
  • Multi-Expansion Selection: Completed. Implemented searchable multi-select interface for "From Expansion" pack generation, allowing mixed-set drafts.
  • Game Type Filter: Completed. Added Paper/Digital filter to the expansion selection list.
  • Incremental Caching: Completed. Refactored data fetching to cache cards to the server incrementally per set, preventing PayloadTooLarge errors.
  • Server Graceful Shutdown Fix: Completed. Implemented signal handling to ensure clean process exit on Ctrl+C.
  • Cube Sticky Sidebar: Completed. Made the Cube Manager left sidebar sticky to improve usability with long pack lists.
  • Cube Full Width Layout: Completed. Updated Cube Manager to use the full screen width.
  • Cube Archidekt View: Completed. Implemented column-based stacked view for packs.
  • Cube Mobile UI Fixes: Completed. Fixed overlapping elements and disabled hover previews on mobile.
  • Mobile Long-Press Preview: Completed. Implemented long-press trigger for card magnification on small screens.
  • Mobile Fullscreen Preview: Completed. Updated mobile preview to be a centered fullscreen overlay.
  • Mobile Preview Animations: Completed. Implemented phase-in layout and phase-out animations for mobile preview.
  • Mobile Preview Polish: Completed. Refined mobile enter/exit easing and added premium foil finish.
  • Enhanced Foil Effects: Completed. implemented a multi-layer holographic sheen for foil cards.
  • Rolling Rainbow Foil: Completed. Updated foil effect to feature a scrolling, milder rainbow shimmer.
  • Card Visibility Boost: Completed. Added mild white overlay to all card previews for better visibility on dark backgrounds.
  • Optimized Rolling Foil: Completed. Implemented continuous full-spectrum rainbow foil effect with mild white sheen.
  • Metallic Foil Refinement: Completed. Adjusted foil to emphasize metallic shimmer/glare over rainbow color saturation.
  • Circular Foil Animation: Completed. Replaced linear glare with a rotating gaussian circular sheen.
  • Mild Foil Animation: Completed. Tuned down foil brightness and overlay intensity to be milder and consistent with non-foils.
  • Pro Foil Implementation: Completed. Implemented advanced CSS-based holographic texture and animation.
  • Universal Preview Animations: Completed. Enabled entrance/exit animations for card previews on all devices.
  • Mobile Touch Interaction: Completed. Updated long-press logic to persist preview during finger movement, closing only on release.
  • Entrance Animation Fix: Completed. Implemented 'isMounted' state to ensuring scale-in animation triggers correctly on first render.
  • Foil Bug Fix: Completed. Fixed regression where foil animations applied to non-foil cards on desktop.
  • Universal Foil Application: Completed. Applied foil animation to Grid View and Stack View card thumbnails.
  • Smart Preview Suppression: Completed. Disabled hover preview for card elements that are already rendered large enough on screen.
  • Compact Card Layout: Completed. Decreased card sizes in Grid and Stack views for a denser UI.
  • View Scale Slider: Completed. Added a slider to dynamically adjust card dimensions, synced across Grid and Stack views.
  • Dynamic Art Cropping: Completed. Implemented automatic switching to full-art/art-crop images when card size is reduced below readability threshold.
  • Refined Preview Suppression: Completed. Adjusted suppression threshold to 200px to better support Stack View's pop-up behavior.
  • Explicit Preview Suppression: Completed. Implemented strict preventPreview prop to enforce suppression logic reliably regardless of card overlap or DOM state.
  • Synchronized Display Boundaries: Completed. Aligned "Art Crop" and "Preview Suppression" thresholds to 200px (50% slider value) for a unified UI behavior.
  • Squared Art Crops: Completed. Enforced square aspect ratio for art-crop thumbnails to optimize visual density and stacking.
  • Fix Expansion Generation Limit: Completed. Implemented "Unlimited Pool" mode for expansion drafts to allow generating large numbers of packs from singleton set data.
  • Change Default Filter Flags: Completed. Updated client and server defaults for "Ignore Basic Lands", "Ignore Commander Sets", and "Ignore Tokens" to be unchecked (false).
  • Sidebar Max Width: Completed. Constrained the left sidebar in Cube Manager to a maximum width of 400px on large screens to improve layout balance.
  • Strict Pack Generation Logic: Succeeded. Enforced strict 14-card (Standard) and 13-card (Peasant) limits, removing fallback logic to prevent invalid pack generation.
  • Toast Notification Replacement: Completed. Replaced invasive alerts with a custom Toast notification system for smoother UX.
  • Enhanced Toast Visibility: Completed. Updated toasts to be top-center, animated, and highly visible with premium styling.
  • Unified Toast Design: Completed. Refined toast aesthetics to match the global dark/slate theme with subtle colored accents.
  • Animated Copy Button: Completed. Replaced copy toast with an in-place animated tick button for immediate feedback.
  • Play Online Logic: Completed. Implemented strict pack limits (min 12 for 4 players) and visual feedback for the online lobby button.
  • Lobby Rules Tooltip: Completed. Added dynamic rules explanation and supported player indicators to the lobby creation screen.
  • Fix Expansion Pack Generation: Completed. Enforced infinite card pool for expansion drafts to ensure correct pack counts and prevent depletion.
  • Responsive Pack Grid Layout: Completed. Implemented responsive multi-column grid for generated packs when card size is reduced (<25% slider).
  • Stack View Consistency Fix: Completed. Removed transparent overrides for Stack View, ensuring it renders with the standard unified container graphic.
  • Dynamic Pack Grid Layout: Completed. Implemented responsive CSS grid with minmax(550px, 1fr) for Stack/Grid views to auto-fit packs based on screen width without explicit column limits.
  • Fix Socket Payload Limit: Completed. Increased Socket.IO maxHttpBufferSize to 300MB to support massive drafting payloads.
  • Basic Lands Handling: Completed. Implemented flow to cache and provide set-specific basic lands for infinite use during deck building.
  • Land Advice & Unlimited Time: Completed. Implemented land suggestion algorithm and disabled deck builder timer.
  • Deck Builder Magnified View: Completed. Added magnified card preview sidebar to deck builder.
  • Gameplay Magnified View & Timeout: Completed. Added magnified view with full card details (Oracle text, type, mana) to gameplay and disabled timeout.
  • Test Deck Feature: Completed. Implemented "Test Solo" button in Cube Manager to instantly start a solo game with a randomized deck from generated packs.
  • Update Deck Auto-Fill: Completed. Updated deck builder "Auto-Fill" to add lands as individual cards to the deck list for easier management.
  • 2025-12-17-183000_restore_stack_hover: Completed. Restored hover magnified card for Stack View in Pack Generation.
  • 2025-12-17-183500_draft_ui_upgrade: Completed. Implemented 3D flip preview and consistent foil rendering in Draft View.
  • 2025-12-17-184000_fix_draft_pool_ui: Completed. Fixed "Your Pool" resizing bugs and removed unwanted hover animation.
  • Customizable Deck Builder Layout: Completed. Implemented switchable Vertical (Side-by-Side) and Horizontal (Top-Bottom) layouts, with an integrated, improved Land Station.
  • Draft View Layout Selection: Completed. Implemented Vertical/Horizontal layout selection for Draft View to match Deck Builder, optimizing screen space and preventing overlap.
  • Fix Cube Sidebar Scrolling: Completed. Adjusted sidebar max-height to ensure autonomous scrolling and button accessibility on tablet screens.
  • PWA Install Prompt: Completed. Implemented PWAInstallPrompt component in App.tsx and enabled PWA dev options.
  • Fix PWA Install Prompt: Completed. Implemented global event capture, iOS detection, and explicit service worker registration to ensure install prompt appears.
  • Persist PWA Dismissal: Completed. Implemented logic to remember user's choice to dismiss or install the PWA, preventing repeated prompts.
  • Create Favicon: Completed. Generated and integrated a new application favicon.
  • Mobile Touch Preview: Completed. Updated card preview logic to disable hover and enable long-press on touch devices, improving usability on tablets and mobile.
  • Minimize Slider Defaults: Completed. Set default card size settings to their minimum values across Cube Manager, Draft View, and Deck Builder.
  • Deck Builder Touch Interaction: Completed. Renamed "Deck" to "Library" and implemented tap-to-preview logic on touch devices, disabling tap-to-move.
  • Stack View Sorting & Sliders: Completed. Refactored StackView to group by Color by default, added sorting controls to Deck Builder, and reduced slider scales globally to allow smaller sizes.
  • Lobby UI & Notifications: Completed. Refactored Lobby/Chat into collapsible floating panels, implemented player event notifications (Join/Leave/Disconnect), and updated Deck Builder card size triggers.
  • Card Preview Threshold: Completed. Updated card art crop threshold to 130px (new 50% mark) across the application components.
  • UI Enhancements: Completed. Implemented drag-and-drop for Stack View, custom sort dropdown, and resizable layouts for both Deck Builder and Draft UI.
  • Resize Optimization: Completed. Refactored resize interactions for Panels.
  • Slider Optimization: Completed. Applied the same performance logic (CSS Variables + Deferred State) to Card Size Sliders in all views to eliminate lag.
  • Sidebar Resize Fix: Completed. Removed conflicting CSS transition classes from sidebars to ensure smooth 1:1 resize tracking.
  • Touch Resize Support: Completed. Implemented unified Mouse/Touch handlers for all resize handles to support mobile usage.
  • Pool Card Sizing: Completed. Fixed "enormous" card bug in horizontal pool by enforcing percentage-based height constraint.
  • Final Pool Layout Fix: Completed. Overhauled flex layout for Horizontal Pool to ensure card images scale 1:1 with panel height during resize, removing layout-blocking transitions.
  • Pool Overflow Constraint: Completed. Enforce flex shrinkage with min-h-0 and overflow-hidden to strictly bind card height to resizeable panel.
  • Resize Persistence: Completed. Implemented localStorage persistence for Sidebars and Pool Panels in both Draft and Deck Views.
  • Resolve 413 Errors: Completed. Updated Helm ingress annotations and server limits to allow unlimited upload size.
  • High Velocity UX & Strict Engine: Completed. Implemented manual mana engine, combat strict rules (Attacking/Blocking), Swipe-to-Attack gestures, and context-aware Smart Button.
  • Strict Rules & Blocking UI: Completed. Implemented visual blocking UI, targeting tether, and positioning support for strictly enforced rules.
  • Engine Enhancements: Completed. Implemented Basic Layers (P/T Modifiers), Token Creation, London Mulligan System, and Basic Aura Validation SBA.
  • High Velocity UX & Strict Engine Completion: Completed. Finalized Rules Engine (SBAs, Layers), implemented Inspector Overlay, Smart Button Yield, and Radial Menus.
  • Archived Plan: MTG Engine & UX: Archived. The original implementation plan for the strict engine and high-velocity UX.
  • Fix Initial Draw Logic: Completed. Fixed issue where players started with empty hands during Mulligan phase.
  • Manual Draw Fix: Completed. Implemented handler for manual "Draw Card" action in Game Manager.
  • Fix Actions Post-Mulligan: Completed. Aligned client-side strict action capability for Smart Button and Radial Menu.
  • Parse Card Data Robustness: Completed. Fixed issue where cards lacked types (going to graveyard) and stats (dying to SBA).
  • Fix Logging Crash: Completed. Fixed server crash when logging rule violations with malformed action payloads.
  • Fix Strict Action Payload: Completed. Corrected frontend emission structure for strict actions (lands, spells) to prevent undefined errors.
  • Fix Combat Skip Logic: Completed. Added attackersDeclared state flag to allow UI to transition from Declaration to Priority passing.
  • Force Combat Step Skip: Completed. Implemented Rule 508.8 to automatically skip Blockers/Damage steps if no attackers are declared.
  • Implement Restart Game: Completed. Added a developer button to reset the game state (preserving decks) for rapid testing.
  • Dev Reliability Fixes: Completed. Implemented auto-rejoin on socket reconnection to prevent actions failing after server restarts.
  • Battlefield Restructure: Completed. Refactored GameView battlefield into 3 distinct zones (Creatures, Non-Creatures, Lands) with organized flex layout.
  • Battlefield Card Sizing: Completed. Increased battlefield card size to be responsive (w-32 to w-40) for better visibility.
  • DnD Kit Integration: Completed. Replaced native DnD with @dnd-kit/core for consistent drag-and-drop experience on desktop and mobile, implementing DraggableCardWrapper and DroppableZone components.
  • Battlefield Cutout Style: Completed. Implemented art-crop cutout style for battlefield cards, 45-degree tap rotation, and stacked tapped lands layout.
  • Fix Battlefield Appearance: Completed. Fixed issue where battlefield cards showed full text instead of art crop by propagating metadata, and enforced square aspect ratio.
  • Robust Artwork Fetching: Completed. Updated CardComponent to robustly resolve art crop URLs, including support for double-faced cards to ensure consistent battlefield visuals.
  • Fix Restart Game Action: Completed. Fixed "Restart Game" button to properly trigger initial card draw by invoking RulesEngine logic after state reset.
  • Cache Art Crops: Completed. Implemented server-side caching for art-crop images and updated client to use local assets when available.
  • Organized Caching Subdirectories: Completed. Restructured image cache to store full art in art_full and crops in art_crop subdirectories.
  • Fix Cube Session Clear: Completed. Updated CubeManager to strictly clear all session data including parent-persisted storage keys.