Skip to content

Fix routing edge cases and clarify navigation behavior - #570

Merged
molefrog merged 8 commits into
v3from
codex/open-issue-fixes
Sep 5, 2026
Merged

Fix routing edge cases and clarify navigation behavior#570
molefrog merged 8 commits into
v3from
codex/open-issue-fixes

Conversation

@molefrog

@molefrog molefrog commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Fix routing edge cases found while reviewing all 27 open issues. Each issue's change has its own commit; existing hash-navigation defaults, URL decoding, and public navigation signatures are preserved.

Changes

Validation

  • bun test --coverage: 243 passed, 1 existing skip, 0 failed; 100% line coverage (13 more tests than the baseline).
  • bun run test-types, bun run lint, and the repository build script passed. Local lint reports four pre-existing warnings in ignored generated bundles.
  • All eight size limits pass; React entry 2,341 B / 2,500 B, Preact entry 2,230 B / 2,500 B.
  • Independent review found no remaining actionable issues.

The native-history fix was also checked in real Chrome against a failing control. New runtime regressions were demonstrated before their fixes. The parser recipe was executed with its documented dependency API.

Size optimization

Reuse Link's rest-props object, pass children directly to createElement, simplify the absolute-pattern check, and shorten browser event registration. These retain the new behavior while reducing bundle size. No limits, ignored dependencies, or measurement settings were relaxed.

Size-limit results in minified Brotli bytes:

Entry Base branch Before optimization Final
React router 2,264 2,373 2,341
React browser location 522 565 555
React memory location 733 733 733
React hash location 718 720 720
Preact router 2,159 2,273 2,230
Preact browser location 457 507 488
Preact memory location 671 671 671
Preact hash location 640 645 645

The previous CI comparison reused generated Preact files from the PR when measuring the base branch. The size workflow now regenerates them after each checkout; the table uses independently prepared sources for every revision. The remaining increase pays for the new fixes, particularly grouped history notifications and absolute route matching.

Remaining issues reviewed

Documentation-only and partial fixes above intentionally do not claim to implement the broader requested features.

Fixes #536
Fixes #556
Fixes #244
Refs #464, #473, #452, #559, #563

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

size-limit report 馃摝

Path Size
packages/wouter/src/index.js 2.29 KB (+3.41% 馃敽)
packages/wouter/src/use-browser-location.js 555 B (+6.33% 馃敽)
packages/wouter/src/memory-location.js 733 B (0%)
packages/wouter/src/use-hash-location.js 720 B (+0.28% 馃敽)
packages/wouter-preact/src/index.js 2.18 KB (+3.29% 馃敽)
packages/wouter-preact/src/use-browser-location.js 488 B (+6.79% 馃敽)
packages/wouter-preact/src/use-hash-location.js 645 B (+0.79% 馃敽)
packages/wouter-preact/src/memory-location.js 671 B (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant