Commit Graph

62 Commits

Author SHA1 Message Date
4936b11847 fix: Fill blank pages which didn't get copied correctly 2026-06-27 17:41:45 -04:00
b716f8111a fix: Format the rest of the classes 2026-06-27 14:42:19 -04:00
0df867ffa6 fix: Format Chimerist pages 2026-06-27 13:39:05 -04:00
8abe6d4fd2 fix: Format Arcanist pages
They were *real* messed up

Starting to re-think this whole AI OCR business
2026-06-26 21:36:50 -04:00
8e990c8d31 fix: Format example blocks 2026-06-26 21:13:23 -04:00
9ec45ad556 fix: Format Page 72
Was *really* wonky because of a flowchart that just didn't get copied
correctly by the AI
2026-06-26 21:01:59 -04:00
5327b524d2 feat: Multiple book improvements
- Format spell tables like they are in the book
- Add permalinks to headers
- Formatting
- Book-wide search
2026-06-26 20:50:36 -04:00
7f81f85735 feat: Add template spell picker from spells.yml; polish spell table
All checks were successful
Deploy / deploy (push) Successful in 1m20s
- Add yaml-loader; import data/spells.yml at build time
- Add SpellTemplate/SpellsFile types to globals.d.ts
- Add 'Add Template Spell' button that opens a modal picker pre-filling
  all spell fields from the YAML data
- Move spell data files into data/ directory
- Split spell rows into inputs row + full-width notes row (colspan=6)
- Shrink delete column to fit-content; bold spell name input
- Add class column to spell table; change MP cost to free-text input
- Auto-resize spell notes textarea on load and on input
- Add 10px padding between spells for visual separation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:54:36 -04:00
d655ad4afc fix: Expand spell notes textarea full-width; add inter-spell padding
Split each spell into two table rows: the inputs row (name, MP, targets,
duration, delete) and a full-width notes row (colspan=5). Adds 10px
padding above/below each spell for visual separation between entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:54:36 -04:00
5643b31fb0 fix: Auto-resize spell/class textareas on load; shrink delete column
- Add autoResize helper and wire it via ref callback (mount) and onInput
  (typing) to spell notes and class skills textareas
- Change .spell-del-col from width:40px to width:1px + white-space:nowrap
  so the delete button column shrink-wraps to its content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:54:36 -04:00
85c02d7f7f ci: Atomically replace share-svc binary on deploy
All checks were successful
Deploy / deploy (push) Successful in 48s
scp overwrites in place, which fails with ETXTBSY ("text file busy") on
repeat deploys because systemd is executing /usr/local/bin/share-svc.
Copy to a temp path, chmod, then mv it over the destination so rename(2)
swaps the dir entry without touching the busy inode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:48:21 -04:00
de37809eec fix: Copy share URL over HTTP via execCommand fallback
Some checks failed
Deploy / deploy (push) Failing after 44s
navigator.clipboard is only available in a secure context (HTTPS or
localhost), so the Copy URL button threw over plain HTTP. Fall back to
the deprecated document.execCommand("copy") when the Clipboard API is
unavailable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 01:41:17 +00:00
efea999a2b ci: Decode base64-encoded deploy SSH key
All checks were successful
Deploy / deploy (push) Successful in 1m16s
Storing the raw PEM as a secret mangled it (CRLF/whitespace/newline),
causing ssh to fail with "error in libcrypto" at the copy step. Store the
key base64-encoded and decode it in the workflow so the PEM round-trips
intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 00:46:53 +00:00
aed051afaa ci: Add Gitea Actions deploy workflow
Some checks failed
Deploy / deploy (push) Failing after 1m28s
Build the frontend and the Go share-service, rsync/scp both to the Caddy
host, and restart share-svc + reload caddy. Triggers on push to master
(and manual dispatch). Requires a DEPLOY_SSH_KEY secret; host/user/paths
default to the Justfile values and are overridable via repo variables.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:16:23 +00:00
410eb3a5a8 chore: Add deploy plumbing for the share service
Add a hardened systemd unit, a Caddy reverse-proxy snippet that maps
/fabula/api/* to the loopback service, and Justfile build-server/
deploy-server recipes that build a static binary and ship + restart it.
Includes server/README documenting the API, config, and deploy steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 02:01:37 +00:00
6609956711 chore: Add go feature to devcontainer, bump node version 2026-06-16 21:46:51 -04:00
122a4cc881 feat: Add share-link backend and wire up the sheet
Add a small Go + SQLite service (server/) that stores character-sheet
JSON blobs and returns short, content-addressed IDs, so sheets can be
shared via a compact ?s=<id> link instead of an oversized inline payload.

CharacterSheet.tsx now POSTs to the service on share and fetches by ID on
load, falling back to the self-contained ?c= inline link when the backend
is unreachable. Legacy ?c= links still decode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 01:44:15 +00:00
21c8bf5be1 perf: Shorten shared character sheet URLs
Use URL-safe base64 (base64url) for the ?c= payload so it no longer
needs percent-encoding, and prune empty string/array fields before
encoding. Decoding accepts standard base64, so existing links still load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 01:13:12 +00:00
6461039bd7 refactor: Migrate the app to TypeScript
Convert the React app from JS/JSX to TS/TSX and add type-checking:
- Rename sheet-main, book, BookIndex, CharacterSheet to .ts(x) and
  add types (Fields, Bond, ClassEntry, Spell, CheckMap; loose
  SavedData for abbreviated save/share payloads)
- Add globals.d.ts for CSS imports and the __BOOK_DATA__ global
- tsconfig.json (strict, noEmit) and a 'typecheck' npm script
- webpack: handle ts/tsx via @babel/preset-typescript
- Enforce types with a tracked pre-commit hook (core.hooksPath),
  wired up automatically via the 'prepare' script
- Update stale Justfile format target for the src/ layout

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 00:51:53 +00:00
0ba87ac547 chore: organize scripts 2026-06-17 00:03:04 +00:00
406641c522 chore: Organize PDFs 2026-06-17 00:02:30 +00:00
f462205463 feat: Printable character sheet 2026-06-16 02:10:22 +00:00
fcbd0acfb2 refactor: Move source files from root into src/
Relocates book.js, fabula-ultima-sheet.css, and fabula-ultima-sheet.html
into src/ to consolidate all source files under one directory. Updates
webpack entry points, HTML template path, and CSS import accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 04:14:30 +00:00
26d7a4a7fc refactor: Convert main page to React 2026-06-11 03:44:22 +00:00
e1efd7dd37 fix: Swap positions of max and current boxes for vitals 2026-06-11 02:30:41 +00:00
a44a54ff8a refactor: Convert book viewer to idiomatic React
Replace the SSR + injected vanilla-JS navigation script with a proper
client-side React app. BookIndex now uses useState/useEffect/useCallback
for all navigation state, scroll tracking, keyboard shortcuts, and history
management. webpack.config.js switches from renderToStaticMarkup to
embedding page data as window.__BOOK_DATA__ JSON; book.js becomes a
createRoot entry point. Also adds babel-loader for JSX bundling, fixes
#root display:contents so the flex height chain is preserved, and
restores missing CSS for header, .logo, .toolbar, and .tab buttons.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 02:12:29 +00:00
fe2b5bca0c bug: Formatting 2026-06-10 01:35:03 +00:00
17274235ed chore: Fix pipeline 2026-06-08 22:57:36 +00:00
6f5795b1e3 bug: Fix numbering on Table of Contents 2026-06-08 22:57:24 +00:00
8de734cee5 bug: Fix ugly margin on page header 2026-06-08 22:43:45 +00:00
b8ba7728db refactor: Extract inline book layout CSS to css/book-layout.css
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 22:40:33 +00:00
df68d1309d feat: Replace build.py with JSX-based webpack-native book index generation
Port the Python HTML-generation script to a React component (src/BookIndex.jsx)
rendered at build time via renderToStaticMarkup, removing the need to run
build.py separately before webpack.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 22:37:03 +00:00
3c3c5a332f bug: Fix page scroll detection and add browser history support
- Use getBoundingClientRect() in the scroll listener so the active-page
  threshold is measured relative to the content container rather than
  the document body, fixing off-by-one page detection.
- Replace history.replaceState with pushState for user-initiated
  navigation (sidebar, prev/next, keyboard) and add a popstate listener
  so the browser back/forward buttons work correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 22:26:48 +00:00
1977a5d966 bug: Fix incorrectly labled table 2026-06-08 22:22:11 +00:00
19798b703c bug: Fix incorrectly numbered list 2026-06-08 22:19:54 +00:00
1d837103c5 bug: Fix extraneous styling on h2 2026-06-08 22:17:14 +00:00
f7574aee21 bug: Update rare weapons tables 2026-06-08 22:13:31 +00:00
41d89cb632 bug: Fix issue with page links going to the wrong place 2026-06-08 21:48:52 +00:00
4dbdb12876 feat: Links to pages 2026-06-08 21:33:39 +00:00
006307a62e chore: formatting 2026-06-08 21:11:07 +00:00
373eb19fe4 chore: Remove extraneous CSS <link> 2026-06-07 00:32:36 +00:00
54d560980b chore: More formatting 2026-06-07 00:30:21 +00:00
b4ee0eb212 chore: Remove watermarks 2026-06-07 00:12:02 +00:00
74c4fc2c2a chore: Build pipeline for books/core 2026-06-06 23:44:13 +00:00
88a2778e6f chore: Format HTML in books/core 2026-06-06 23:44:01 +00:00
6a7e988ca0 bug: Remove extraneous pages in books/core 2026-06-06 23:33:41 +00:00
b4a31d9e56 feat: Combine all core book pages into a single scrollable index.html
Replaces the iframe-based viewer with a self-contained file where each
page is a <section id="page-N">. Navigation (sidebar, prev/next, arrow
keys, URL hash) scrolls to sections instead of loading separate files.
Added build.py to regenerate index.html from the individual page files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 23:08:28 +00:00
1de1377033 bug: Pages numbered correctly in books/core 2026-06-06 22:44:37 +00:00
75c6ab9975 feat: Add core rules 2026-06-06 13:03:00 +00:00
c75cd188c1 feat: Add book viewer at /book with shared design system
- Add html/index.html: book viewer with auto-discovering sidebar,
  prev/next navigation, keyboard shortcuts, and URL hash persistence
- Add html/book-page.css: shared stylesheet for all book pages derived
  from fabula-ultima-sheet.css (dark theme, CSS variables, Cinzel/
  Crimson Text fonts, common class styles)
- Add book.js entry point so webpack injects the shared CSS into the
  book viewer; update webpack.config.js for two entry points, split
  CSS chunk, CopyWebpackPlugin for book pages, and /book dev server
  rewrite rule
- Add scripts/strip_watermark.py: removes "Guest Customer (Order
  #52072168)" watermark artifacts from all 210 book pages
- Add scripts/restyle_book.py: strips per-page <style> blocks and
  injects <link rel="stylesheet" href="book-page.css"> into all pages
- Update Justfile deploy to scp -r dist/* for the new /book subtree

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 03:36:35 +00:00