Preserve Gigs tab in URL hash#385
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_35100384-3f33-4516-b63c-cdbc372bc883) |
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05ebf34037
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const onHashChange = () => setActiveGigTab(gigTabFromHash()) | ||
| window.addEventListener("hashchange", onHashChange) |
There was a problem hiding this comment.
Keep tab state in sync when routes clear the hash
When a user is on /dashboard/gigs#leads, navigates to another dashboard view, and then returns to Gigs via the sidebar, navigate() clears the hash with history.pushState(...); pushState does not dispatch a hashchange event, so this listener never resets activeGigTab. The page can therefore render the Leads tab at /dashboard/gigs, and refreshing or sharing that visible URL flips back to the Gigs tab instead of preserving the current state.
Useful? React with 👍 / 👎.
05ebf34 to
fe50583
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1d3fd9b7-8865-45c4-bdd8-b9429167f3e0) |
Summary
#gigsor#leads).Why
Refreshing the Gigs dashboard previously always returned users to Gigs, even after they had selected Leads. The URL now carries that state so it survives reloads and can be shared.
Validation
bun run typecheckbun run lintbun run testbun run builduv run pytest tests/integration/test_dashboard_playwright.py -qNote
Low Risk
Client-only URL hash and tab state in the admin dashboard; no API, auth, or data-model changes in this diff.
Overview
The admin Gigs view now keeps the Gigs vs Leads sub-tab in the URL (
#gigsor#leads) so reloads and shared links reopen the same tab.Tab changes go through
selectGigTab, which updates React state and useshistory.replaceStateon the hash. Initial state and in-app navigation (without a push) read the hash viagigTabFromHash, and ahashchangelistener keeps the UI in sync when the hash changes. Posting a lead still switches back to Gigs but now updates the hash as well. The committed dashboard Vite manifest points at the rebuilt bundle asset.Reviewed by Cursor Bugbot for commit fe50583. Bugbot is set up for automated code reviews on this repo. Configure here.