feat: zero-book launch, candlelit design system, and full audit fixes - #9
Merged
Merged
Conversation
Adds .gitattributes (adapted from kalchar) so text files are always LF, pins Prettier endOfLine to lf, and renormalizes every tracked file once. This also clears the 30 phantom line-ending-only diffs that sat in .claude/skills and makes `prettier --check .` pass cross-platform.
Removes the three placeholder seed books and the sample chapter; the
library now opens genuinely empty and reads as intent, not absence.
Design system (patterns studied from kalchar and portfolio-react):
- tiered OKLCH tokens with a warm-ink elevation ladder
(--shadow-hairline, --shadow-e1..e4) replacing raw shadows
- ambient candlelight backdrop: dot lattice, drifting radial glow,
edge vignette (fixed, decorative, pointer-events none)
- SVG paper-grain turbulence layer, no image asset
- tilted-plate hero ("Chapter One is being written") and crafted
per-shelf empty states with ghost book spines
- "How this library works" colophon
- skip-to-content link + sticky-header scroll padding
- [hidden] { display: none !important } so native hidden always beats
component display rules (fixes always-open panels and the blank
continue-reading card)
- grid tracks via minmax(min(100%, NNrem), 1fr) -- no horizontal
overflow at 320px
- every animation now has a prefers-reduced-motion path; the
anti-reduced-motion house rule in .impeccable.md is reversed
- favicon replaced with the masthead flame mark
src/content/books/README.md documents the authoring contract so the
empty collection stays ready for the first real book.
Progress (previously destroyed on load): - saved position is read before anything writes; persistence only starts after real engagement (scroll or 3s dwell), so a quick load/reload never clobbers it - storage writes debounced (250ms) plus pagehide/visibilitychange flush, instead of synchronous JSON on every animation frame - chapters shorter than the viewport count as 100% read Keyboard/swipe navigation: - arrows / h,l no longer fire from focused links, buttons, or form controls, and respect Alt/Shift as well as Ctrl/Meta Accessibility and structure: - reader script moved inside the layout (was emitted after </html>) - prefs panel uses fieldset/legend; text-size buttons get real accessible names (Small/Default/Large/Extra large text) - TTS toggle drops its stale fixed aria-label so Pause/Resume is the accessible name - pager nav renders only when a prev/next chapter exists (no empty landmark on single-chapter books) - resume scroll honors prefers-reduced-motion - chapter pages emit Chapter JSON-LD, article:published_time, and an excerpt-based meta description; book pages emit Book JSON-LD
Schema (src/content.config.ts):
- z imported from astro/zod (clears all deprecation hints)
- order must be a positive integer
- pdfUrl/audioUrl/cover restricted to https:// or site-relative
- fanfic books must declare `universe`
Cross-file invariants (scripts/verify-content.mjs, pnpm verify:content):
- orphan chapters, duplicate orders, NN- prefix mismatch, future or
missing publishedOn
Markdown: markdown.processor = satteri({ features: { smartPunctuation:
false } }) replaces the deprecated smartypants flag; the house dash
rule is preserved.
RSS: items now carry excerpt descriptions.
Writing history: one `git log --name-only` pass per build, cached,
instead of one child process per chapter. --follow is dropped, so a
renamed chapter restarts its visible history -- acceptable for the
public writing log.
CI (.github/workflows/ci.yml): least-privilege permissions, frozen lockfile install, format check, content invariants, astro check, build, and browser smoke tests on every PR and push to main. Deploy workflow: job-scoped permissions (build is read-only; only the deploy job gets pages/id-token) and pnpm pinned to 11.10.0 instead of pnpm@latest. package.json gains the packageManager field. Tests (desktop / Pixel 7 / 320px projects, run against the production build via astro preview): - site.spec.ts: shell rendering, crafted empty states, hidden continue-card actually display:none, zero horizontal overflow, skip link, inert decorative layers, RSS/sitemap/404, reduced-motion freeze - reader.spec.ts: collapsed panels, progress surviving reload, arrow keys on focused controls, theme persistence. These skip cleanly at zero chapters and were verified green against a temporary fixture book before it was removed.
- CHANGELOG.md added with 0.2.0 (this release) and 0.1.0 (all previously unversioned merged work, PRs #1-#8) - README and CLAUDE.md rewritten to describe the actual product: client-side reader platform, zero-book launch, real test commands, satteri markdown gotcha - frontend-quality skill: reduced-motion path is now mandatory (was explicitly forbidden), zero-client-JS claim corrected - revise-chapter can no longer set publishedOn -- publishing stays behind the publish-chapter gates - outline-book names _outline.md consistently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Zero-book launch: the three placeholder seed books are removed, the shelves open honestly empty with crafted states, and every finding from the full repo audit is fixed. UI patterns were studied in detail from the kalchar, portfolio-react, and ledger-sync siblings and adapted to the candlelit identity.
Design system (new)
--shadow-hairline,--shadow-e1..e4) -- no raw black shadowsAudit fixes
[hidden]always computes todisplay:none(panels no longer render open; blank Continue card gone)</html>)minmax(min(100%, NNrem), 1fr))prefers-reduced-motionsupport; the anti-reduced-motion house rule is reverseduniverserequired for fanfic;astro/zodimport clears all 22 deprecation hintsmarkdown.processor: satteri({ features: { smartPunctuation: false } })replaces deprecatedsmartypantsarticle:published_time, excerpt meta descriptions, RSS item descriptions<(script-breakout hardening)git logper build instead of per-chapter processes.gitattributes(also resolved 30 phantom line-ending diffs), PrettierendOfLine: lfpnpm verify:contentcross-file invariantsrevise-chapterpublishing bypass,outline-bookfilename)Testing
pnpm format:check,pnpm verify:content,pnpm check(0 errors / 0 warnings / 0 hints),pnpm build-- all green on the committed stateBlocked / notes
workflowscope needed to add.github/workflows/ci.ymlover https