Skip to content

chore: add Backlog.md project for Sätteri migration plan#172

Open
mosugi wants to merge 20 commits into
mainfrom
claude/article-analysis-repo-impact-IZUeZ
Open

chore: add Backlog.md project for Sätteri migration plan#172
mosugi wants to merge 20 commits into
mainfrom
claude/article-analysis-repo-impact-IZUeZ

Conversation

@mosugi

@mosugi mosugi commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Tracks the 6-task plan for adapting notro to Astro 6.4's new
markdown.processor API and eventual Sätteri support:

  • TASK-1 (high): migrate @astrojs/mdx to processor: unified() API
  • TASK-2 (high): guard MDX pipeline against satteri() inheritance
  • TASK-3 (medium): track Astro 8.0 API removal
  • TASK-4 (low): port remarkNfm to Sätteri MDASTP plugin
  • TASK-5 (low): port core rehype plugins to Sätteri HAST plugins
  • TASK-6 (low): add notro() processor option for Sätteri support

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe

claude added 3 commits June 6, 2026 00:14
Tracks the 6-task plan for adapting notro to Astro 6.4's new
markdown.processor API and eventual Sätteri support:

- TASK-1 (high): migrate @astrojs/mdx to processor: unified() API
- TASK-2 (high): guard MDX pipeline against satteri() inheritance
- TASK-3 (medium): track Astro 8.0 API removal
- TASK-4 (low): port remarkNfm to Sätteri MDASTP plugin
- TASK-5 (low): port core rehype plugins to Sätteri HAST plugins
- TASK-6 (low): add notro() processor option for Sätteri support

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
- Merge TASK-2 (guard MDX pipeline) into TASK-1 — the explicit
  processor: unified() in TASK-1 already covers the guard
- Rewrite TASK-4: fix incorrect architecture description. The 15 fixes
  in preprocessNotionMarkdown() are pre-parse string transforms and
  cannot be MDASTP plugins; they are also irrelevant for user-authored
  .mdx files. Only the callout MDASTP conversion needs porting.
- Update TASK-5: add dependencies: [TASK-4], document the two open
  questions (PascalCase rename with oxc-based MDX, resolvePageLinksPlugin
  runtime params)
- Add dependencies to TASK-3 ([TASK-1]) and TASK-6 ([TASK-4, TASK-5])

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
…ed() API

- Migrate notro() integration from deprecated mdx({ remarkPlugins, rehypePlugins })
  to mdx({ processor: unified({ ... }) }) — fixes Astro 6.4 deprecation warnings
- Add processor: satteri() opt-in to NotroOptions; notro injects its callout
  MDASTP plugin automatically so :::callout directives work in .mdx files
- Add satteri-plugins.ts with notroCalloutPlugin (containerDirective → mdxJsxFlowElement)
- Upgrade @astrojs/mdx to ^6.0.2, add @astrojs/markdown-satteri and satteri deps
- Update backlog tasks TASK-1/4/5/6 to Done

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
@changeset-bot

changeset-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9238a9d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
notro-loader Major
rehype-beautiful-mermaid Minor
notro-basics Patch
notro-blank Patch
notro-blog Patch
notro-docs Patch
notro-gallery Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notro-basics Ready Ready Preview, Comment Jun 10, 2026 2:04pm
notro-blank Ready Ready Preview, Comment Jun 10, 2026 2:04pm
notro-blog Ready Ready Preview, Comment Jun 10, 2026 2:04pm
notro-docs Ready Ready Preview, Comment Jun 10, 2026 2:04pm
notro-gallery Ready Ready Preview, Comment Jun 10, 2026 2:04pm

Request Review

TASK-7: features.directive never enabled — :::callout silently broken
TASK-8: buildSatteriMdastPlugins() dead code / integration coupling
TASK-9: non-Sätteri custom processor silently discarded

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
- Set processor.options.features.directive = true before injecting plugins
  so :::callout{...} blocks are parsed as containerDirective nodes (TASK-7)
- Use buildSatteriMdastPlugins() in integration.ts instead of pushing
  notroCalloutPlugin directly, making satteri-plugins.ts the single source
  of truth for the Sätteri plugin list (TASK-8)
- Emit console.warn when a non-null non-Sätteri processor is passed and
  silently replaced with unified() (TASK-9)

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
… note

Astro 8.0 has not been released yet (currently on 6.4.4). TASK-1 already
migrated notro to processor: unified() ahead of the removal. Remaining
criteria are blocked until Astro 8.0 ships.

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
TASK-1 already fully migrated notro to processor: unified(), so notro no
longer uses any deprecated APIs that would break under Astro 8.0.

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
…nfig

When the user sets markdown.processor: satteri() in defineConfig, notro()
now automatically detects it and uses Sätteri for .mdx files too — no need
to also pass processor: satteri() to notro() explicitly.

Explicit processor option still takes precedence when provided. Non-Satteri
global processors are silently ignored (no warning, falls back to unified).
The TASK-9 warning only fires for explicitly passed unsupported processors.

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
Pass syntaxHighlight + shikiConfig directly to mdx() as MdxOptions
instead of routing through updateConfig({ markdown: {...} }), which
did not propagate to @astrojs/mdx's Sätteri integration.

Add dark fallback background (#161b22) to .notro-markdown pre so
Notion content code blocks are visually styled even without Shiki
(Notion path uses evaluate() with no plugins; Shiki inline styles
from static .mdx files override the CSS fallback automatically).

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
These templates were pinned to ^6.0.4 (resolved to 6.1.3) while
notro-loader's types are compiled against astro@6.4.4. The mismatch
caused a TypeScript error at astro check time:

  AstroIntegrationLogger is missing properties: flush, close

These methods were added in astro@6.4.4. Bump all templates to the
same version so types are consistent.

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
Fix 14 (element renaming) was applying ELEMENT_RENAME_RE to content inside
backtick inline code spans, causing `<table_of_contents/>` to be renamed to
`<TableOfContents/>`. populateToc() (also without code span protection) then
expanded this into the full TOC block, breaking surrounding table cell structure
and producing "Expected a closing tag before end of paragraph" MDX errors.

Fix:
- Fix 14: split on fenced code blocks and inline code spans before renaming,
  so element names inside `backtick spans` are left unchanged
- populateToc(): split on inline code spans before replacing <TableOfContents/>,
  so the tag inside a code span is never expanded

Affected pages: guides/architecture (TableCell MDX error), reference/markdown-pipeline (<div> MDX error).

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
claude added 3 commits June 10, 2026 13:19
TASK-22: Add PR validation CI workflow (test + type-check + build on every PR)
TASK-23: Add unit tests for getPlainText/getMultiSelect/hasTag/buildLinkToPages
TASK-24: Eliminate as-any casts in loader.ts files-property URL expiry check
TASK-25: Deduplicate withRetry() and fix silent page drops in live-loader

https://claude.ai/code/session_012JMwj7ubJgY7YbcK3bQxGe
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.

2 participants