Skip to content

Consumer enablement for @plannotator/ui (0.24.0)#1017

Merged
backnotprop merged 7 commits into
mainfrom
feat/ui-consumer-enablement
Jul 8, 2026
Merged

Consumer enablement for @plannotator/ui (0.24.0)#1017
backnotprop merged 7 commits into
mainfrom
feat/ui-consumer-enablement

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

What

Six consumer-enablement items accumulated through Workspaces' first three integration slices — all additive, every default reproduces 0.23.0 behavior. Plannotator's own apps are unchanged.

  1. AnnotationPanel host props: renderCardFooter (per-card slot for reply/resolve UI; slot clicks don't select the card) + readOnly (hides delete/edit on all card kinds)
  2. Six exports blessed into the strict-consumer gate + HANDOFF supported-imports table: TableOfContents, ResizeHandle, useResizablePanel, useActiveSection, useScrollViewport, utils/annotationHelpers — all verified strict-clean and backend-free
  3. Viewer allowImages: threads to both CommentPopover sites so hosts without an upload backend never show a dead-end attach button
  4. Viewer readOnly: suppresses every composer entry point (selection toolbar via the highlighter's enabled, pinpoint, global comment, attachments, checkbox toggles); existing annotations still render and select
  5. Strict-consumer gate now enforces verbatimModuleSyntax + noUnusedLocals + noUnusedParameters; fixed the 24 source violations they surfaced
  6. Content-verifying restore (opt-in, separate commit): verifyRestoredContent on useAnnotationHighlighter — a position-based restore that paints the wrong text after document drift is removed and re-anchored by text search; onRestoreMismatch reports unrecoverable anchors. Workspaces hit this live.

Verification

  • New DOM test files (registered in the CI DOM batch): AnnotationPanel.props.test.tsx, Viewer.consumer.test.tsx, annotationRestoreVerify.test.tsx — 12 new tests
  • Full suite: 1967 pass / 0 fail; monorepo typecheck incl. the tightened strict gate; review + hook builds green
  • HANDOFF.md: "Consumer enablement (0.24.0)" section + supported-imports table updates

Release

Version bumped to 0.24.0; publish is owner-gated (Workspaces consumes it for their comments-parity slice).

Per-card footer slot for host reply/resolve UI (clicks inside don't
select the card); readOnly hides delete/edit on all card kinds.
Both optional, both no-op by default — Plannotator unchanged.
TableOfContents, ResizeHandle, useResizablePanel, useActiveSection,
useScrollViewport, utils/annotationHelpers — verified strict-clean and
backend-free (useResizablePanel persists via the storageBackend seam);
added to the gate and the HANDOFF supported-imports table.
allowImages threads to both CommentPopover sites (popover already gated
its attach affordance; Viewer never exposed the knob). readOnly
suppresses every composer entry point — selection toolbar (highlighter
'enabled'), pinpoint, global comment, attachments, checkbox toggles —
while existing annotations still render and select.
Both default to today's behavior.
…ocals/Parameters

Fixed the 24 violations the flags surfaced across the supported-import
graph: type-only imports (verbatimModuleSyntax) and dead imports/locals.
Consumers with stricter tsconfigs no longer have to relax them.
verifyRestoredContent on useAnnotationHighlighter: after a meta-based
fromStore restore, the painted text is checked against originalText
(whitespace-normalized). Mismatch -> highlight removed, text-search
fallback re-anchors; if that fails too, onRestoreMismatch(annotation,
restoredText) fires and nothing is painted. Default off — today's
trust-the-positions behavior. Workspaces hit this live after document
drift; correctness upgrade for every consumer.
@backnotprop backnotprop merged commit e20fd97 into main Jul 8, 2026
13 checks passed
@backnotprop backnotprop deleted the feat/ui-consumer-enablement branch July 8, 2026 02:09
@backnotprop

Copy link
Copy Markdown
Owner Author

This is now released in version 0.23.0

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