Skip to content

Remove Truncation from URL Handling#970

Open
Niyibitanga wants to merge 4 commits intomasterfrom
ninosa/UrlUpdate
Open

Remove Truncation from URL Handling#970
Niyibitanga wants to merge 4 commits intomasterfrom
ninosa/UrlUpdate

Conversation

@Niyibitanga
Copy link
Contributor

@Niyibitanga Niyibitanga commented Oct 31, 2025

Move truncation to backend

@Niyibitanga Niyibitanga requested a review from Copilot October 31, 2025 18:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 keep parameter to the Config interface alongside existing drop parameter
  • Implemented logic to reorder query parameters, placing kept parameters first
  • Initialized default keep configuration 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.

@Niyibitanga Niyibitanga requested a review from Copilot October 31, 2025 18:41
@Niyibitanga Niyibitanga marked this pull request as ready for review October 31, 2025 18:41
@Niyibitanga Niyibitanga changed the title Ninosa/url update Update Url Processing Oct 31, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 17 comments.

@Niyibitanga Niyibitanga changed the title Update Url Processing Move truncation, to backend Feb 24, 2026
@Niyibitanga Niyibitanga changed the title Move truncation, to backend Move truncation to backend Feb 24, 2026
@Niyibitanga Niyibitanga requested a review from Copilot February 24, 2026 23:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Niyibitanga changed the title Move truncation to backend Move URL truncation to backend Feb 24, 2026
Copy link
Contributor

Copilot AI commented Feb 25, 2026

@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.

@Niyibitanga Niyibitanga changed the title Move URL truncation to backend Remove Truncation from URL Handling Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants