Revert "fix(mothership): fix url keeping markdown hash on resource sw…#3980
Revert "fix(mothership): fix url keeping markdown hash on resource sw…#3980TheodoreSpeaks wants to merge 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit a7e4f23. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR reverts commit fa51f94, which fixed a bug where markdown heading anchor hashes were incorrectly preserved in the URL when switching between resources in the home view. The revert is explicitly described as intentional — the author merged directly to main and is reverting to maintain proper commit history before re-landing the fix via a formal PR.
Confidence Score: 3/5This PR intentionally reintroduces a known UX bug and should only be merged if a follow-up fix PR is ready to land immediately after Score of 3 reflects that while the revert is intentional and acknowledged, it re-introduces a confirmed regression (URL hash persistence on resource switch) into main with no linked follow-up PR to restore the fix. The bug is not a security or data-loss issue but causes broken navigation UX. apps/sim/app/workspace/[workspaceId]/home/home.tsx — the URL sync useEffect at lines 191-199 needs the hash-stripping logic restored Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Browser
participant home.tsx
User->>Browser: View markdown resource A, clicks heading anchor
Browser->>Browser: URL becomes /workspace/ws1/home?resource=A#heading
User->>home.tsx: Switches to resource B (setActiveResourceId)
home.tsx->>Browser: new URL(window.location.href) includes #heading
home.tsx->>Browser: url.searchParams.set('resource', 'B')
home.tsx->>Browser: replaceState(null, '', url.toString())
Note over Browser: URL = /workspace/ws1/home?resource=B#heading ❌
Note over Browser: Hash from resource A incorrectly persists
|
…itch (#3…"
This reverts commit fa51f94.
Summary
I merged directly into main. Reverting this for commit history's sake
Type of Change
Testing
How has this been tested? What should reviewers focus on?
Checklist
Screenshots/Videos