You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0caccb4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .claude/rules/sim-url-state.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,20 @@ These reads/mutations are **not** anti-patterns and stay as-is:
46
46
-**Route navigations** — `router.push('/path/[id]?folderId=x')` that changes the route *path*, not just the current query. A nuqs setter only mutates the query on the current path; cross-path navigation stays on `router`.
47
47
-**Read-once auth / redirect signals** — `token`, `callbackUrl`, `redirect`, `error`, `invite_flow`, `new` (invite signup flow), `upgraded`, `redirect_workflow`, etc. These are navigation signals consumed once (often read-then-strip), not synced view-state. Leave them on `useSearchParams`. Key names are per-surface: files' `new` is a genuine nuqs param (`files/search-params.ts`), while invite's `new` is a one-shot signup signal.
48
48
49
+
### Remembered list-preference exception
50
+
51
+
Files, Tables, and Knowledge may persist their last-used filter/sort snapshot through
52
+
`useResourceListPreferences`. This is a fallback preference, not a second live source of truth:
53
+
54
+
- nuqs remains authoritative while the module is open.
55
+
- Zustand is consulted once on a clean module entry, after persisted state hydrates.
56
+
- An explicit URL filter/sort parameter wins even when it resolves to the module default. The
57
+
complete resolved URL snapshot becomes the remembered value; omitted fields use URL defaults
58
+
rather than merging with storage.
59
+
- Explicit filter/sort gestures commit the same complete snapshot to nuqs and Zustand together.
60
+
- Never mirror subsequent URL changes with a synchronization effect or `popstate` listener.
61
+
- Search and folder navigation remain URL-only and are excluded from the persisted snapshot.
62
+
49
63
## Per-feature `search-params.ts` — single source of truth
50
64
51
65
Co-locate a `search-params.ts` next to the feature. Export the parser map (and shared options). Both the client (`useQueryStates`/`useQueryState`) and any server component (`createSearchParamsCache` from `nuqs/server`) import from this one file. Import parsers from `nuqs/server` so the module is safe to import in both client and server contexts.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/integrations/file.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The File block is a built-in Sim block for working with files stored in the work
16
16
With the File block, you can:
17
17
18
18
-**Read and extract content**: Load workspace file objects and extract their text content
19
-
-**Search workspace content**: Find literal text across indexed active workspace files with bounded line-level results
19
+
-**Search workspace content**: Match a regular expression, or an exact piece of text, against the indexed lines of active workspace files with bounded line-level results
20
20
-**Fetch from URLs**: Retrieve and parse files from external URLs with custom headers
21
21
-**Write and append**: Create new workspace files or append content to existing ones
22
22
-**Compress and decompress**: Bundle files into a .zip archive or extract an archive into the workspace
@@ -70,13 +70,14 @@ Extract the text content of one or more workspace files from selected file objec
70
70
71
71
### File Search
72
72
73
-
Search indexed text across active workspace files using literal smart-case substring matching.
73
+
Search the indexed text of active workspace files for lines matching a regular expression, and return each matching line once with its file ID and line number. Coverage is what the index currently holds, so check "complete" and "indexStatus" before concluding that something is absent.
74
74
75
75
#### Input
76
76
77
77
| Parameter | Type | Required | Description |
78
78
| --------- | ---- | -------- | ----------- |
79
-
|`query`| string | Yes | Literal text to find \(3-512 characters\). Uppercase Unicode letters make matching case-sensitive. |
79
+
| `query` | string | Yes | A regular expression matched against each line, 3-512 characters. Supports "." "*" "+" "?" "\{n,m\}" and their lazy forms, character classes such as "\[a-z\]" and "\[^0-9\]", the classes \d \w \s and \D \W \S, alternation "\|", groups "\(...\)" and "\(?:...\)", the anchors "^" and "$", and the word boundary \b. Lookahead, lookbehind, backreferences, named groups, inline flags such as "\(?i\)", \p\{...\} and POSIX "\[\[:alpha:\]\]" classes are not supported, and a pattern cannot span a line break. The pattern must contain at least 3 consecutive literal characters that every match will include — write "error \d+" rather than "\w+ \d+". Escape any metacharacter you mean literally. Matching is case-insensitive until the pattern contains an uppercase letter you are searching for; uppercase inside an escape or a character class, such as \D or \[A-Z\], does not make it case-sensitive. When the workflow builder sets Match to exact instead, the query is matched verbatim and no metacharacter needs escaping. |
80
+
|`mode`| string | No | How the query is read, chosen by the workflow builder: "regex" \(default\) as a regular expression, or "exact" as verbatim text. |
80
81
|`maxResults`| number | No | Hard result cap configured by the workflow builder \(1-200, default 50\). |
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/code-languages.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/**
2
-
* @vitest-environment jsdom
2
+
* @vitest-environment node
3
3
*
4
4
* Guards against drift between the code-block language picker and the Prism grammars actually
5
5
* registered by CodeBlockHighlight: every selectable language must have a registered grammar, or it
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/apply-streamed-markdown.test.ts
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/image-drag-move.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/**
2
-
* @vitest-environment jsdom
2
+
* @vitest-environment node
3
3
*
4
4
* Dragging an image to reposition it inside a document must MOVE it, not import it again.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/markdown-parse.test.ts
0 commit comments