Skip to content

feat: Add Changelog Viewer to Concept Version List - #31

Merged
snyaggarwal merged 2 commits into
OpenConceptLab:masterfrom
filiperochalopes:feature/add-changelog-viewer
May 7, 2026
Merged

feat: Add Changelog Viewer to Concept Version List #31
snyaggarwal merged 2 commits into
OpenConceptLab:masterfrom
filiperochalopes:feature/add-changelog-viewer

Conversation

@filiperochalopes

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Changelog button (newspaper icon) to each source version row in ConceptContainerVersionList. The button is only displayed for non-HEAD versions that have a previous version available for comparison.

  • Clicking the button opens a Material UI dialog that fetches and renders a markdown changelog between the selected version and its immediate predecessor using the /sources/$changelog/ endpoint with:

    • verbosity=4
    • output=markdown
  • Introduces a ChangelogMarkdown renderer using ReactMarkdown + remark-gfm, including custom handling for:

    • anchor-tagged headings (<a id="..."></a>) normalized into proper heading IDs
    • smooth scrolling for in-page # links
    • external links automatically opened in a new tab
  • The dialog supports fullscreen mode and displays a patience/loading message after 10 seconds if the changelog is still processing.

  • Refactors HEAD version detection into a shared isHeadVersion helper for consistency across the application.

  • Adds CustomMarkdown.scss to provide markdown-specific styling for changelog rendering.

* Add changelog action for source versions when a previous version exists
* Fetch and render version-to-version changelog in dialog with markdown support
* Improve version handling with safe HEAD detection, loading state, error handling, and fullscreen toggle
@filiperochalopes filiperochalopes self-assigned this May 6, 2026
@filiperochalopes

Copy link
Copy Markdown
Contributor Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9aa48e227d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +306 to +310
.then(response => {
const markdown = get(response, 'data.markdown') || get(response, 'markdown')

if(markdown) {
setChangelogMarkdown(markdown)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard changelog state updates against stale requests

When a user opens a changelog, closes it, and quickly opens another version, the earlier request can resolve after the newer one and still call setChangelogMarkdown/setChangelogError (and later setIsChangelogLoading(false)), so the dialog may display the wrong version’s content or hide the loading spinner while the active request is still pending. This path has no request identity check or cancellation, so late responses can overwrite state for the currently selected version.

Useful? React with 👍 / 👎.

* Extract changelog markdown parsing and rendering into shared ChangelogMarkdown component
* Use previous_version_url to resolve version diffs instead of relying on list order
* Simplify dialog title by deriving previous version label from URL
@snyaggarwal
snyaggarwal merged commit 6444844 into OpenConceptLab:master May 7, 2026
1 check passed
snyaggarwal pushed a commit that referenced this pull request Jun 17, 2026
* fix(common): prevent stale changelog responses

* Add request tracking to ignore late changelog responses after dialog close or newer request start
* Ignore local .env files in version control

* fix(common): prevent duplicate source changelog links and reset dialog state

* Skip changelog generation when normalized previous version URL matches unversioned source URL
* Reset loading, markdown, and error state on dialog close to avoid stale UI state
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