fix(mothership): fix url keeping markdown hash on resource switch#3968
fix(mothership): fix url keeping markdown hash on resource switch#3968TheodoreSpeaks merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit eab6aed. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR fixes a bug where the URL hash fragment (e.g.
Confidence Score: 5/5Safe to merge — single-line fix with no side effects The change is a one-line addition that clears the URL hash fragment before No files require special attention Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant MothershipView
participant Home
participant BrowserHistory
User->>MothershipView: Click resource tab
MothershipView->>Home: setActiveResourceId(newId)
Home->>Home: useEffect fires (activeResourceId changed)
Note over Home: url.hash = '' clears #heading fragment
Home->>BrowserHistory: replaceState(?resource=newId, no fragment)
Note over BrowserHistory: URL is clean — no stale #heading
Reviews (1): Last reviewed commit: "fix(mothership): fix url keeping markdow..." | Re-trigger Greptile |
Summary
We recently added support for # to represent headers in markdown files. However, this needs to be cleared on switching resources. Added clearing logic.
Type of Change
Testing
Validated switching resources does not keep trailing hash
Checklist
Screenshots/Videos