What Changed
Added scene-owned occupancy data:Scenes.FloorPlanID
Scenes.InitialFloorPlanFloorID
new SceneFloorPlanOccupancy table
Added Occupancy section to the Scene Inspector with AJAX save/refresh.
Added Floor Plan editor Structure / Occupancy mode.
Occupancy mode shows linked scenes, previous/next scene controls, and character/asset tokens inside assigned locations.
Character tokens use image thumbnail, then initials fallback. Asset tokens do the same, smaller.
No Features, no new floor-plan architecture, no transition changes.
Files Changed
[CoreModels.cs](C:/Source/PlotLine/PlotLine/Models/CoreModels.cs)
[CoreViewModels.cs](C:/Source/PlotLine/PlotLine/ViewModels/CoreViewModels.cs)
[Repositories.cs](C:/Source/PlotLine/PlotLine/Data/Repositories.cs)
[CoreServices.cs](C:/Source/PlotLine/PlotLine/Services/CoreServices.cs)
[ScenesController.cs](C:/Source/PlotLine/PlotLine/Controllers/ScenesController.cs)
[Program.cs](C:/Source/PlotLine/PlotLine/Program.cs)
[Edit.cshtml](C:/Source/PlotLine/PlotLine/Views/FloorPlans/Edit.cshtml)
[_SceneInspector.cshtml](C:/Source/PlotLine/PlotLine/Views/Scenes/_SceneInspector.cshtml)
[_SceneOccupancy.cshtml](C:/Source/PlotLine/PlotLine/Views/Scenes/_SceneOccupancy.cshtml)
[site.js](C:/Source/PlotLine/PlotLine/wwwroot/js/site.js)
[site.css](C:/Source/PlotLine/PlotLine/wwwroot/css/site.css)
minified CSS/JS updated.
Database
Added new migration only: [080_SceneFloorPlanOccupancy.sql](C:/Source/PlotLine/PlotLine/Sql/080_SceneFloorPlanOccupancy.sql)
Applied locally.
Added constraints/FKs and filtered unique indexes for one character/asset occupancy row per scene.
Stored Procedures Added/Updated
Scene_Save
Scene_Get
Scene_FloorPlanLink_Save
Scene_ListByFloorPlan
FloorPlanFloor_ListByPlan
FloorPlanBlock_ListByPlan
SceneFloorPlanOccupancy_ListByScene
SceneFloorPlanOccupancy_ListByFloorPlan
SceneFloorPlanOccupancy_Save
Test Data
Permanent Calendar House seed data added:
Book: The Calendar House
Chapters 1-3
14 scenes
Characters: Ellie, Grant, Stephen, Housekeeper, Gardener
Assets: Brass Key, Journal, Candle, Map, Letter
45 occupancy assignments
Verification
dotnet build PlotLine.slnx passes with 0 warnings/errors.
Migration applied locally.
Local app boots and returns HTTP 200.
DB checks confirm 14 linked scenes and 45 occupancy rows.
Manual browser click-through of the authenticated UI still needs a human pass for the AJAX controls and visual token placement.
Changed
Added image fields for Characters and Story Assets in models, view models, repositories, services, and save flows.
Added reusable avatar/initials rendering via [AvatarHelper.cs](C:/Source/PlotLine/PlotLine/Services/AvatarHelper.cs) and [_Avatar.cshtml](C:/Source/PlotLine/PlotLine/Views/Shared/_Avatar.cshtml).
Added upload/remove processing through existing upload storage in [VisualIdentityImageService.cs](C:/Source/PlotLine/PlotLine/Services/VisualIdentityImageService.cs).
Updated Character and Story Asset list/detail/edit views with thumbnails, initials fallback, upload, replace, and remove controls.
Added styling in [site.css](C:/Source/PlotLine/PlotLine/wwwroot/css/site.css) and refreshed site.min.css.
Database
Added new migration [079_VisualIdentityCharacterAssetImages.sql](C:/Source/PlotLine/PlotLine/Sql/079_VisualIdentityCharacterAssetImages.sql).
Adds nullable ImagePath and ThumbnailPath to Characters and StoryAssets.
Applied locally and confirmed the columns exist.
Stored Procedures
Updated active procedure definitions only:
Character_ListByProject
Character_Get
Character_Save
Character_UpdateImage
StoryAsset_ListByProject
StoryAsset_Get
StoryAsset_Save
StoryAsset_UpdateImage