Two scene-layout tweaks to the inline (third-column) Event Log: - It can now be collapsed to a fixed corner button (✕ in its header) to declutter, and reopened from that button. ScenePhase owns `logOpen` and reflows the grid to two columns while collapsed; EventLog dispatches `collapse`. - The panel now pins at top:3.5rem (matching .dashboard-container's top padding) with max-height calc(100vh - 4.5rem), so its bottom stays on-screen at any scroll position and .log-content scrolls internally — previously the bottom sat ~24px below the fold at the top of the page. Verified across Pi-Rat and Deep views, scroll extremes, and 3-col / 1-col widths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.9 KiB
2.9 KiB
Polish
- Event log layout. The event log should still be collapsable into a corner button to give the player the option to declutter their screen. On screens big enough for three column layouts, since the event log has an internal scrolling area, make sure that the outer panel never extends past the bottom of the screen, so that the bottom of the log stays visible no matter what.
- Crew roster text illegible on dark mode. The text on the crew roster bubbles is black-on-dark in dark mode. The roster items probably need some re-styling on both dark and light mode, because their background being barely different from the page background doesn't look great.
- Enforce End-Scene requirements Unless dev mode is turned on, enforce that the scene cannot end unless every pi-rat has been challenged at least once or the obstacle list is empty. Leave enforcement of "had a chance to complete objective" to table talk. The Deep should probably see some kind of UI informing them which Pi-Rats have already been challenged. Maybe a checkmark floating outside their bubble to the left with a tooltip on mouseover that explains what it means.
- Declutter the Hand panel The hand panel definitely doesn't need the explanatory text, and probably doesn't need the title either, though if there's some low profile, low-noise visual way to communicate "this is your hand", that wouldn't be a bad idea.
DevOps/Maintenance
- Logging: Add some logging to the backend. The Nix service should log to /var/log/pirats.log by default (but be configurable). At very least, stderr should go there, plus important server-side events, like:
- Purge old finished/inactive games: Add a periodic task (daily is good enough, but make the interval configurable through an env variable/the nix flake) to purge games that have finished more than two weeks ago, or have had no moves played within the last month. These time windows should also be configurable. Log all purges, including crew names/uuids and how much disk space they recovered.
- Defensive coding. While we trust our players, this app is exposed on the open internet. I'd like to take basic precautions like making sure we're safe against SQL injection (SQLModel should handle this?), doing some basic sanitizing of free inputs from players (valid unicode only + generous character limit should be enough), and making sure that every game action API call is specific and constrained enough that it can't just do arbitrary database updates.
Words Words Words (Waiting for Fable to come back)
- TLDR rules. A one page summary sheet of the rulebook, for the impatient
- Suggestions. Take a pass through all of the suggestions in suggestions.js, rewrite ones that are stiff, awkward, or don't fit the theme/setting as described in the rulebook. Move the suggestion pool from suggestions.js into a backend API endpoint.