Skip to content

Commit 8c5f4d4

Browse files
justin808claude
andauthored
Update changelog: add rc.4 section and fix /update-changelog command (#2485)
### Summary Two changes: 1. **Changelog entries**: Added `### [16.4.0.rc.4]` section with PRs 2403, 2456, 2464, 2469 (moved from Unreleased or newly added). Added PR 2476 to Unreleased. Updated version diff links. 2. **Fix `/update-changelog` command**: Restructured the process so that tag-to-changelog reconciliation is an explicit **first step** (Step 2) rather than buried in vague instructions. The command now explicitly compares the latest git tag against the latest changelog version header, creates missing sections, moves entries from Unreleased, then handles post-tag commits. This was getting missed every time. Closes the recurring issue of tagged releases not getting their own changelog sections. ### Pull Request checklist - ~[ ] Add/update test to cover these changes~ - ~[ ] Update documentation~ - [x] Update CHANGELOG file --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 1123f0c commit 8c5f4d4

File tree

2 files changed

+68
-50
lines changed

2 files changed

+68
-50
lines changed

.claude/commands/update-changelog.md

Lines changed: 56 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -156,60 +156,67 @@ When a new version is released:
156156

157157
### For Regular Changelog Updates
158158

159-
1. **ALWAYS fetch latest changes first**:
160-
- **CRITICAL**: Run `git fetch origin master` to ensure you have the latest commits
161-
- The workspace may be behind origin/master, causing you to miss recently merged PRs
162-
- After fetching, use `origin/master` for all comparisons, NOT local `master` branch
163-
164-
2. **Determine the correct version tag to compare against**:
165-
- First, check the tag dates: `git log --tags --simplify-by-decoration --pretty="format:%ai %d" | head -10`
166-
- Find the latest version tag and its date
167-
- **Also check the CHANGELOG.md** for the most recent version header: look for `### [VERSION] - DATE` pattern right after `### [Unreleased]`
168-
- The most recent version in the changelog may be a beta version like `16.2.0.beta.19`
169-
- Compare origin/master branch date to the tag date
170-
- If the tag is NEWER than origin/master, it means the branch needs to be updated to include the tag's commits
171-
- **CRITICAL**: Always use `git log TAG..BRANCH` to find commits that are in the tag but not in the branch, as the tag may be ahead
172-
173-
3. **Check commits and version boundaries**:
174-
- **IMPORTANT**: Use `origin/master` in all commands below, not local `master`
175-
- Run `git log --oneline LAST_TAG..origin/master` to see commits since the last release
176-
- Also check `git log --oneline origin/master..LAST_TAG` to see if the tag is ahead of origin/master
177-
- If the tag is ahead, entries in "Unreleased" section may actually belong to that tagged version
178-
- **Extract ALL PR numbers** from commit messages using grep: `git log --oneline LAST_TAG..origin/master | grep -oE "#[0-9]+" | sort -u`
179-
- For each PR number found, check if it's already in CHANGELOG.md using: `grep "PR XXX" CHANGELOG.md` (note: no hash in search since React on Rails uses no hash)
180-
- Identify which commits contain user-visible changes (look for keywords like "Fix", "Add", "Feature", "Bug", etc.)
181-
- Extract author information from commit messages
182-
- **Never ask the user for PR details** - get them from the git history or use WebFetch on the PR URL
183-
184-
4. **Validate** that changes are user-visible (per the criteria above). If not user-visible, skip those commits.
185-
186-
5. **Read the current CHANGELOG.md** to understand the existing structure and formatting.
187-
188-
6. **Determine where entries should go**:
189-
- If the latest version tag is NEWER than origin/master branch, move entries from "Unreleased" to that version section
190-
- If origin/master is ahead of the latest tag, add new entries to "Unreleased"
191-
- Always verify the version date in CHANGELOG.md matches the actual tag date
192-
193-
7. **Add or move entries** to the appropriate section under appropriate category headings.
194-
- **CRITICAL**: When moving entries from "Unreleased" to a version section, merge them with existing entries under the same category heading
195-
- **NEVER create duplicate section headings** (e.g., don't create two "### Fixed" sections)
196-
- If the version section already has a category heading (e.g., "### Fixed"), add the moved entries to that existing section
197-
- Maintain the category order as defined above
198-
199-
8. **Verify formatting**:
159+
#### Step 1: Fetch and read current state
160+
161+
- **CRITICAL**: Run `git fetch origin master` to ensure you have the latest commits
162+
- After fetching, use `origin/master` for all comparisons, NOT local `master` branch
163+
- Read the current CHANGELOG.md to understand the existing structure
164+
165+
#### Step 2: Reconcile tags with changelog sections (DO THIS FIRST)
166+
167+
**This step catches missing version sections and is the #1 source of errors when skipped.**
168+
169+
1. Get the latest git tag: `git tag --sort=-v:refname | head -5`
170+
2. Get the most recent version header in CHANGELOG.md (the first `### [VERSION] - DATE` after `### [Unreleased]`)
171+
3. **Compare them.** If the latest git tag (minus the `v` prefix) does NOT match the latest changelog version header, there are tagged releases missing from the changelog. For example:
172+
- Latest tag: `v16.4.0.rc.4`
173+
- Latest changelog version: `### [16.4.0.rc.3]`
174+
- **Result: `16.4.0.rc.4` is missing and needs its own section**
175+
176+
4. For EACH missing tagged version (there may be multiple):
177+
a. Find commits in that tag vs the previous tag: `git log --oneline PREV_TAG..MISSING_TAG`
178+
b. Extract PR numbers and fetch details for user-visible changes
179+
c. Check which entries currently in `### [Unreleased]` actually belong to this tagged version (compare PR numbers against the commit list)
180+
d. **Create a new version section** immediately before the previous version section:
181+
182+
```markdown
183+
### [16.4.0.rc.4] - 2026-02-22
184+
```
185+
186+
e. **Move** matching entries from Unreleased into the new section
187+
f. **Add** any new entries for PRs in that tag that aren't in the changelog at all
188+
g. **Update version diff links** at the bottom of the file:
189+
- Update `[unreleased]:` to compare from the newest tag to master
190+
- Add a link for each new version section
191+
192+
5. Get the tag date with: `git log -1 --format="%Y-%m-%d" TAG_NAME`
193+
194+
#### Step 3: Add new entries for post-tag commits
195+
196+
1. Run `git log --oneline LATEST_TAG..origin/master` to find commits after the latest tag
197+
2. Extract PR numbers: `git log --oneline LATEST_TAG..origin/master | grep -oE "#[0-9]+" | sort -u`
198+
3. For each PR number, check if it's already in CHANGELOG.md: `grep "PR XXX" CHANGELOG.md`
199+
4. For PRs not yet in the changelog:
200+
- Get PR details: `gh pr view NUMBER --json title,body,author --repo shakacode/react_on_rails`
201+
- **Never ask the user for PR details** - get them from git history or the GitHub API
202+
- Validate that the change is user-visible (per the criteria above). Skip CI, lint, refactoring, test-only changes.
203+
- Add the entry to `### [Unreleased]` under the appropriate category heading
204+
205+
#### Step 4: Verify and finalize
206+
207+
1. **Verify formatting**:
200208
- Bold description with period
201209
- Proper PR link (NO hash symbol)
202210
- Proper author link
203211
- Consistent with existing entries
204212
- File ends with a newline character
205-
206-
9. **Run linting** after making changes:
207-
208-
```bash
209-
yarn lint
210-
```
211-
212-
10. **Show the user** the added or moved entries and explain what was done.
213+
2. **Verify version sections are in order** (Unreleased → newest tag → older tags)
214+
3. **Verify version diff links** at the bottom of the file are correct
215+
4. **Show the user** a summary of what was done:
216+
- Which version sections were created
217+
- Which entries were moved from Unreleased
218+
- Which new entries were added
219+
- Which PRs were skipped (and why)
213220

214221
### For Beta to Non-Beta Version Release
215222

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Changes since the last non-beta release.
2929

3030
#### Fixed
3131

32+
- **RSC WebpackLoader with SWC transpiler**: Fixed RSC WebpackLoader never being injected when using SWC (Shakapacker's default transpiler). The RSC config only handled array-based `rule.use` (Babel) but SWC uses a function-based `rule.use`, so `'use client'` files passed through untransformed into the RSC bundle. Now handles both array and function loader declarations. [PR 2476](https://github.com/shakacode/react_on_rails/pull/2476) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
3233
- **RSC Generator Layout Wiring**: Fixed `MissingEntryError` on fresh RSC installs where `HelloServerController` fell back to Rails' `application.html.erb` (which uses `javascript_pack_tag "application"` that is not created by the RSC flow). The generator now always copies `hello_world.html.erb`, `HelloServerController` explicitly uses `layout "hello_world"`, and post-install output now shows `stream_react_component` for RSC installs. [PR 2429](https://github.com/shakacode/react_on_rails/pull/2429) by [justin808](https://github.com/justin808).
3334

3435
#### Pro
@@ -37,10 +38,19 @@ Changes since the last non-beta release.
3738

3839
- **Breaking: removed legacy key-file license fallback**: `config/react_on_rails_pro_license.key` is no longer read. Move your token to the `REACT_ON_RAILS_PRO_LICENSE` environment variable. A migration warning is logged at startup when the legacy file is detected and the environment variable is missing. [PR 2454](https://github.com/shakacode/react_on_rails/pull/2454) by [ihabadham](https://github.com/ihabadham).
3940

41+
### [16.4.0.rc.4] - 2026-02-22
42+
43+
#### Pro
44+
45+
##### Improved
46+
47+
- **Better error messages when component is missing `'use client'` with RSC**. When RSC support is enabled, components without `'use client'` silently crash at runtime with confusing errors. Improved error messages at multiple layers: runtime server and client bundles now include the component name and suggest adding `'use client'`, build-time heuristic scans for client-only patterns and emits warnings, and generated server component pack files explain the classification. [PR 2403](https://github.com/shakacode/react_on_rails/pull/2403) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
48+
4049
##### Fixed
4150

4251
- **Fixed node renderer upload race condition causing ENOENT errors and asset corruption during concurrent requests**. Concurrent multipart uploads (e.g., during pod rollovers) all wrote to a single shared path (`uploads/<filename>`), causing file overwrites, `ENOENT` errors, and cross-contamination between requests. Each request now gets its own isolated upload directory (`uploads/<uuid>/`), eliminating all shared-path collisions. [PR 2456](https://github.com/shakacode/react_on_rails/pull/2456) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
4352
- **Fixed node renderer race condition between `/upload-assets` and render requests writing to the same bundle directory**. The `/upload-assets` endpoint used a global lock while render requests used per-bundle locks, so both could write to the same bundle directory concurrently, risking asset corruption. Now both endpoints share the same per-bundle lock key. Also switched parallel bundle processing from `Promise.all` to `Promise.allSettled` to prevent the `onResponse` cleanup hook from deleting uploaded files while in-flight copies are still reading from them. [PR 2464](https://github.com/shakacode/react_on_rails/pull/2464) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
53+
- **Fixed TS2769 build error in node renderer `onFile` callback**. Removed explicit `this: FastifyRequest` annotation that was incompatible with `@fastify/multipart` type definitions, fixing `pnpm build` and `pnpm install` failures on fresh runners. [PR 2469](https://github.com/shakacode/react_on_rails/pull/2469) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
4454

4555
### [16.4.0.rc.3] - 2026-02-18
4656

@@ -2012,7 +2022,8 @@ such as:
20122022

20132023
- Fix several generator-related issues.
20142024

2015-
[unreleased]: https://github.com/shakacode/react_on_rails/compare/v16.4.0.rc.3...master
2025+
[unreleased]: https://github.com/shakacode/react_on_rails/compare/v16.4.0.rc.4...master
2026+
[16.4.0.rc.4]: https://github.com/shakacode/react_on_rails/compare/v16.4.0.rc.3...v16.4.0.rc.4
20162027
[16.4.0.rc.3]: https://github.com/shakacode/react_on_rails/compare/v16.3.0...v16.4.0.rc.3
20172028
[16.3.0]: https://github.com/shakacode/react_on_rails/compare/v16.2.1...v16.3.0
20182029
[16.2.1]: https://github.com/shakacode/react_on_rails/compare/v16.2.0...v16.2.1

0 commit comments

Comments
 (0)