Uh oh!
There was an error while loading. Please reload this page.
improvement(url-state): platform-wide nuqs audit — migrate remaining view-state, codify conventions - #5851
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview EE settings get co-located Workspace stragglers: knowledge document chunks gain Parser hygiene: shared
Reviewed by Cursor Bugbot for commit bc91f53. Configure here. |
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryThis PR moves the remaining shareable view state to nuqs-backed URL parameters. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (5): Last reviewed commit: "fix(url-state): include permissions load..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
04f11a9 to
60a3d79Comparewaleedlatif1
commented
Jul 22, 2026
waleedlatif1
commented
Jul 22, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 60a3d79. Configure here.
…kable view-state - audit-logs: types/time-range/start-date/end-date filters move to a co-located search-params.ts (reusing the logs kebab-token time-range parser); search binds to the shared settings ?search= via useSettingsSearch, replacing a hand-rolled debounce effect - access-control: group detail deep-links via ?group-id (push/replace-on-close); search via useSettingsSearch - custom-blocks: block detail deep-links via ?custom-block-id; create flow stays local; search via useSettingsSearch - data-drains + forks: search via useSettingsSearch; forks close now replaces history like the mcp reference pattern - polish: nullable-reason comment on logs startDate/endDate, stale debounce TSDoc now references useDebouncedSearchSetter
… opening detail, per-surface time-range fallback - custom-blocks: gate the detail view on the resolved block (matching mcp/ access-control), so a dead or still-loading ?custom-block-id no longer flashes a bogus create screen - parseAsTimeRange: unknown tokens now parse to null so each surface's .withDefault applies (logs keeps 'All time'; audit-logs keeps 'Past 30 days' instead of silently widening to all time on a malformed link) - audit-logs: date-picker cancel target can never be 'Custom range' itself on a dateless custom deep link - refresh shared ?search= consumer lists in TSDoc
…view-state stragglers, codify conventions Sweep across landing, workspace, and settings surfaces found only three remaining candidates (everything else verified clean or correctly non-URL): - knowledge document page: chunk enabled-status filter joins page/search/sort in the URL (?enabled=), resetting page in the same write - workflow-mcp-servers: detail Details/Workflows tab deep-links via ?server-tab, cleared alongside the server id on close - byok: provider search binds the shared settings ?search= via a controlled prop pair (modal/embedded consumers keep local state) Rule updates (.claude/rules/sim-url-state.md): shallow defaults documented, urlKeys kebab remapping, throttleMs deprecation, startTransition with shallow:false, shared-parser null-fallback rule, resolve-before-open gating, close-with-replace, and the reusable-component controlled-search pattern.
…activity view, TSDoc form for the logs nullable comment
…resent A partial ?time-range=custom deep link (missing start/end) now falls back to the default preset window instead of displaying 'Custom range' while querying an unbounded result set.
…rams, tighten docs - new parseAsDateString parser (logs + audit-logs): an unparseable ?start-date=/?end-date= now parses to null (missing bound) instead of crashing the audit-logs render via Invalid Date .toISOString(), and hardens the same class in logs - audit-logs: remove the provably dead cancel-revert branch and its ref — the URL only holds 'Custom range' after Apply writes both bounds atomically - workflow-mcp-servers: reset a lingering ?server-tab= when opening a server so a dead deep link can't re-target the next open - knowledge document: drop the unreachable 'N selected' label branch - sim-url-state.md fact-check corrections: cover apps/sim/ee in paths, focusedBlockId -> currentBlockId (the real store field), note that history/clearOnDefault are nuqs v2 defaults, fix the Suspense cross-reference and parseAsIsoDate serialize detail, clarify the *UrlKeys naming convention; list byok in the shared-search consumer docs
9b3e7fb to
03f1641Comparewaleedlatif1
commented
Jul 22, 2026
waleedlatif1
commented
Jul 22, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
…till resolve A valid ?custom-block-id= no longer flashes the list while the blocks query is pending; a dead id still falls back to the list once loaded.
waleedlatif1
commented
Jul 22, 2026
waleedlatif1
commented
Jul 22, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
…link paint hold canAdmin reads false while the permissions context loads, so the hold must gate on permissionsLoading too; drop the blocksPending conjunct — it shares one query with useCanPublishCustomBlock, so isLoading already covers it.
waleedlatif1
commented
Jul 22, 2026
waleedlatif1
commented
Jul 22, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bc91f53. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
search-params.ts(?types=,?time-range=,?start-date=,?end-date=, reusing the logs kebab-token time-range parser); access-control deep-links?group-id=; custom-blocks deep-links?custom-block-id=(create flow stays local); audit-logs/access-control/custom-blocks/data-drains/forks search binds the shared settings?search=viauseSettingsSearch()— deletes audit-logs' hand-rolled debounce effect?enabled=filter (page reset in the same write), workflow-mcp-servers?server-tab=deep-link (cleared with the server id on close), byok provider search via a controlled prop pair (modal consumers keep local state)parseAsTimeRangeparses unknown tokens to null so each surface's default applies.claude/rules/sim-url-state.md): shallow default, urlKeys kebab remapping, throttleMs deprecation, startTransition with shallow:false, shared-parser null-fallback, resolve-before-open, close-with-replace, reusable-component controlled searchType of Change
Testing
Typecheck, biome, lint:check, and 617 tests across the touched areas pass. Ran an adversarial review pass plus the full cleanup battery (effects/state/memo/callback/react-query/emcn/url-state/comments) — all findings fixed in-branch.
Checklist