Commit 936536e
authored
improvement(url-state): platform-wide nuqs audit — migrate remaining view-state, codify conventions (#5851)
* improvement(url-state): migrate ee settings sections to nuqs deep-linkable 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
* fix(url-state): review fixes — resolve custom-block deep links before 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
* improvement(url-state): platform-wide sweep — migrate the last three 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.
* improvement(url-state): cleanup pass — replace-on-close for the fork activity view, TSDoc form for the logs nullable comment
* fix(url-state): honor a custom time range only when both bounds are present
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.
* fix(url-state): verification-round fixes — reject unparseable date params, 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
* fix(url-state): hold first paint while a custom-block deep link can still 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.
* fix(url-state): include permissions loading in the custom-block deep-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.1 parent 70814bc commit 936536e
22 files changed
Lines changed: 303 additions & 96 deletions
File tree
- .claude/rules
- apps/sim
- app
- (landing)
- integrations
- models
- workspace/[workspaceId]
- integrations
- knowledge
- [id]/[documentId]
- logs
- settings
- [section]
- components
- byok
- inbox
- workflow-mcp-servers
- skills
- ee
- access-control/components
- audit-logs
- components
- custom-blocks/components
- data-drains/components
- workspace-forking/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | | - | |
57 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
185 | | - | |
| 190 | + | |
186 | 191 | | |
187 | 192 | | |
188 | 193 | | |
| |||
200 | 205 | | |
201 | 206 | | |
202 | 207 | | |
203 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
| |||
217 | 226 | | |
218 | 227 | | |
219 | 228 | | |
220 | | - | |
221 | | - | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 29 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
| |||
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
163 | | - | |
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
173 | 193 | | |
174 | 194 | | |
175 | 195 | | |
| |||
619 | 639 | | |
620 | 640 | | |
621 | 641 | | |
622 | | - | |
623 | | - | |
| 642 | + | |
624 | 643 | | |
625 | 644 | | |
626 | 645 | | |
| |||
638 | 657 | | |
639 | 658 | | |
640 | 659 | | |
641 | | - | |
642 | 660 | | |
643 | 661 | | |
644 | 662 | | |
| |||
654 | 672 | | |
655 | 673 | | |
656 | 674 | | |
657 | | - | |
658 | 675 | | |
659 | 676 | | |
660 | 677 | | |
| |||
663 | 680 | | |
664 | 681 | | |
665 | 682 | | |
666 | | - | |
| 683 | + | |
667 | 684 | | |
668 | 685 | | |
669 | 686 | | |
670 | 687 | | |
671 | 688 | | |
672 | 689 | | |
673 | 690 | | |
674 | | - | |
| 691 | + | |
675 | 692 | | |
676 | | - | |
677 | 693 | | |
678 | 694 | | |
679 | | - | |
| 695 | + | |
680 | 696 | | |
681 | 697 | | |
682 | 698 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 25 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
79 | 95 | | |
80 | 96 | | |
81 | 97 | | |
| |||
104 | 120 | | |
105 | 121 | | |
106 | 122 | | |
107 | | - | |
108 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
109 | 129 | | |
110 | 130 | | |
111 | 131 | | |
| |||
0 commit comments