← gitpulse
Merged
Size
M
Change Breakdown
Refactoring55%
New Feature25%
Maintenance20%
#10refactor: restructure story routes to mirror GitHub URL patterns

Story URLs mirror GitHub reference patterns

Story URLs now follow GitHub conventions: PRs appear at /pull/<number>/<slug>/ and commits at /commit/<sha>/<slug>/, replacing the previous internal ID-based structure.

Story URLs on gitpulse now match the GitHub references they describe. PR stories appear at /pull/<number>/<slug>/ and commit stories at /commit/<sha>/<slug>/ — the URL structure itself communicates what kind of reference it represents, rather than hiding it behind an opaque identifier.

The change touches loadStoryByPrNumber and loadStoryBySha loader functions, which look up stories by their GitHub-native identifiers rather than internal storage keys. URL builders in storyPathSlug and storyBasePath generate the new paths, and ReleaseEditionTopStories was updated to use the new format.

Routing validation was tightened: malformed story IDs (missing prNumber or sha) now throw immediately rather than producing paths like /pull/undefined/, and slug mismatches return 404 to prevent incorrect page loads.