Skip to content

fix(markdown): release-notes details + bust stale readme cache#626

Merged
rainxchzed merged 1 commit into
mainfrom
fix/markdown-release-notes-details-cache
May 16, 2026
Merged

fix(markdown): release-notes details + bust stale readme cache#626
rainxchzed merged 1 commit into
mainfrom
fix/markdown-release-notes-details-cache

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 16, 2026

Two follow-ups to the markdown preprocessor PRs:

  1. `processReleaseBody` was stripping `

    Details`, `
    `, ``, `` to bare text BEFORE calling `preprocessMarkdown` — pre-empting my new details handler. Release-notes (WhatsNew section) couldn't render collapsibles or detect them inside table cells. Strip removed; let preprocessMarkdown own the conversion.

  2. README cache key bumped `details:readme:` → `details:readme:v2:`. Users running pre-fix(markdown): run details normalization before HTML-to-newline passes #625 builds have cached READMEs with stale broken-table output. Bumping the key forces a re-fetch on next view so the new preprocessor output replaces the cached one without waiting for natural TTL.

Test plan

  • Compile clean
  • Device: open librepods README (cached) — table renders end-to-end after cache busts.

Summary by CodeRabbit

  • Bug Fixes
    • Improved README and release note rendering with enhanced markdown processing and consistent line break handling.
    • Updated cache strategy to refresh previously cached README content for all users.

Review Change Stack

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@rainxchzed rainxchzed merged commit 2d94504 into main May 16, 2026
1 check was pending
@rainxchzed rainxchzed deleted the fix/markdown-release-notes-details-cache branch May 16, 2026 16:44
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8695af56-fe42-43df-8b6b-28466c38f290

📥 Commits

Reviewing files that changed from the base of the PR and between 6a3fdcd and d550b41.

📒 Files selected for processing (1)
  • feature/details/data/src/commonMain/kotlin/zed/rainxch/details/data/repository/DetailsRepositoryImpl.kt

Walkthrough

DetailsRepositoryImpl updates markdown content processing in two methods: processReleaseBody now normalizes line endings and applies markdown preprocessing with a constructed raw GitHub URL, while getReadme shifts to a versioned cache key (v2) to force refresh of previously cached entries after preprocessor overhaul.

Changes

Release Body and README Processing Updates

Layer / File(s) Summary
Release body preprocessing enhancement
feature/details/data/src/commonMain/kotlin/zed/rainxch/details/data/repository/DetailsRepositoryImpl.kt
processReleaseBody normalizes \r\n to \n newlines and routes markdown through preprocessMarkdown using a raw GitHub URL constructed from owner/repo/defaultBranch, replacing prior HTML tag stripping.
README cache key versioning
feature/details/data/src/commonMain/kotlin/zed/rainxch/details/data/repository/DetailsRepositoryImpl.kt
getReadme adopts a versioned cache key (details:readme:v2:$owner/$repo) with comments documenting the v2 bump after markdown preprocessor overhaul to trigger refresh for older cached entries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A rabbit hops through newlines pure,
Where \r\n becomes just \n for sure,
And readmes cache with version two,
Fresh markdown flows—the old adieu! 🌿

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/markdown-release-notes-details-cache

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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