feat(ui): Changelog browser pilot on the shared design system (U5 B1)#430
feat(ui): Changelog browser pilot on the shared design system (U5 B1)#430OBenner wants to merge 3 commits into
Conversation
First screen of the B1 "Code & review" batch, ported from desktop-changelog.html: - libs/ui: new ChangelogView screen — timeline rail grouped by year (semver-type dots, position-qualified selection, aria-current), release feed (version/name head, type badge, typed section icons, sha chips), optional right meta rail on the shared UiMetaSection card family; loading/error/empty states. New shared types: UiRelease/UiReleaseSection/UiReleaseEntry/UiReleaseType/ UiReleaseSectionKind (UiRelease.id is required — real CHANGELOG files repeat versions across format blocks). - Electron: pure changelog-releases parser (keep-a-changelog + the generator's loose/name-suffixed headings; ISO dates formatted in UTC so labels don't shift west of UTC; inline markdown stripped; ids unique under duplicate versions) + ChangelogPilotView over the existing changelog:readExisting IPC, mounted as "Changelog (new UI)" beside the legacy generator wizard. - i18n: new changelog namespace (en+fr), navigation.changelogNext keys, and registration of the previously-unregistered kanban namespace so the Kanban pilot stops rendering raw keys. Adversarial review workflow (18 agents) confirmed 6 defects during the slice — timezone-shifted dates + TZ-flaky test, duplicate-version React keys/ref-map collisions, "Jun 8" Date-parsing into a bogus 2001 year group, paren-eating heading regex, generator name-suffixes rendered as dates, meta-card CSS drift — all fixed and pinned by tests (15 passing, verified under TZ=America/New_York and against this repo's real CHANGELOG.md). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds a reusable changelog UI and ChangesChangelog pilot
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Sidebar
participant App
participant ChangelogPilotView
participant ElectronAPI
participant ChangelogParser
participant ChangelogView
Sidebar->>App: select changelog-next
App->>ChangelogPilotView: provide projectId
ChangelogPilotView->>ElectronAPI: readExistingChangelog(projectId)
ElectronAPI-->>ChangelogPilotView: return changelog content
ChangelogPilotView->>ChangelogParser: parse content and locale
ChangelogParser-->>ChangelogPilotView: return releases
ChangelogPilotView->>ChangelogView: render releases and metadata
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
Address the 8 SonarCloud findings on the pilot: rewrite the parser regexes without ambiguous quantifier overlap (S8786 ×5 — heading, section, entry, trailing-sha, emphasis patterns are now linear-time on adversarial input), split the emphasis alternation into per-marker patterns (S6035), and modernize groupByYear (.at(-1) + optional chain — S7755/S6582). Behavior pinned by the existing 15 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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 `@apps/frontend/src/renderer/components/ChangelogPilotView.tsx`:
- Around line 45-66: Update the failure handling in the ChangelogPilotView
request flow: in both the !result.success branch and the catch callback, log the
original backend or exception error for diagnostics, but set the state error to
a new Error using the localized changelog:pilot.error translation consistently.
Do not pass raw IPC or exception messages to the user-facing state.
In `@apps/frontend/src/renderer/lib/changelog-releases.ts`:
- Around line 187-194: Update the changelog release mapping around releaseTypeOf
so it searches forward from index for the next semantically different version,
rather than using all[index + 1] directly. Pass that version to releaseTypeOf
while preserving position-qualified IDs, and add a test covering duplicate
entries where the major release type is determined from the next distinct
version.
- Around line 125-135: Update dateLabelsOf to validate the parsed UTC calendar
components against the year, month, and day represented by dateRaw after the
existing timestamp check; return {} when any component differs, and only format
dates that exactly match the input.
In `@libs/ui/src/screens/ChangelogView.tsx`:
- Around line 62-81: Add optional localized label props to ChangelogViewProps
for the loading, retry, and empty states, then replace the hardcoded “Loading…”,
“Retry”, and “No releases yet.” text in ChangelogView with those props. Preserve
sensible English defaults when callers do not provide translations, and use the
retry label for the existing onRetry button.
- Around line 83-89: Update the ChangelogBody invocation in the conditional
rendering block to include a key derived from the first release’s ID. This must
force ChangelogBody to remount when the release dataset changes while preserving
the existing releases, typeLabels, and metaSections props.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 7152e098-60ad-4273-aadd-ec97a23b1b6e
📒 Files selected for processing (15)
apps/frontend/src/renderer/App.tsxapps/frontend/src/renderer/__tests__/changelog-releases.test.tsapps/frontend/src/renderer/components/ChangelogPilotView.tsxapps/frontend/src/renderer/components/Sidebar.tsxapps/frontend/src/renderer/lib/changelog-releases.tsapps/frontend/src/shared/i18n/index.tsapps/frontend/src/shared/i18n/locales/en/changelog.jsonapps/frontend/src/shared/i18n/locales/en/navigation.jsonapps/frontend/src/shared/i18n/locales/fr/changelog.jsonapps/frontend/src/shared/i18n/locales/fr/navigation.jsonlibs/ui/src/client/types.tslibs/ui/src/index.tslibs/ui/src/screens/ChangelogView.csslibs/ui/src/screens/ChangelogView.stories.tsxlibs/ui/src/screens/ChangelogView.tsx
- ChangelogView: remount body on dataset change (key on first release id) so a stale selection can't survive a project switch; localized loading/retry/empty state labels via new stateLabels prop (EN defaults preserved). - Parser: reject impossible calendar dates instead of letting Date() roll them forward; classify duplicate-version blocks against the next semantically different version (both pinned by new tests — 17 passing in UTC and America/New_York). - Pilot: raw IPC/exception errors go to console.error only; the screen shows the localized changelog:pilot.error, and state labels come from new changelog:pilot.states.* keys (en+fr). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
@coderabbitai review |
✅ Action performedReview finished.
|



Summary
First screen of the B1 "Code & review" batch (U5), ported from
desktop-changelog.html. All five B1 mockups already exist, so the batch goes straight to implementation; Changelog pilots the playbook.libs/ui (shared design system)
aria-current, focus rings) + scrollable release feed (mono version, release name, type badge, typed section icons+ / ! / ⚠ / d, sha chips) + optional right meta rail on the sharedUiMetaSectioncard family; loading/error/empty states.UiRelease/UiReleaseSection/UiReleaseEntry/UiReleaseType/UiReleaseSectionKind.UiRelease.idis required — real CHANGELOG files repeat versions across format blocks.Electron
changelog-releasesparser: keep-a-changelog plus the generator's loose/name-suffixed headings; ISO dates formatted in UTC (labels don't shift west of UTC); inline markdown stripped; position-qualified unique ids under duplicate versions.ChangelogPilotViewover the existingchangelog:readExistingIPC, mounted as "Changelog (new UI)" beside the legacy generator wizard (which stays untouched).i18n
changelognamespace (en+fr),navigation:items.changelogNextkeys.kanbannamespace — the shipped Kanban pilot was rendering rawkanban:pilot.*keys in live Electron.Adversarial review (18 agents, find → verify)
6 confirmed defects were fixed during the slice, several verified by executing the parser against this repo's real CHANGELOG.md:
TZ=America/New_York.2.7.5,2.6.0appear twice in the real file) broke React keys, the scroll ref map, and produced twoaria-currentrows → requiredid, position-qualified."Jun 8 (planned)"Date-parsed to year 2001 (RFC-2822 comment quirk) → strict-ISO gate.## 2.7.5 - Security & Platform Improvements) rendered as dates → non-ISO suffixes become release names.3 findings refuted with evidence (dot color-only signaling — text badge exists in-feed; ungated smooth scroll — house style in 5 merged files; JSX structural clones — no enforced rule fires).
Verification
TZ=America/New_York; smoke-parsed the repo's real 114KB CHANGELOG.md (unique ids, sane year groups).libs/uitsc + Electron typecheck (CI-style hoisted node_modules) clean.--on, singlearia-current, aligned card typography).Next in B1
GitHub PRs / GitHub Issues / Patterns / Context screens on the same playbook.
🤖 Generated with Claude Code
Summary by CodeRabbit