From 554a62faf090d69100eafab60e72c212d5a68de5 Mon Sep 17 00:00:00 2001 From: jessikitty Date: Thu, 24 Sep 2026 00:13:26 +1000 Subject: [PATCH] docs: add session log for initial build and table paste fixes --- ...026-05-26-initial-build-and-table-paste.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .claude-context/sessions/2026-05-26-initial-build-and-table-paste.md diff --git a/.claude-context/sessions/2026-05-26-initial-build-and-table-paste.md b/.claude-context/sessions/2026-05-26-initial-build-and-table-paste.md new file mode 100644 index 0000000..c018885 --- /dev/null +++ b/.claude-context/sessions/2026-05-26-initial-build-and-table-paste.md @@ -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 ``. + +## 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