Skip to content

Fix approved low-risk correctness issues - #96

Merged
LeoStehlik merged 3 commits into
masterfrom
fix/approved-low-risk-correctness-2026-09-16
Oct 5, 2026
Merged

LeoStehlik merged 3 commits into
masterfrom
fix/approved-low-risk-correctness-2026-09-16

Conversation

@LeoStehlik

Copy link
Copy Markdown
Contributor

Summary

  • Start commit: ead85ed
  • Slice 1: derive copied attachment upload filenames from the URL pathname basename only, decode valid percent escapes, tolerate malformed URLs/escapes, and use stable type fallbacks.
  • Slice 2: add an optional accessibilityDescription node attribute for image, uploaded video, Draw.io, and Excalidraw nodes, with menu editing, JSON/HTML parse-render persistence, static/shared HTML output, and no migration.
  • Slice 3: make share SEO metadata resolve the requested page title while preserving inherited-share, includeSubPages, workspace/space, requested-share, and restriction boundaries.

Root Causes And Fixes

  • Copied media reuploads used src.split("/").pop(), so cache-busting query/hash data could enter File.name. Added a WrenLore-native pathname basename helper and used it in paste reupload.
  • Media nodes had inconsistent or missing authored accessibility text support. Added a common persisted accessibilityDescription attribute and a small existing-toolbar modal action. Images/Draw.io/Excalidraw render authored descriptions as image alt; video uses aria-label on <video> because alt is invalid for video and aria-label provides a valid accessible name while preserving controls/source semantics.
  • The SEO route resolved an inherited share but used the shared ancestor title. Added metadata-only share resolution that returns the requested page title only after the same inherited-share and restriction boundaries pass.

Verification

  • pnpm exec tsx scripts/editor-media-regression.ts - passed
  • pnpm --dir apps/server test -- share.service.spec.ts share-seo.controller.spec.ts - passed
  • pnpm --dir apps/server test - passed, 29 suites / 168 tests
  • pnpm --dir packages/editor-ext build - passed
  • pnpm --dir apps/client build - passed
  • pnpm --dir apps/server build - passed
  • git diff --check HEAD - passed

Lint

  • pnpm --dir apps/client lint - blocked before file analysis by existing ESLint/AJV crash: NOT SUPPORTED: option missingRefs then TypeError: Cannot set properties of undefined (setting 'defaultMeta').
  • pnpm --dir apps/server lint - blocked by the same ESLint/AJV crash before file analysis.

Migration / Deployment

  • No database migration, content backfill, lockfile change, dependency change, deployment change, Redis/Hocuspocus/WebSocket/page-import/public-printing change, or live Meiller action is required.

Manual Smoke Still Needed

  • Copy/paste a Draw.io diagram with a ?t=... URL and confirm the reuploaded filename is clean.
  • Add, edit, clear, save, and reload descriptions for image, video, Draw.io, and Excalidraw.
  • Inspect live DOM/static shared HTML for alt on images/diagrams and aria-label on uploaded videos.
  • Open a direct share, an inherited child share, and a restricted child to confirm metadata title behavior and no restricted-title disclosure.

Screenshots

  • Not attached from this headless run; the UI change is the single Accessibility description icon/modal in the existing media bubble toolbar.

@LeoStehlik
LeoStehlik merged commit 0a90656 into master Oct 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant