Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new keep configuration option to preserve specific URL query parameters from being truncated during URL scrubbing. The feature reorders query strings to move "kept" parameters to the front, ensuring they remain within the maxUrlLength limit when truncation occurs.
Key changes:
- Added
keepparameter to the Config interface alongside existingdropparameter - Implemented logic to reorder query parameters, placing kept parameters first
- Initialized default
keepconfiguration as an empty array
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/clarity-js/types/core.d.ts | Added keep?: string[] to Config interface |
| packages/clarity-js/src/core/config.ts | Initialized default keep configuration as empty array |
| packages/clarity-js/src/core/scrub.ts | Implemented query parameter reordering logic to prioritize kept parameters before truncation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4719674 to
be8a4d7
Compare
be8a4d7 to
25f9584
Compare
3adb2d9 to
b5bc75d
Compare
3aafeba to
2bb312d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
packages/clarity-js/src/core/scrub.ts:96
- The new comment references "Decode/Utils/UrlPreserver.cs", but there’s no such file/path in this repo (including packages/clarity-decode). This makes the source-of-truth for truncation hard to verify/maintain here; consider rewording to a repo-agnostic note (e.g., "handled server-side") or linking to the specific backend/decoder repo/location if it’s external.
// Truncation is now handled server-side in Decode/Utils/UrlPreserver.cs.
export function url(input: string, electron: boolean = false): string {
|
@Niyibitanga I've opened a new pull request, #1043, to work on those changes. Once the pull request is ready, I'll request review from you. |
fb404c8 to
30b3694
Compare
30b3694 to
756b3b3
Compare
Move truncation to backend