Skip to content

Fix React hydration mismatch on repo page navigation #355

Description

@shuv1337

Problem / Context

Cache dogfood (2026-06-24) found repeated React hydration mismatch warnings when loading repository pages after initial navigation. Reproduced on shuv1337/better-hub overview and during benchmark runs.

This blocks a full PASS on cache dogfood validation — cached content renders, but the console shows hydration errors on normal repo navigation.

Source: dogfood-output/cache-dogfood-report.md (ISSUE-001)

Reproduction

  1. Authenticate locally (PAT or GitHub OAuth)
  2. Open http://127.0.0.1:3000/shuv1337/better-hub
  3. Open browser DevTools console
  4. Observe repeated https://react.dev/link/hydration-mismatch warnings

Acceptance Criteria

  • Repo overview loads with zero hydration mismatch warnings in the console
  • Repeat navigation (cold → warm) does not introduce new hydration errors
  • No regression to route crashes or error boundaries on repo sub-pages

Evidence

  • dogfood-output/benchmarks/console-nav-better-hub-overview.txt
  • dogfood-output/benchmarks/console-active-overview-better-hub-run-2.txt
  • dogfood-output/screenshots/cache-nav-better-hub-overview.png

Implementation Notes

Dogfood used session better-hub-cache-dogfood against local dev (http://127.0.0.1:3000). Errors appear after Fast Refresh/HMR settles — likely server/client HTML divergence on repo layout or overview widgets.

Compare server-rendered markup vs client hydration for repo overview components (header, tabs, README region, sync indicators).

Tasks

  • Identify the component(s) causing server/client markup divergence
  • Fix root cause (avoid client-only values in initial render, fix conditional rendering, etc.)
  • Verify on overview + at least one sub-page (code, issues)
  • Re-run cache dogfood Step 6 navigation consistency check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions