docs: add session log for initial build and table paste fixes

This commit is contained in:
jessikitty committed 2026-09-24 00:13:26 +10:00
1 parent 6a6d524fd0
commit 554a62faf0
1 file changed
+40
@@ -0,0 +1,40 @@
# Initial Build, Light Mode and Pasted-Table Formatting
**Date:** 2026-05-26
**Project:** ScratchingPost
**Status:** resolved
**Tags:** aspnet-core, mvc, sqlite, tinymce, iis, signage, ui
## Context
Scratching Post is a self-hosted digital signage / notice board for a school, deployed to IIS, and part of a broader "Sunbeam" framework. The first sessions (2026-05-20 to 2026-05-26) built the app to v1.0 and then fixed display issues — primarily that tables pasted from Google Sheets rendered badly and the default dark slide background made content hard to read on real screens.
## Key Decisions
- **ASP.NET Core 8 MVC + SQLite with `EnsureCreated()`** — no formal EF migrations; simplest deploy for a single-server IIS app. Trade-off: schema changes need manual handling (see Aug session).
- **Cat-themed terminology** — slides = **Meows**, device playlists = **PURRs**, display nodes = **Kittens**. An early rename to "Posts" was reverted to Kittens; always read live code for names rather than relying on memory.
- **TinyMCE self-hosted** (from a local folder, light oxide theme) rather than a CDN — works offline on the school network, no API key.
- **Light mode default, white slide background, black text** — the dark default looked poor on display screens and clashed with pasted content.
- **Normalise pasted tables** — strip `colgroup` and width attributes, auto-width columns, uniform 1px solid black borders with `border-collapse: collapse`. Keeps Sheets pastes readable without manual cleanup.
- **Whitelist all inline styles and `text-align`** in the sanitiser so formatting from the editor survives to the display.
- **Cookie auth for the admin panel**, credentials in `appsettings.json` — single-admin tool; a user DB was not warranted.
## Technical Details
- Slide types: Content/WYSIWYG, Embed/iframe, ICS Calendar.
- Per-device playlists with drag-and-drop ordering (SortableJS).
- Per-device resolution config with CSS transform aspect-ratio scaling.
- URL-based device routing, e.g. `/frontofhouse`, `/staffroom`.
- Light/dark admin toggle persisted in localStorage.
- IIS deploy: ASP.NET Core Hosting Bundle required; `IIS_IUSRS` needs Modify on the publish directory.
- Admin credentials in `appsettings.json` — value `<redacted>`.
## Code Changes
- Initial app: `Controllers/`, `Models/`, `Data/`, `Views/`, `Routing/`, `wwwroot/`, `Program.cs`, `NoticeBoard.csproj`, `web.config`.
- Edit view, preview and display — white default background, black text, dark table borders, paste formatting preservation.
- TinyMCE paste handling — colgroup/width stripping, auto-width columns, 1px borders.
## Open Questions / Next Steps
- Planned **ASK** feature: priority slides that interrupt a playlist.
## Artifacts
- `feat: Light mode default, auth, Posts rename, display scaling, TinyMCE improvements` (2026-05-21)
- `fix: Pasted tables — auto-width columns, 1px solid black borders, remove colgroups` (2026-05-26)
- Repo: https://gitea.hideawaygaming.com.au/jessikitty/ScratchingPost