Repository navigation
fix: changelog generation - #292
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
Disabled knowledge base sources:
WalkthroughThe PR replaces local site release content with GitHub-backed changelog data. It adds release pages, RSS output, metadata, search indexing, and release evidence. It also improves WebSocket workspace recovery and updates repository maintenance contracts. ChangesGitHub changelog integration
WebSocket workspace errors
Repository and workflow maintenance
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant ChangelogPage
participant GitHubClient
participant GitHubAPI
Browser->>ChangelogPage: Request changelog page
ChangelogPage->>GitHubClient: loadChangelogReleases()
GitHubClient->>GitHubAPI: Fetch releases and pull requests
GitHubAPI-->>GitHubClient: Release and pull-request data
GitHubClient-->>ChangelogPage: Ready or unavailable result
ChangelogPage-->>Browser: Render release list or unavailable state
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
|
| Filename | Overview |
|---|---|
| packages/site/app/changelog/[version]/page.tsx | Selects the closest lower semantic version across all loaded releases, resolving the previously reported publication-order comparison defect. |
| packages/site/lib/changelog/release-markdown.ts | Implements numeric semantic-version and prerelease identifier comparison used by predecessor selection. |
| packages/site/lib/changelog/github-client.ts | Loads, validates, filters, and normalizes published GitHub releases for changelog consumers. |
| packages/site/app/changelog/feed.xml/route.ts | Produces an escaped RSS feed from validated changelog releases. |
| .github/workflows/release.yml | Removes the release workflow step that generated and pushed site changelog receipt commits. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Published GitHub releases] --> B[Validate and filter releases]
B --> C[Requested release]
B --> D[Compare semantic versions]
D --> E[Greatest lower release tag]
C --> F[Release detail page]
E --> G[GitHub compare URL]
G --> F
Reviews (2): Last reviewed commit: "fix: review round" | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (3)
packages/site/lib/changelog/github-client.ts (1)
67-104: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAdd an explicit timeout to the GitHub fetch calls.
githubJsoncallsfetchwithout a deadline. If GitHub stalls, the request keeps the render or route handler pending until the platform kills it. Pass an abort signal so the failure converts into the existingnetworkload error and the page falls back deterministically.♻️ Proposed change
+const GITHUB_TIMEOUT_MS = 8000; + async function githubJson( url: string, init: RequestInit & { next?: { revalidate: number } }, requireToken: boolean ): Promise<unknown> { let response: Response; try { response = await fetch(url, { ...init, + signal: init.signal ?? AbortSignal.timeout(GITHUB_TIMEOUT_MS), headers: { ...githubHeaders({ requireToken }), ...init.headers, }, });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/site/lib/changelog/github-client.ts` around lines 67 - 104, Update githubJson to create an AbortController-based timeout and pass its signal to the fetch call, ensuring stalled GitHub requests abort and follow the existing network-error handling. Clear the timeout after fetch completes, including failure paths, while preserving the current GitHub response and invalid-JSON handling.packages/site/lib/__tests__/github-changelog.test.ts (1)
48-96: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the production token requirement and the pagination break.
The suite covers the happy path and the schema violation. Two behaviors of
loadChangelogReleasesstay untested and both change production output:
- The
configurationerror whenCOMPOZY_SITE_GITHUB_TOKENis absent andVERCEL_ENVisproduction.- The multi-page path that stops after the page containing a tag before
CHANGELOG_CUTOFF_TAG.Add both cases to this suite. The first case protects the deploy-time contract; the second protects the cutoff filter against silent truncation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/site/lib/__tests__/github-changelog.test.ts` around lines 48 - 96, Extend the github-changelog test suite with cases for loadChangelogReleases when COMPOZY_SITE_GITHUB_TOKEN is absent in production (VERCEL_ENV=production), asserting the explicit configuration error, and when pagination reaches a page containing a tag before CHANGELOG_CUTOFF_TAG, asserting subsequent pages are not fetched and eligible releases are retained.packages/site/components/blog/release-markdown.tsx (1)
21-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDestructure
nodeout before spreading props onto native elements.react-markdown passes a
nodeprop to every custom component. The handlers here (h3 shown at Line 21, and similarly h4, h5, h6, p, ul, ol, a, code, pre, blockquote, th, td) spread the remaining props — includingnode— directly onto native DOM elements. React does not recognizenodeas a DOM attribute and will warn about it on every render. The official react-markdown examples destructurenodeout first to avoid this.🧹 Example fix for the h3 handler (apply the same pattern to the other handlers)
- h3: ({ children, ...props }) => ( + h3: ({ children, node, ...props }) => ( <h2 {...props} className="mt-14 scroll-mt-24 font-sans text-2xl font-semibold tracking-tight text-fg first:mt-0" > {children} </h2> ),Please verify with the web whether react-markdown 10.x still passes
nodeto custom components and warns when it is spread onto a native DOM element.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/site/components/blog/release-markdown.tsx` around lines 21 - 28, Update the custom markdown renderers in the release-markdown component, including h3 and the corresponding h4, h5, h6, p, ul, ol, a, code, pre, blockquote, th, and td handlers, to destructure and discard node before spreading the remaining props onto native elements. Preserve all existing rendering and styling behavior while ensuring node is never forwarded to the DOM.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/site/app/changelog/`[version]/page.tsx:
- Around line 32-34: Update the changelog page flow around the result.status ===
"unavailable" check to render an explicit temporary-unavailability state instead
of throwing, matching the graceful handling used by the blog page;
alternatively, document and intentionally preserve the app-wide error-boundary
behavior if that is the expected contract.
In `@packages/site/app/changelog/feed.xml/route.ts`:
- Line 5: Replace the hardcoded ISR revalidation value with
CHANGELOG_REVALIDATE_SECONDS across all affected routes: update
packages/site/app/changelog/feed.xml/route.ts:5, import the constant and use it
in packages/site/app/changelog/page.tsx:10, and import it and use it in
packages/site/app/llms.txt/route.ts:7, reusing the existing
`@/lib/changelog/types` export.
- Line 33: Update loadChangelogReleases() in the changelog library to render
each raw release.body Markdown into HTML before the RSS route consumes it,
preserving the existing release data flow. Then update the feed route’s
description generation to use that rendered HTML and XML-escape or wrap it
appropriately, so readers receive formatted release-note content rather than
Markdown syntax.
In `@packages/site/components/blog/release-evidence.tsx`:
- Around line 74-76: Update the user-facing paragraph in the release evidence
component to remove “workflow” and describe the published files using compliant
release-focused wording, while preserving the asset count interpolation.
In `@packages/site/components/blog/release-markdown.tsx`:
- Around line 21-43: Add h1 and h2 handlers to the release Markdown component’s
heading renderers, applying the same release-heading styling so level-1 and
level-2 GitHub headings are normalized and styled consistently with the existing
h3–h6 mappings. Add coverage for these heading levels in
changelog-components.test.tsx.
- Around line 66-77: Update the react-markdown renderers in the release markdown
component so fenced code block styling is applied by the pre renderer using the
project’s syntax-highlight theme, while the code renderer retains only
inline-code styling. Remove the fenced-block visual classes from code and do not
introduce a separate plain-background code renderer.
---
Nitpick comments:
In `@packages/site/components/blog/release-markdown.tsx`:
- Around line 21-28: Update the custom markdown renderers in the
release-markdown component, including h3 and the corresponding h4, h5, h6, p,
ul, ol, a, code, pre, blockquote, th, and td handlers, to destructure and
discard node before spreading the remaining props onto native elements. Preserve
all existing rendering and styling behavior while ensuring node is never
forwarded to the DOM.
In `@packages/site/lib/__tests__/github-changelog.test.ts`:
- Around line 48-96: Extend the github-changelog test suite with cases for
loadChangelogReleases when COMPOZY_SITE_GITHUB_TOKEN is absent in production
(VERCEL_ENV=production), asserting the explicit configuration error, and when
pagination reaches a page containing a tag before CHANGELOG_CUTOFF_TAG,
asserting subsequent pages are not fetched and eligible releases are retained.
In `@packages/site/lib/changelog/github-client.ts`:
- Around line 67-104: Update githubJson to create an AbortController-based
timeout and pass its signal to the fetch call, ensuring stalled GitHub requests
abort and follow the existing network-error handling. Clear the timeout after
fetch completes, including failure paths, while preserving the current GitHub
response and invalid-JSON handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0120102a-231b-4a84-a33e-53aa508ced17
⛔ Files ignored due to path filters (33)
.github/workflows/release.ymlis excluded by!**/*.ymlbun.lockis excluded by!**/*.lock,!**/*.lockdocs/qa/charters/CH-site-changelog-release-evidence.mdis excluded by!**/*.mddocs/qa/reports/2026-08-03-dev-websocket-recovery.mdis excluded by!**/*.mddocs/qa/reports/2026-08-03-site-github-changelog.mdis excluded by!**/*.mddocs/qa/scenarios/RT-missing-workspace-pruned.mdis excluded by!**/*.mddocs/qa/scenarios/SITE-changelog-release-receipts.mdis excluded by!**/*.mdpackage.jsonis excluded by!**/*.jsonpackages/site/CLAUDE.mdis excluded by!**/*.mdpackages/site/content/blog/changelog/v0.3.0-beta.1.mdxis excluded by!**/*.mdxpackages/site/content/blog/changelog/v0.3.0-beta.2.mdxis excluded by!**/*.mdxpackages/site/package.jsonis excluded by!**/*.jsonpackages/slides/.agents/skills/apply-comments/SKILL.mdis excluded by!**/*.mdpackages/slides/.agents/skills/create-slide/SKILL.mdis excluded by!**/*.mdpackages/slides/.agents/skills/create-theme/SKILL.mdis excluded by!**/*.mdpackages/slides/.agents/skills/slide-authoring/SKILL.mdis excluded by!**/*.mdpackages/slides/AGENTS.mdis excluded by!**/*.mdpackages/slides/CLAUDE.mdis excluded by!**/*.mdpackages/slides/README.mdis excluded by!**/*.mdpackages/slides/bun.lockis excluded by!**/*.lock,!**/*.lockpackages/slides/netlify.tomlis excluded by!**/*.tomlpackages/slides/package.jsonis excluded by!**/*.jsonpackages/slides/slides/.folders.jsonis excluded by!**/*.jsonpackages/slides/slides/getting-started/assets/claude.svgis excluded by!**/*.svgpackages/slides/slides/getting-started/assets/cloudflare.svgis excluded by!**/*.svgpackages/slides/slides/getting-started/assets/gemini.svgis excluded by!**/*.svgpackages/slides/slides/getting-started/assets/openai.svgis excluded by!**/*.svgpackages/slides/slides/getting-started/assets/opencode.svgis excluded by!**/*.svgpackages/slides/slides/getting-started/assets/vercel.svgis excluded by!**/*.svgpackages/slides/slides/getting-started/assets/zeabur.svgis excluded by!**/*.svgpackages/slides/themes/compozy.mdis excluded by!**/*.mdpackages/slides/tsconfig.jsonis excluded by!**/*.jsonpackages/slides/vercel.jsonis excluded by!**/*.json
📒 Files selected for processing (54)
internal/api/core/window_manager_ws.gointernal/api/core/window_manager_ws_test.gointernal/config/release_config_test.gopackages/site/.gitignorepackages/site/app/api/search/route.tspackages/site/app/blog/page.tsxpackages/site/app/changelog/[version]/not-found.tsxpackages/site/app/changelog/[version]/page.tsxpackages/site/app/changelog/feed.xml/route.tspackages/site/app/changelog/metadata.tspackages/site/app/changelog/page.tsxpackages/site/app/llms-full.txt/route.tspackages/site/app/llms.txt/route.tspackages/site/app/sitemap.tspackages/site/components/blog/__tests__/changelog-components.test.tsxpackages/site/components/blog/__tests__/changelog-toc-rail.test.tsxpackages/site/components/blog/changelog-rail.tsxpackages/site/components/blog/changelog-toc-rail.tsxpackages/site/components/blog/format.tspackages/site/components/blog/release-detail-rail.tsxpackages/site/components/blog/release-entry.tsxpackages/site/components/blog/release-evidence.tsxpackages/site/components/blog/release-markdown.tsxpackages/site/lib/__tests__/github-changelog.test.tspackages/site/lib/__tests__/public-heading-hierarchy.test.tsxpackages/site/lib/__tests__/public-install-contract.test.tspackages/site/lib/__tests__/public-route-metadata.test.tspackages/site/lib/__tests__/public-search-index.test.tspackages/site/lib/__tests__/static-route-metadata.test.tspackages/site/lib/blog.tspackages/site/lib/changelog/github-client.tspackages/site/lib/changelog/github-schemas.tspackages/site/lib/changelog/release-markdown.tspackages/site/lib/changelog/types.tspackages/site/lib/public-search-index.tspackages/site/lib/site-config.tspackages/site/scripts/__tests__/generate-changelog-release.test.tspackages/site/scripts/__tests__/render-changelog-release.test.tspackages/site/scripts/generate-changelog-release.tspackages/site/scripts/release-note-input.tspackages/site/scripts/render-changelog-release.tspackages/site/velite.config.tspackages/slides/.claude/skills/apply-commentspackages/slides/.claude/skills/create-slidepackages/slides/.claude/skills/create-themepackages/slides/.claude/skills/slide-authoringpackages/slides/.gitignorepackages/slides/open-slide.config.tspackages/slides/slides/compozy-network/index.tsxpackages/slides/slides/getting-started/index.tsxpackages/slides/themes/.gitkeepweb/src/systems/os/hooks/__tests__/use-window-manager-stream.test.tsxweb/src/systems/os/hooks/use-window-manager-stream.tsweb/vite.config.ts
💤 Files with no reviewable changes (13)
- packages/slides/.gitignore
- packages/slides/.claude/skills/slide-authoring
- packages/slides/.claude/skills/apply-comments
- packages/slides/.claude/skills/create-slide
- packages/site/scripts/tests/generate-changelog-release.test.ts
- packages/slides/open-slide.config.ts
- packages/site/scripts/render-changelog-release.ts
- packages/site/scripts/generate-changelog-release.ts
- packages/slides/.claude/skills/create-theme
- packages/site/velite.config.ts
- packages/site/scripts/tests/render-changelog-release.test.ts
- packages/site/scripts/release-note-input.ts
- packages/slides/slides/compozy-network/index.tsx
| import { CHANGELOG_REVALIDATE_SECONDS } from "@/lib/changelog/types"; | ||
| import { absoluteUrl, siteConfig } from "@/lib/site-config"; | ||
|
|
||
| export const revalidate = 300; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Use CHANGELOG_REVALIDATE_SECONDS for revalidate instead of the literal 300. CHANGELOG_REVALIDATE_SECONDS is imported and used for the RSS cache-control header in feed.xml/route.ts, but the ISR revalidate export in that same file, and in changelog/page.tsx and llms.txt/route.ts, hardcodes 300 instead of reusing the constant. If the constant's value changes, the actual regeneration window and the advertised cache duration will silently diverge across three routes.
packages/site/app/changelog/feed.xml/route.ts#L5-L5: setexport const revalidate = CHANGELOG_REVALIDATE_SECONDS;instead of the literal300.packages/site/app/changelog/page.tsx#L10-L10: importCHANGELOG_REVALIDATE_SECONDSfrom@/lib/changelog/typesand use it forexport const revalidate.packages/site/app/llms.txt/route.ts#L7-L7: importCHANGELOG_REVALIDATE_SECONDSfrom@/lib/changelog/typesand use it forexport const revalidate.
📍 Affects 3 files
packages/site/app/changelog/feed.xml/route.ts#L5-L5(this comment)packages/site/app/changelog/page.tsx#L10-L10packages/site/app/llms.txt/route.ts#L7-L7
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/site/app/changelog/feed.xml/route.ts` at line 5, Replace the
hardcoded ISR revalidation value with CHANGELOG_REVALIDATE_SECONDS across all
affected routes: update packages/site/app/changelog/feed.xml/route.ts:5, import
the constant and use it in packages/site/app/changelog/page.tsx:10, and import
it and use it in packages/site/app/llms.txt/route.ts:7, reusing the existing
`@/lib/changelog/types` export.
| `<link>${link}</link>`, | ||
| `<guid isPermaLink="true">${link}</guid>`, | ||
| `<pubDate>${new Date(release.publishedAt).toUTCString()}</pubDate>`, | ||
| `<description>${escapeXml(release.body)}</description>`, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== file list =="
git ls-files | rg 'packages/site/(app/changelog/feed.xml/route.ts|lib/changelog/(github-client|release-markdown))'
echo "== route outline =="
ast-grep outline packages/site/app/changelog/feed.xml/route.ts --view compact || true
echo "== route relevant lines =="
cat -n packages/site/app/changelog/feed.xml/route.ts | sed -n '1,90p'
echo "== release-markdown =="
cat -n packages/site/lib/changelog/release-markdown.ts | sed -n '1,220p'
echo "== github-client release shape =="
ast-grep outline packages/site/lib/changelog/github-client.ts --view compact || true
rg -n "loadChangelogReleases|release\.body|description|body" packages/site/lib/changelog/github-client.ts packages/site/app/changelog/feed.xml/route.tsRepository: compozy/compozy
Length of output: 13325
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== github-client relevant lines =="
cat -n packages/site/lib/changelog/github-client.ts | sed -n '80,145p'
cat -n packages/site/lib/changelog/github-client.ts | sed -n '160,200p'
echo "== release-markdown exports and rest =="
cat -n packages/site/lib/changelog/release-markdown.ts | sed -n '1,280p'
echo "== search for render/release-markdown exports in repository =="
rg -n "renderReleaseMarkdownToHtml|release-markdown|markdownToHtml|markdown-to-html|remark|github\\-actions\\-release\\-markdown|@.*markdown|escapeXml\\(" packages/siteRepository: compozy/compozy
Length of output: 18419
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== changelog page imports and ReleaseMarkdown usage =="
cat -n "packages/site/app/changelog/[version]/page.tsx" | sed -n '1,140p'
echo "== components/blog/release-markdown.tsx =="
cat -n "packages/site/components/blog/release-markdown.tsx" | sed -n '1,180p'
echo "== package json dependencies =="
cat -n packages/site/package.json | sed -n '1,90p'
echo "== package-lock/npm lock files =="
git ls-files | rg '(^|/)package-lock\.json$|(^|/)pnpm-lock\.yaml$|(^|/)yarn\.lock$|(^|/)bun\.lockb?$'
echo "== lockfile remark versions if present =="
for f in package-lock.json packages/site/package-lock.json pnpm-lock.yaml bun.lock bun.lockb yarn.lock; do
if [ -f "$f" ]; then
echo "-- $f --"
rg -n '"remark"|remark@|remark-gfm|remark-mdx' "$f" | head -80 || true
fi
doneRepository: compozy/compozy
Length of output: 17622
Render the GitHub release body before writing it to RSS.
loadChangelogReleases() stores the raw release markdown in release.body, and escapeXml() only XML-escapes that text. Feed readers will display ###, -, links, and other markdown syntax instead of release-note HTML. Move the markdown render logic into the changelog library and output an escaped or wrapped HTML description from it.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/site/app/changelog/feed.xml/route.ts` at line 33, Update
loadChangelogReleases() in the changelog library to render each raw release.body
Markdown into HTML before the RSS route consumes it, preserving the existing
release data flow. Then update the feed route’s description generation to use
that rendered HTML and XML-escape or wrap it appropriately, so readers receive
formatted release-note content rather than Markdown syntax.
| <p className="mt-3 text-sm leading-6 text-muted"> | ||
| {release.assets.length} files published by the GitHub release workflow. | ||
| </p> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove workflow from product-facing copy.
The coding guidelines forbid workflow in public product-facing copy. Describe the source without that noun, for example: {release.assets.length} files published with this release.
✏️ Proposed change
<p className="mt-3 text-sm leading-6 text-muted">
- {release.assets.length} files published by the GitHub release workflow.
+ {release.assets.length} files published with this GitHub release.
</p>As per coding guidelines: "Public product-facing copy must follow COPY.md; use capability as the canonical artifact name and never use recipe, workflow, procedure, or playbook."
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <p className="mt-3 text-sm leading-6 text-muted"> | |
| {release.assets.length} files published by the GitHub release workflow. | |
| </p> | |
| <p className="mt-3 text-sm leading-6 text-muted"> | |
| {release.assets.length} files published with this GitHub release. | |
| </p> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/site/components/blog/release-evidence.tsx` around lines 74 - 76,
Update the user-facing paragraph in the release evidence component to remove
“workflow” and describe the published files using compliant release-focused
wording, while preserving the asset count interpolation.
Source: Coding guidelines
| h3: ({ children, ...props }) => ( | ||
| <h2 | ||
| {...props} | ||
| className="mt-14 scroll-mt-24 font-sans text-2xl font-semibold tracking-tight text-fg first:mt-0" | ||
| > | ||
| {children} | ||
| </h2> | ||
| ), | ||
| h4: ({ children, ...props }) => ( | ||
| <h3 {...props} className="mt-10 scroll-mt-24 font-sans text-lg font-semibold text-fg"> | ||
| {children} | ||
| </h3> | ||
| ), | ||
| h5: ({ children, ...props }) => ( | ||
| <h4 {...props} className="mt-8 scroll-mt-24 font-sans text-base font-semibold text-fg"> | ||
| {children} | ||
| </h4> | ||
| ), | ||
| h6: ({ children, ...props }) => ( | ||
| <h5 {...props} className="mt-7 scroll-mt-24 font-sans text-sm font-semibold text-fg"> | ||
| {children} | ||
| </h5> | ||
| ), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Locate files:"
fd -a 'release-markdown|changelog-components|release.*\.(ts|tsx)$' . | sed 's#^\./##' | head -100
echo
echo "Inspect targeted file outline and relevant source:"
if [ -f packages/site/components/blog/release-markdown.tsx ]; then
wc -l packages/site/components/blog/release-markdown.tsx
ast-grep outline packages/site/components/blog/release-markdown.tsx || true
sed -n '1,180p' packages/site/components/blog/release-markdown.tsx
fi
echo
echo "Search remarkReleaseStructure:"
rg -n "remarkReleaseStructure|ReleaseStructure|release.*structure|heading" packages/site lib packages 2>/dev/null | head -200Repository: compozy/compozy
Length of output: 27604
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Inspect changelog release-markdown implementation:"
sed -n '1,240p' packages/site/lib/changelog/release-markdown.ts
echo
echo "Inspect changelog components tests around release markdown:"
sed -n '1,140p' packages/site/components/blog/__tests__/changelog-components.test.tsx
echo
echo "Find release detail/list page usage and body normalization:"
rg -n "ReleaseMarkdown|body:|stripLeadingReleaseHeading|remarkReleaseStructure" packages/site -g '*.tsx' -g '*.ts'Repository: compozy/compozy
Length of output: 17015
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Inspect remainder of remarkReleaseStructure implementation:"
sed -n '240,340p' packages/site/lib/changelog/release-markdown.ts
echo
echo "Inspect changelog version page body source:"
sed -n '1,180p' packages/site/app/changelog/[version]/page.tsx
echo
echo "Run a read-only semantic probe of the markdown parser behavior from source:"
python3 - <<'PY'
from pathlib import Path
p = Path('packages/site/lib/changelog/release-markdown.ts')
s = p.read_text()
checks = {
"remaps heading depth to HTML element": 'depth 2 -> "h2"' in s or '"h2"' in s[s.find("remarkReleaseStructure"):],
"remaps heading depth to HTML element": 'depth 3 -> "h3"' in s or 'node.tagName = "h3"' in s[s.find("remarkReleaseStructure"):],
"normalizes heading levels before react-markdown": '"depth" in node' in s[s.find("remarkReleaseStructure"):s.find("remarkReleaseStructure", s.find("remarkReleaseStructure") + 1)],
}
# Since the source output truncated before the transformer body, print search diagnostics only for requested identifiers.
for token in ["remarkReleaseStructure", "node.depth", "node.tagName", '"depth"', "depth --"]:
print(f"{token}: {s.count(token)} occurrences")
PYRepository: compozy/compozy
Length of output: 7005
Add h1 and h2 handlers before rendering GitHub release notes.
remarkReleaseStructure only adds heading IDs; it does not normalize ## headings. GitHub release content can still include level-2 sections that render as native unstyled <h2> elements, so add explicit h1/h2 handlers with the same release-heading styling. Also cover this case in changelog-components.test.tsx.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/site/components/blog/release-markdown.tsx` around lines 21 - 43, Add
h1 and h2 handlers to the release Markdown component’s heading renderers,
applying the same release-heading styling so level-1 and level-2 GitHub headings
are normalized and styled consistently with the existing h3–h6 mappings. Add
coverage for these heading levels in changelog-components.test.tsx.
| code: props => ( | ||
| <code | ||
| {...props} | ||
| className="rounded bg-elevated px-1.5 py-0.5 font-mono text-sm text-fg" | ||
| /> | ||
| ), | ||
| pre: props => ( | ||
| <pre | ||
| {...props} | ||
| className="mt-5 overflow-x-auto rounded-xl border border-line bg-canvas-soft p-4 text-sm" | ||
| /> | ||
| ), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate release markdown and package deps =="
fd -a 'release-markdown\.tsx$|package\.json$' . | sed 's#^\./##' | head -100
echo
echo "== relevant package files =="
for f in $(fd 'package\.json$' . | head -20); do
if rg -q 'react-markdown|remark' "$f" 2>/dev/null; then
echo "--- $f ---"
rg -n '"react-markdown"|remark|rehype' "$f"
fi
done
echo
echo "== target file context =="
target=$(fd 'release-markdown\.tsx$' packages/site | head -1 || true)
if [ -n "$target" ]; then
wc -l "$target"
sed -n '1,130p' "$target" | cat -n
fi
echo
echo "== usages of components/code/pre in package/site =="
rg -n "react-markdown|components=\{|code: props =>|pre: props =>|syntax-highlight|mdx|code-block|next-mdx|fumadocs|react-syntax|highlight" packages/site packages -g '*.{ts,tsx,jsx,js,json,md,mdx}' | head -200Repository: compozy/compozy
Length of output: 29026
🌐 Web query:
react-markdown 10 inline prop removed code component pre code props
💡 Result:
In react-markdown version 10, the inline prop is no longer passed to the code component when using the components override [1][2][3]. This change is part of a broader removal of extra, internal props to simplify the component API [2][4]. To adapt to this change and differentiate between inline code and block code (which is wrapped in a pre element), you should update your approach to checking the context [1][2]: 1. Detect inline vs. block code: Since the inline prop is gone, you can detect block code by creating a specific component override for the pre tag instead of relying on the code component's inline prop [1][4]. 2. Alternative approach: You can also inspect the component's context. Because react-markdown wraps block code in a pre tag, the code component will now only receive props relevant to a standard code element [1][5][4]. If you need to distinguish code blocks, move your logic for syntax highlighting or custom block rendering to the pre component override [1][6]. As noted in the official changelog, the recommended migration path is to use the pre component for block-level logic or create a plugin if more advanced tree traversal is required [1][4][3]. Top results: [1], [2], [4]
Citations:
- 1: https://raw.githubusercontent.com/remarkjs/react-markdown/main/changelog.md
- 2: baileycash-elastic/kibana@5cd002b
- 3: https://npmx.dev/package-changelog/react-markdown/v/10.1.0
- 4: https://github.com/remarkjs/react-markdown/blob/main/changelog.md
- 5: https://github.com/remarkjs/react-markdown/blob/15b4757082cf3f32a25eba0b8ea30baf751a8b40/changelog.md
- 6: Cannot run the code after upgrading the library: missing property
code.inlineand changed the type ofp.refremarkjs/react-markdown#776
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== mdx block / shiki files =="
cat -n packages/ui/src/components/custom/code-block.tsx | sed -n '1,220p'
echo
cat -n packages/ui/src/lib/shiki-highlighter.ts | sed -n '1,160p'
echo
echo "== mdx component wiring =="
cat -n packages/site/mdx-components.tsx | sed -n '1,160p'
echo
cat -n packages/site/source.config.ts | sed -n '1,120p'
echo
echo "== rehype-pretty-code usage =="
rg -n "rehype-pretty-code|CodeToRaw|codeToTokens|highlightCompozyCode|pre.*className|code-block|mdx-blocks" packages/ui packages/site -g '*.{ts,tsx}' | sed -n '1,200p'Repository: compozy/compozy
Length of output: 25403
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== changelog plugin tests =="
target=$(fd 'release-markdown\.test\.tsx$|release-markdown\.test\.ts$|changelog-components\.test\.tsx$|changelog-components\.test\.ts$' packages/site | head -20 || true)
echo "$target"
for f in $target; do
echo "--- $f ---"
wc -l "$f"
rg -n "h2|h3|h4|h5|h6|release|markdown|heading|##|code|pre|fenced|block" "$f" | sed -n '1,240p'
doneRepository: compozy/compozy
Length of output: 2164
Use the project’s syntax-highlight theme for release code blocks.
react-markdown 10 no longer passes inline to the code component, so fenced code blocks also get the inline code classes and render inside the pre override’s own rounded/border/padded container. Put fenced block styling in the pre renderer and render inline code without the fenced-block variant; do not add a new plain-background code renderer here.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/site/components/blog/release-markdown.tsx` around lines 66 - 77,
Update the react-markdown renderers in the release markdown component so fenced
code block styling is applied by the pre renderer using the project’s
syntax-highlight theme, while the code renderer retains only inline-code
styling. Remove the fenced-block visual classes from code and do not introduce a
separate plain-background code renderer.
Source: Path instructions
Summary by CodeRabbit
New Features
Bug Fixes