Skip to content

v0.10.0: Merge upstream (API admin, modern-dark theme, AI docs)

Choose a tag to compare

@emichaud emichaud released this 18 Jun 01:06

Merges 25 commits from django-smallstack v0.10.0 into the Tabler-themed downstream, with theme integration so the new pages render cleanly inside the Tabler chrome.

What's New from Upstream

API admin module — apps/api/

  • /smallstack/api/health/ — schema validity, endpoint registry, Swagger / ReDoc shell checks, OpenAPI 3.0.3 validation. Same checks as manage.py api_doctor — refresh to re-run.
  • /smallstack/api/activity/ — per-endpoint operational view: top endpoints over 24h with hits / avg latency / error rate, recent /api requests with filters (method, status, IP, user, scanner-UA-only), threat-signals panel surfacing axes lockouts, auth-failure bursts, path scanning, request bursts, scanner user-agents, revoked-token use
  • api_doctor management command — health checks + self-test (schema · openapi · sample)
  • Dashboard widget on /smallstack/
  • Nav entry "API Health" in the staff sidebar

Modern-dark theme overhaul (upstream base)

Upstream rebuilt the SmallStack default palette system: cool-biased near-black surfaces (#161b22 cards), vibrant Tailwind-style accents (django→emerald, blue, purple, orange, high-contrast). Introduces the --accent-band-bg variable as a single-point band override.

This downstream uses Tabler, so the modern-dark theme is not in use here — but the new SmallStack templates still work because tabler_overrides.css aliases the SmallStack variable names (--primary, --card-bg, --body-fg, etc.) to their --tblr-* equivalents. No template rewrites needed.

AI docs (upstream)

  • docs/skills/cli-tools.md — task → tool / failure → tool decision tree
  • docs/skills/modern-dark-theme.md — upstream base theme patterns (NOT in use in this downstream)
  • docs/skills/modify-palettes.md — upstream palette guide
  • docs/skills/api-doctor.md — API admin pages reference
  • Project-level CLAUDE.md at the repo root

Tabler Integration

Two Tabler-specific adjustments sit on top of the merge:

  • docs/skills/README.md — the conflict in the "before X, read Y" section was resolved by keeping tabler-ui.md as the read-first for any page work in this downstream, surfacing cli-tools.md for operational tasks, and explicitly noting that modern-dark-theme.md / modify-palettes.md describe the upstream base theme that does NOT apply here
  • Root CLAUDE.md rewrite — replaces upstream's modern-dark-theme-centric guidance with a Tabler-aware version that routes AI agents to docs/skills/tabler/*.md, documents the apps/tabler/ structure (bridge templates, CSS overrides, theme engine), and explains the SmallStack-var aliasing strategy. Includes Tabler-specific anti-patterns ("don't follow modern-dark-theme.md", "don't forget to re-init Bootstrap JS after htmx swaps", etc.)

No CSS work was needed for the new /smallstack/api/health/ and /smallstack/api/activity/ pages — they use the same SmallStack classes/vars (.page-header-bleed, .page-header-with-actions, .crud-form, var(--primary), var(--card-bg), var(--body-fg), var(--body-quiet-color), var(--success-fg)) that were already aliased and ported into tabler_overrides.css during the v0.9.2 merge. Verified visually with shot-scraper.

Stats

  • 749 tests passing, 26 starter_content tests deselected (intentional), 74% coverage
  • 1 new Django app registered (apps.api); existing apps.preview / apps.mcp / apps.tokenmgr retained
  • No new migrations needed
  • openapi-spec-validator (dev extras) required to run the new OpenAPI validity test — uv sync --all-extras handles it

Upgrade

git pull origin main
make setup    # uv sync + migrate + create_dev_superuser
uv sync --all-extras   # for the new openapi-spec-validator dev dep

🤖 Co-Authored-By: Claude Opus 4.7 (1M context)