Refresh public content rendering and presentation #59

Merged
erik merged 2 commits from feat/task-f79f9b23-content-presentation into main 2026-10-25 21:17:44 -05:00
Owner

Summary

Implements task-f79f9b23 as a selective port from Slugkit template ac34f5e.

  • Replace handwritten Markdown rendering with stable Markdown-it 15.0.3, with native types, HTML disabled, safe external links and semantic leading-H1 suppression (including inline formatting).
  • Prefer explicit banners for cards/feed/metadata, retaining view-only legacy image fallbacks without rewriting content; nonce-protected failed-banner handling leaves inline images alone.
  • Port bounded article cards, shared article/link sidebars, rich external previews, published-only relationship feeds, associated contact sources and canonical full profile handles.
  • Reimport deterministic media keys by updating the existing metadata row, retaining IDs/creation times and article references.
  • Add regression coverage, documentation and a loopback-only, in-memory browser fixture.

Preserved boundaries

No setup wizard, content/data migration, production storage writes, actor/key changes, release publication, deployment or homelab changes. Branding, release tooling and recent security/runtime work remain intact. /api/1.1.0, packaged OpenAPI compliance, exact-version documentation, contract archive/discovery, historical schema bytes and strict publish-body validation are unchanged.

Verification

  • ./scripts/pre-pr.sh: passed (format, typecheck, CSS/build reproducibility, 581 tests in 60 files, including local-only integration tests).
  • Existing public /articles and /posts/slug-cli-init reviewed read-only; regression fixtures cover its formatted title, inline banner and CLI code patterns.
  • Browser verification on isolated http://localhost:4175 is in progress; desktop cards all measure 496px tall. Completion evidence will be posted before merge.
  • CI and fresh-context independent review pending before merge. CI continues to run only npm run test:ci (no integration/browser/container/federation verification in CI).

Documentation: docs/content-rendering.md.

## Summary Implements task-f79f9b23 as a selective port from Slugkit template ac34f5e. - Replace handwritten Markdown rendering with stable Markdown-it 15.0.3, with native types, HTML disabled, safe external links and semantic leading-H1 suppression (including inline formatting). - Prefer explicit banners for cards/feed/metadata, retaining view-only legacy image fallbacks without rewriting content; nonce-protected failed-banner handling leaves inline images alone. - Port bounded article cards, shared article/link sidebars, rich external previews, published-only relationship feeds, associated contact sources and canonical full profile handles. - Reimport deterministic media keys by updating the existing metadata row, retaining IDs/creation times and article references. - Add regression coverage, documentation and a loopback-only, in-memory browser fixture. ## Preserved boundaries No setup wizard, content/data migration, production storage writes, actor/key changes, release publication, deployment or homelab changes. Branding, release tooling and recent security/runtime work remain intact. `/api/1.1.0`, packaged OpenAPI compliance, exact-version documentation, contract archive/discovery, historical schema bytes and strict publish-body validation are unchanged. ## Verification - `./scripts/pre-pr.sh`: passed (format, typecheck, CSS/build reproducibility, 581 tests in 60 files, including local-only integration tests). - Existing public `/articles` and `/posts/slug-cli-init` reviewed read-only; regression fixtures cover its formatted title, inline banner and CLI code patterns. - Browser verification on isolated `http://localhost:4175` is in progress; desktop cards all measure 496px tall. Completion evidence will be posted before merge. - CI and fresh-context independent review pending before merge. CI continues to run only `npm run test:ci` (no integration/browser/container/federation verification in CI). Documentation: `docs/content-rendering.md`.
feat: refresh public content rendering and presentation
All checks were successful
CI / verify (pull_request) Successful in 49s
061eadf411
fix: retain card actions and handle failed link banners
All checks were successful
CI / verify (pull_request) Successful in 42s
c9524aea32
Author
Owner

Review and verification complete

Fresh-context, read-only Pi review identified two P2 defects: clipping at wide single-column card widths and missing failed-image handling for link-preview banners. Both were fixed in c9524ae; independent re-review reports no actionable findings and confirms both fixes by source inspection. The reviewer did not independently run tests/browser/CI; those checks were performed by the implementing agent.

Verification on current head:

  • ./scripts/pre-pr.sh passed: formatting, typecheck, build, generated CSS reproducibility and 581 tests in 60 files (local-only integration suite included).
  • Forgejo verify PR run #60 succeeded for exact head c9524aea32. CI retains test:ci, excluding integration tests.
  • Local browser fixture on loopback/in-memory SQLite verified desktop/mobile cards; explicit banners; semantic Markdown; formatted-title suppression with preserved legacy inline images; canonical full handles; contact/source relationship feeds; rich/sparse link details; selective image-error handling; anonymous draft 404 and marked synthetic-owner preview. No JavaScript page errors were recorded.
  • Reproduced original 740px card clipping (action bottom 721.8px beyond card bottom 704px); capped artwork now keeps all six card actions inside their cards at viewport widths 540, 639, 640, 740, 767, 768, 1024 and 1280. Separate 375px checks show readable cards/article-first layout with no horizontal overflow.
  • Real browser image failures now remove article and link-preview banners while retaining the unmarked inline content image.
  • Existing public article index and slug-cli-init article reviewed read-only; no production content/media writes.

Main implementation files: src/templates/public.tsx, src/templates/markdown.ts, src/templates/post-banner-script.ts, src/routes/home.ts, src/sources/sources.ts, src/media/media.ts, generated styles and focused regression tests. Behavior/verification documented in docs/content-rendering.md; explicit local fixture in scripts/presentation-browser-fixture.ts.

Preserved: branding, existing stored content/references, nonce/CSRF protections, security/federation/readiness work, exact-version API/docs, packaged OpenAPI/archive/schema discovery, strict publish-body validation and release tooling. No setup gate, release publication, deployment, homelab change or live federation write.

Review artifacts (local): /tmp/slugkit-com-presentation-independent-review.txt and /tmp/slugkit-com-presentation-independent-review-v2.txt.

## Review and verification complete Fresh-context, read-only Pi review identified two P2 defects: clipping at wide single-column card widths and missing failed-image handling for link-preview banners. Both were fixed in c9524ae; independent re-review reports **no actionable findings** and confirms both fixes by source inspection. The reviewer did not independently run tests/browser/CI; those checks were performed by the implementing agent. Verification on current head: - `./scripts/pre-pr.sh` passed: formatting, typecheck, build, generated CSS reproducibility and **581 tests in 60 files** (local-only integration suite included). - Forgejo `verify` PR run #60 succeeded for exact head c9524aea32. CI retains `test:ci`, excluding integration tests. - Local browser fixture on loopback/in-memory SQLite verified desktop/mobile cards; explicit banners; semantic Markdown; formatted-title suppression with preserved legacy inline images; canonical full handles; contact/source relationship feeds; rich/sparse link details; selective image-error handling; anonymous draft 404 and marked synthetic-owner preview. No JavaScript page errors were recorded. - Reproduced original 740px card clipping (action bottom 721.8px beyond card bottom 704px); capped artwork now keeps all six card actions inside their cards at viewport widths 540, 639, 640, 740, 767, 768, 1024 and 1280. Separate 375px checks show readable cards/article-first layout with no horizontal overflow. - Real browser image failures now remove article and link-preview banners while retaining the unmarked inline content image. - Existing public article index and slug-cli-init article reviewed read-only; no production content/media writes. Main implementation files: `src/templates/public.tsx`, `src/templates/markdown.ts`, `src/templates/post-banner-script.ts`, `src/routes/home.ts`, `src/sources/sources.ts`, `src/media/media.ts`, generated styles and focused regression tests. Behavior/verification documented in `docs/content-rendering.md`; explicit local fixture in `scripts/presentation-browser-fixture.ts`. Preserved: branding, existing stored content/references, nonce/CSRF protections, security/federation/readiness work, exact-version API/docs, packaged OpenAPI/archive/schema discovery, strict publish-body validation and release tooling. No setup gate, release publication, deployment, homelab change or live federation write. Review artifacts (local): `/tmp/slugkit-com-presentation-independent-review.txt` and `/tmp/slugkit-com-presentation-independent-review-v2.txt`.
erik merged commit 95231aec8c into main 2026-10-25 21:17:44 -05:00
erik deleted branch feat/task-f79f9b23-content-presentation 2026-10-25 21:17:44 -05:00
Author
Owner

Published and deployed: web-v0.1.39

User explicitly approved release 0.1.39 and automatic production rollout, then instructed: publish without the data backups. No production data backup was created.

  • Release tag web-v0.1.39 points to 95231aec8cf1f371fdc2b77acc9364fa0d5084ca.
  • Forgejo release build #62 succeeded in 4m44s.
  • Published evcraddock/slugkit-com:0.1.39 for linux/amd64 and linux/arm64.
  • Manifest digest: sha256:c2d16ae8c571042c562453da3d7a70419537aba1c0935bc979e9a3df3eda1b77; latest resolves to the same digest.
  • Flux automatically committed only the image bump in homelab commit 77fd608b61f93888fee06c82c9399c400ead47ab. No manual Kubernetes or homelab configuration change was made.
  • Flux source and Kustomization reconciled that revision. Deployment rollout succeeded; the new pod is Ready with zero restarts and the published image digest.

Verification

  • Release preflight passed: formatting/typecheck/build/CSS reproducibility and 581 tests/60 files.
  • Local Docker build and isolated ephemeral-container smoke test passed, including /ready, API health and the native healthcheck. Smoke container removed afterward.
  • https://slugkit.com/ready and https://www.slugkit.com/ready report status ready, version 0.1.39 and database pass.
  • Public liveness/API health report 0.1.39. Exact-version API metadata remains canonical.
  • Advertised 1.1.0 OpenAPI bytes match both the packaged spec and pre-deployment SHA-256. The archive index is unchanged. Exact-version docs return 200 with CSP nonces matching their trusted scripts.
  • Read-only actor/WebFinger/key checks preserve actor URL, username, public key ID, public key fingerprint and public key document digest. No live Follow/profile/publish test writes were performed.
  • Initial startup logs show database ready, zero pending migrations and listening; no error-like lines were present in the ten lines examined.
  • Browser confirms the existing article's original banner loads and canonical @slug@slugkit.com handle displays. No JavaScript page errors recorded.

Remaining presentation finding — not a fully passing visual audit

The existing /posts/slug-cli-init article still repeats its title: the stored body begins with an image paragraph before the matching H1. The renderer suppresses only a matching leading H1, so this banner-before-heading case remains outside that handling. Browser inspection shows two H1s. The local compatibility fixture exercised title-before-banner ordering, not this actual production ordering.

This finding was not hidden or marked passed. Production content was not rewritten, no unapproved patch release or rollback was performed, and the browser checklist retains article-title as unmet. A follow-up renderer fix and regression case require the normal approved development/release workflow.

Local verification reports: /tmp/slugkit-com-release-before.json and /tmp/slugkit-com-release-after.json contain only public metadata/hashes and health results, not database backups or secret contents. Website checkout remains clean on main.

## Published and deployed: web-v0.1.39 User explicitly approved release 0.1.39 and automatic production rollout, then instructed: publish without the data backups. No production data backup was created. - Release tag `web-v0.1.39` points to `95231aec8cf1f371fdc2b77acc9364fa0d5084ca`. - Forgejo release build #62 succeeded in 4m44s. - Published `evcraddock/slugkit-com:0.1.39` for `linux/amd64` and `linux/arm64`. - Manifest digest: `sha256:c2d16ae8c571042c562453da3d7a70419537aba1c0935bc979e9a3df3eda1b77`; `latest` resolves to the same digest. - Flux automatically committed only the image bump in homelab commit `77fd608b61f93888fee06c82c9399c400ead47ab`. No manual Kubernetes or homelab configuration change was made. - Flux source and Kustomization reconciled that revision. Deployment rollout succeeded; the new pod is Ready with zero restarts and the published image digest. ### Verification - Release preflight passed: formatting/typecheck/build/CSS reproducibility and 581 tests/60 files. - Local Docker build and isolated ephemeral-container smoke test passed, including `/ready`, API health and the native healthcheck. Smoke container removed afterward. - `https://slugkit.com/ready` and `https://www.slugkit.com/ready` report status ready, version 0.1.39 and database pass. - Public liveness/API health report 0.1.39. Exact-version API metadata remains canonical. - Advertised 1.1.0 OpenAPI bytes match both the packaged spec and pre-deployment SHA-256. The archive index is unchanged. Exact-version docs return 200 with CSP nonces matching their trusted scripts. - Read-only actor/WebFinger/key checks preserve actor URL, username, public key ID, public key fingerprint and public key document digest. No live Follow/profile/publish test writes were performed. - Initial startup logs show database ready, zero pending migrations and listening; no error-like lines were present in the ten lines examined. - Browser confirms the existing article's original banner loads and canonical `@slug@slugkit.com` handle displays. No JavaScript page errors recorded. ### Remaining presentation finding — not a fully passing visual audit The existing `/posts/slug-cli-init` article still repeats its title: the stored body begins with an image paragraph before the matching H1. The renderer suppresses only a matching leading H1, so this banner-before-heading case remains outside that handling. Browser inspection shows two H1s. The local compatibility fixture exercised title-before-banner ordering, not this actual production ordering. This finding was not hidden or marked passed. Production content was not rewritten, no unapproved patch release or rollback was performed, and the browser checklist retains `article-title` as unmet. A follow-up renderer fix and regression case require the normal approved development/release workflow. Local verification reports: `/tmp/slugkit-com-release-before.json` and `/tmp/slugkit-com-release-after.json` contain only public metadata/hashes and health results, not database backups or secret contents. Website checkout remains clean on main.
Sign in to join this conversation.
No description provided.