Skip to content

fix(frontend): fix changelog display#5076

Merged
jog1t merged 1 commit into
mainfrom
05-20-fix_frontend_fix_changelog_display
May 21, 2026
Merged

fix(frontend): fix changelog display#5076
jog1t merged 1 commit into
mainfrom
05-20-fix_frontend_fix_changelog_display

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented May 20, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app railway-app Bot temporarily deployed to rivet-frontend / rivet-pr-5076 May 20, 2026 23:35 Destroyed
@railway-app
Copy link
Copy Markdown

railway-app Bot commented May 20, 2026

🚅 Deployed to the rivet-pr-5076 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web May 20, 2026 at 11:47 pm
website 😴 Sleeping (View Logs) Web May 20, 2026 at 11:47 pm
ladle ✅ Success (View Logs) Web May 20, 2026 at 11:41 pm
mcp-hub ✅ Success (View Logs) Web May 20, 2026 at 11:36 pm
frontend-inspector ❌ Build Failed (View Logs) Web May 20, 2026 at 11:36 pm
kitchen-sink ❌ Build Failed (View Logs) Web May 20, 2026 at 11:35 pm

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 20, 2026

Code Review

Overview

This is a small but correct bug fix that addresses a crash when a changelog author entry has no socials object. Two files are changed:

  1. frontend/src/queries/types.ts — marks the socials field as .optional() in the Zod schema so authors without social links pass validation.
  2. frontend/src/app/changelog.tsx — adds optional chaining (socials?.twitter) to avoid a runtime error.

What's Good

  • The root cause is addressed at the schema level (Zod), not just defensively in the component.
  • The existing Storybook story at line 48 of whats-new-panel.stories.tsx already had socials: {} (all optional fields unset), which means this case was partially anticipated but the outer socials field itself wasn't made optional until now.

Issues / Suggestions

Minor — dangling <a> with no href

When socials is undefined or twitter is undefined, href={authors[0].socials?.twitter} evaluates to undefined. React omits the href attribute, so the <a> renders as a non-navigating element. The author block is still wrapped in an interactive <a> tag with no destination, which is a UX oddity and a minor accessibility concern.

Consider conditionally rendering a <div> when no Twitter link is available, or simply skipping the anchor wrapper when the link is absent. Not a blocker, just worth a follow-up.

PR template not filled out

The description, test plan, and checklist are all blank. Even a one-liner ("Authors without social links caused a Zod parse failure and a TypeError at render; made socials optional") would help reviewers and make the git history more useful.


Verdict

The fix is correct and safe to merge. The <a>-without-href nit is cosmetic and can be addressed in a follow-up.

Copy link
Copy Markdown
Contributor Author

jog1t commented May 21, 2026

Merge activity

  • May 21, 8:51 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 21, 8:52 PM UTC: @jog1t merged this pull request with Graphite.

@jog1t jog1t merged commit c1289fd into main May 21, 2026
12 of 17 checks passed
@jog1t jog1t deleted the 05-20-fix_frontend_fix_changelog_display branch May 21, 2026 20:52
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