- New node types:
- Wait: delays execution for N ticks, supports optional input
- Number: stores a numeric value
- String: stores a string value
- Random: generates random numbers in range [min, max]
- Boolean: stores true/false flag
- Date: stores a date value
- Color-coded nodes matching React Flow palette:
- Wait: yellow
- Number: purple
- String: teal
- Random: pink
- Boolean: emerald
- Date: cyan
- NodeEditDialog now handles all new types with appropriate fields
- Toolbar updated with color-matched buttons
- Browser button elements have default background/border
- Span with onClick provides the same functionality with no defaults
- Maintains keyboard focus states and accessibility
- NarrativeEvents collection redesigned with flowData JSON (React Flow format)
- Custom admin field component: NarrativeFlowEditor with @xyflow/react
- Three node types: NarrativeBeat (blue), Choice (amber), Outcome (emerald)
- NodeEditDialog with type-specific forms replacing prompt() editing
- Right-click context menu (Delete node/edge with Radix primitives)
- Dynamic handles on Choice nodes (one per option)
- Dark-themed canvas with MiniMap, Controls, and animated edges
- All changes sync bidirectionally with Payload form state
- AGENTS.md updated with architecture docs
- Update schema to reflect system field, targetCollection select options,
and access controls (read/create for all, update for admins/devs,
delete for devs only)
- Document narrative event creation workflow for GM/admin use
- Document EventLedger UI behavior: refreshKey prop, 30s polling, actor
prefix with 'You' substitution, multi-select type filter, narrative
styling, flicker-free re-fetch
- Add step-by-step guide for adding event logging to new actions
- Document non-structure events limitation and future pattern
- Client-side EventLedger component that queries game-event-logs REST API
for a given structureId and renders a scrollable feed
- Actor name prefix with 'You' substitution for the current user, messages
lowercased to fit sentence syntax
- Multi-select dropdown filter (shadcn DropdownMenuCheckboxItem) for event
types with PascalCase formatting
- Narrative/GM events (system: false) styled with amber accent + book icon
- Smart refresh: smooth re-fetch without clearing existing entries, 30s
polling interval, and instant refreshKey trigger from parent actions
- New game-event-logs collection with timestamp, type, message, actor,
structure, targetCollection/targetId, and data (JSON) fields
- EventTypes constants registry for modular event category management
- emitGameEvent() utility for emitting events from server actions and hooks
- Register collection in Payload config
- Document event log system architecture in AGENTS.md
Server action: remove 'other.id === entryId' exclusion from the
split overlap scan so the source item's own footprint is treated
as occupied, forcing the split to find a different position.
UI: disable the split button via findEmptySpot check when no room
exists for the split stack, preventing a failed action.
- Move storage overview from /logistics/storage to /logistics root
- Rename page heading and sidebar label from Storage to Structures
- Update back link on structure detail page
- Remove old /logistics/storage route
- addResource, removeResource, placeResourceOnGrid, removeGridItem
now require admin or developer role (game master operations)
- transferResource, moveGridItem, mergeGridStacks, rotateGridItem,
splitGridStack, autoArrangeGrid require user, admin, or developer
(logistics operations that don't change total inventory)
- Guests are excluded from all mutating operations
ManageStorageDialog now calls router.refresh() after deposit,
withdraw, and transfer so the grid view reflects changes.
Await fetchData() before refreshing.
Resource labels now use pluralize() for correct unit display
(e.g. "1 liter" vs "3 liters").
Replace flat ResourceList with StructureStorageView (grid/list
toggle for structures with dimensions, flat list fallback for
non-grid structures). Apply pluralize to upkeep labels.
addResource now auto-places deposited resources onto the structure
grid (first-fit scan, fills existing stacks first, falls back to
flat-list behavior for non-grid structures).
New server actions:
- placeResourceOnGrid — explicit placement at x,y,rotated
- moveGridItem — move item to new position with optional rotation
- mergeGridStacks — merge two stacks of the same resource
- rotateGridItem — toggle rotation in-place
- removeGridItem — delete a grid entry
- splitGridStack — split a stack into two at an empty spot
- autoArrangeGrid — re-pack all items into grid
- GridItem type and GridDimensions helper type
- getItemFootprint: effective size accounting for rotation
- getOccupiedCells: list of "x,y" cell keys
- isValidPlacement: overlap and bounds checking
- findEmptySpot: first-fit scan for available placement
- autoArrangeItems: pack items into grid
- getGridOccupancy: used/total cell counts
- Withdraw/Transfer tabs: max = currently stored amount of selected resource
- Deposit tab: max = remaining capacity divided by resource massPerUnit
- Amount auto-clamps when resource selection changes
- Show 'Max: X' hint below each amount input
- Replace static descriptions in admin fields with dynamic `TickDurationDescription` components.
- Add minimum and maximum constraints to duration fields in various schemas.
- Update `TickDurationDescription` to use `useField` hook for better form integration.