Skip to content

feat(renderer): adopt React Router 8 navigation - #3585

Closed
setchy wants to merge 9 commits into
mainfrom
feat/react-19-navigation
Closed

setchy wants to merge 9 commits into
mainfrom
feat/react-19-navigation

Conversation

@setchy

@setchy setchy commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Upgrade the renderer from react-router-dom@7.18.5 to react-router@8.5.0 and migrate all imports, test helpers, and mocks.
  • Route changes are immediate with no page-level animation. This keeps the sidebar stable and interactive and avoids making heavier views such as Filters feel slower.
  • Add useAppNavigate, wrapping the router hook with a guard test that keeps raw useNavigate usage inside the wrapper.
  • Remove the retained <Activity> notifications route after local testing showed it added cost to route switches.
  • Refresh notification alerts through useEffectEvent; keep the tray effect unchanged because it has no resubscription work to remove.
  • Update ARCHITECTURE.md for the route composition.
  • Time-box the React Compiler experiment; it was reverted after the App navigation test exceeded its 10s budget.
  • Park stray pointer hover before route screenshots so high-contrast visual baselines are deterministic.

Verification

  • pnpm check
  • Affected unit tests passed
  • pnpm test:visual — 176 tests passed in the pinned Linux container
  • pnpm build
  • Electron smoke test on macOS: authenticated routes, back/forward, and settings round trip passed
  • Browser test confirms sidebar controls remain hit-testable above the routed content

Deferred

  • Task 4.1 (focus intent): the session focus store and list consumer from 02-add-notification-list-positioning are not present on main (removed in b15d4c92), so the focus-intent navigation test cannot be written yet.
  • Task 7.3 (native-notification focus smoke): all other Electron smoke scenarios passed; exercising a native-notification focus target depends on the same missing change 02 implementation.

The change remains a draft until those two focus-related items can be completed.

Finish the row exit within a fixed 500ms budget instead of holding its layout space until the mutation resolves. The slide/fade remains 350ms; the grid track then collapses over 150ms so slow networks cannot leave an invisible blank row. Group actions collapse the header and rows together, failures restore the layout, and Reduce Motion collapses immediately. Cache updates remain pessimistic.
Close the row's layout space at the end of the 350ms slide instead of animating a further 150ms height transition. This matches main's instant vertical reflow while keeping the gap bounded on slow requests.
The exit wrapper's grid needs an explicit single column and min-width constraints so an unwrapped long title cannot widen the row and drag the hover action rail offscreen. Add browser coverage for the row width and rail alignment.
Upgrade the renderer to react-router 8.5.0 and add a shared navigation wrapper that starts route transitions for React view transitions.

Add route enter/exit CSS with reduced-motion handling, retain the notifications route with Activity, and refresh notification alerts through useEffectEvent. Keep the tray effect unchanged because it has no resubscription work to remove.

Add route, transition, rapid-navigation, reduced-motion, retention, and Electron smoke coverage. Document the deferred change-02 focus-intent dependency.
@github-actions github-actions Bot added dependency Dependency updates enhancement New feature or enhancement to existing functionality labels Nov 1, 2026
Keep the sidebar out of the view-transition tree and use opaque route snapshots with a short slide instead of a full-page crossfade.

Revert the retained Activity notifications route because keeping it mounted slowed switches to heavier views such as Filters.

Park stray pointer hover before route screenshots so high-contrast visual baselines are deterministic.
Give the sidebar its own static view-transition snapshot so the root crossfade cannot fade it during route changes.
Browser view transitions repeatedly captured and faded the sidebar despite named layers. Replace them with a route-only CSS slide and remove the route background that covered the fixed sidebar padding.
Route changes now swap immediately. This keeps the sidebar stable and interactive and removes the animation timing that made heavy views feel slow.
@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

@setchy

setchy commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

replaced by #3593 impl

@setchy setchy closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Dependency updates enhancement New feature or enhancement to existing functionality

Development

Successfully merging this pull request may close these issues.

1 participant