v5.9.2 23 February 2026 Improvement

Docs: Static Page Overhaul, Scroll-Sync Code Panel & Mobile Responsiveness

Static page overhaul

All 17 static documentation pages on docs.speybooks.com have been audited, corrected, and rewritten where necessary. Every page now uses accurate endpoints from the live API, correct pricing, and honest feature claims.

Critical fixes

  • VAT Returns - removed false claim that SpeyBooks is “HMRC-recognised for MTD VAT submissions”. Replaced with accurate language: SpeyBooks generates MTD-compliant nine-box VAT return data, with direct HMRC submission on the roadmap. Removed fabricated /v1/vat/submit and /v1/vat/submissions endpoints that do not exist. Page now references the real GET /v1/reports/vat endpoint.
  • Bank Reconciliation - replaced fabricated /v1/bank/import and /v1/bank/transactions/*/match endpoints with real ones: /v1/bank-imports/upload, /v1/transactions/{id}/categorise, /v1/transactions/{id}/reconcile. Added Universal Ingestion Engine documentation, Smart Map column remapping, balance proof verification, and the categorisation rules engine with confidence scoring.
  • CSV Import - removed “Coming soon” labels for invoices and opening balances (both shipped). Documented all five import pipelines with real endpoints: bank imports, contact imports, opening balances, invoice imports, and bill imports. Added migration wizard reference.
  • Dividends - corrected pricing from £24.95 to £25/month. Added retained profit check, board minutes, dividend tax calculator, void with reversal journals, and dividend summary. Changed freetext shareholder field to linked director record matching the actual API shape.
  • Authentication - added scoped API keys with all 17 granular permissions, key rotation via API, idempotency keys with 24-hour expiry, and corrected response envelope to include meta field.

Content improvements

  • Quick Start - corrected trial terms (90-day for first 50 users, card required), added Developer Shell section, updated response format with meta field.
  • Introduction - rewritten with accurate feature inventory (197 endpoints, 37 resources), correct pricing table, and honest MTD-ready language.
  • Multi-Currency - removed from documentation. Feature needs further development before public documentation is appropriate.

Consistency fixes

  • Response format - all code examples now show the correct { success, data, meta } envelope rather than the outdated { success, data } format.

Scroll-sync code panel

Guide pages on the documentation site now display API code examples in a sticky right-hand panel that follows you as you read.

  • Prose and code stay in sync - as you scroll through a guide, the code panel highlights and scrolls to the relevant request or response. The panel uses minimal-scroll logic so previous code blocks remain visible for context.
  • Built from frontmatter - code blocks are defined in each page’s frontmatter with explicit sync points mapping sections to code blocks. No raw HTML in markdown.
  • Responsive stacking - on screens narrower than 1200px, the layout falls back to a clean single-column stack with code blocks inline. No horizontal overflow, no broken layouts.

Infrastructure

  • static-pages.ts v2.0 - extended frontmatter parser to extract codeBlocks array with id, label, lang, method, path, status, and multiline code fields. Backwards compatible - pages without code blocks render identically.
  • CodeBlock.astro - added optional id prop for scroll-sync DOM targeting.
  • code-sync.js - new IntersectionObserver-based scroll sync script. Pauses auto-scroll for 1.5 seconds after manual interaction with the code panel. Disconnects on mobile viewports where the panel is stacked.

Mobile responsiveness

The documentation site now renders correctly across all mobile viewports.

  • Tables scroll horizontally - wide tables (error codes, account lists, scope tables) are swipeable on mobile rather than being clipped.
  • Code blocks constrained - prose code blocks and the right-hand code panel respect their container width.
  • Inline code wraps - long identifiers break cleanly instead of forcing horizontal overflow.
  • Search overlay keyboard fix - the search modal anchors to the top of the screen on mobile so the virtual keyboard does not squash the results area.

Search improvements

  • Race condition fixed - fast typers no longer see a false “Search unavailable” message when Pagefind is still loading.
  • Background scroll locked - the page behind the search modal no longer scrolls when the modal is open.
  • First result auto-selected - pressing Enter immediately opens the top result without needing to arrow-key down first.
  • Migration moved to Import & Migration - the Migration resource (10 endpoints) was incorrectly nested under the Admin category due to a singular/plural tag mismatch in the OpenAPI spec generator. Fixed the x-tagGroups mapping and regenerated both snapshots.

Bug fixes

  • Fixed position: sticky failure on the code panel caused by an overflow-x property on a parent container.
  • Fixed code block styling on guide pages where custom labels generated unrecognised CSS modifier classes.